Get startedGet started for free

Create Snowflake MCP Server and use Cursor

1. Create Snowflake MCP Server and use Cursor

We'll connect your MCP server to Cursor, so you can query sales data right from your code editor. Let's navigate to Snowflake, open a SQL workspace. We'll navigate to the database and schema of where you want to create MCP server, which will be sales intelligence and data. We created an MCP server object that exposes our sales intelligence agent as a tool. This is what we'll create. We're creating MCP server, we're calling it sales MCP server, and the tool specification includes the tool name, which is sales intelligence. The type is Cortex agent run. For the identifier, we have salesintelligence.data.salesintelligenceagent, and then for the description, we're going to put analyzes B2B sales data by combining structured metrics with unstructured conversation transcripts. Use for questions about win rates, deal analysis, sales rep performance, or customer conversations insights. For the title, we're going to put sales intelligence agent. Let me walk through this. The name is how MCP clients identify the tool. The type, Cortex agent run, tells Snowflake this invokes a Cortex agent. The identifier is a fully qualified path to your agent. The description helps AI clients decide when to use this tool. Be very specific. Your MCP server is created. Now, let's verify it with show MCP servers in schema. There we are. You'll see your server listed. Next, we need a path, a programmatic access token. We click our user, go to settings. We're going to go to authentication. Then we're going to generate a new token. We give it a name, so let's call it MCP. Expires in one year. The role we'll give it is the account admin role. Go ahead and copy that. Store it securely because you'll need this for cursor. One important note about permissions is access to the MCP server doesn't automatically give access to the tools. You need to grant usage on the Cortex agent separately. Make sure the role you're using has usage privileges on your sales intelligence agent. While we're using cursor for this demonstration, remember, MCP is an open standard. Any MCP compatible client works the same way. Cloud Desktop is a great fit for non-developers who want to query your agent through a chat interface. Custom applications can integrate too. Once your MCP server is configured in Snowflake, you connect from whatever tool fits your workflow. The point is, your agent becomes accessible wherever your team's already working. Now, let's configure cursor. We're going to open cursor. We'll click cursor or go to settings. We're going to click on cursor settings. We're going to navigate to tools and MCP and we're going to add a custom MCP. This opens up mcp.json. Here, we're going to add a server endpoint. The MCP server endpoint follows this pattern. This is a URL that we'll use for access to our MCP server. As you can see, the structure of the pattern is our database, our database name, the schemas, which is data, MCP servers, and then the name of our MCP server that we've made, which is sales underscore MCP underscore server. For you, you'll have to change this for your account identifier. For me, it's SFDevRelEnterprise. Replace that placeholder with your values, which is your Snowflake account identifier. Within that, we're going to add this header, which is for authorization. It'll be authorization, then bearer, then the API token or the PAT token that we've received earlier. Go ahead and paste that there. We're going to go ahead and save it, so Command-Save or Control-S. Now, we're back into cursor. From here, we're going to go ahead and click the top right-hand corner that says, Toggle AI Pane. Now, we're ready to test it. The things you have to look out for is we're switching to agent and then we're going to ask this question. We're going to type, using the sales intelligence agent, what is our win rate by product line? Cursor discovers a tool from your MCP server. It composes a request and sends it through MCP to Snowflake. The agent process the query, then returns the results, and cursor displays them right in your editor. This answer is very familiar to us already. Premium Security, our win rate is 100 percent. Analytics Pro, again, 100 percent. Enterprise Suites, 100 percent, and our basic package is at 50 percent. The correct numbers from our agent, all without leaving our code editor. Let's try another question just to make sure it works. We're going to type, what were the main concerns in the TechCorp discovery call? Again, cursor routes this to your agent. The agent searches through our conversations, returns excerpts about the integration timeline and the legacy system concerns. Your development workflow now includes live data access. No context switching, no logging into separate tools, ask questions, get answers, and keep coding. The MCP server doesn't store or cache your data. Every request goes to Snowflake, runs with your credentials and role, returns the fresh results, and the role-based access control applies. Users only access what their Snowflake role allows. This is how developers get data into their workflow. Creating an MCP server object in Snowflake, getting a path, connecting from cursor or any MCP client. Data stays governed, everything's auditable, and you never have to leave your editor. For more MCP configuration options, including adding Cortex search or a custom tool, check out the getting started with managed Snowflake MCP server Quickstart linked in the resources. In the final video, we'll wrap up everything you've learned.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.