The Model Context Protocol (MCP) is an open protocol that allows you to provide custom tools to agentic LLMs in Cursor.

MCP tools may not work with all models. MCP tools are only available to the Agent in Composer.

Cursor implements an MCP client, which supports an arbitrary number of MCP servers. Cursor’s MCP client supports the stdio and sse transports.

Adding an MCP Server to Cursor

To add an MCP server to Cursor, go to Cursor Settings > Features > MCP and click on the + Add New MCP Server button.

This will open a modal with a form to fill out. Select the transport under Type, and fill out a nickname for the server (Name) either the command to run, or the URL of the server, depending on the transport.

For example, this is how you would configure the MCP quickstart weather server, assuming it has already been build and placed at ~/mcp-quickstart/weather-server-typescript/build/index.js. The entire command string in this case is node ~/mcp-quickstart/weather-server-typescript/build/index.js.

And this is how you would configure the MCP sample tool, assuming it is running locally on port 8765.

For SSE servers, the URL should be the URL of the SSE endpoint, e.g. http://example.com:8000/sse.

For stdio servers, the command should be a valid shell command that can be run from the terminal. If you require environment variables to be set, we recommend you write a small wrapper script that sets the environment variables and then runs the server.

After adding the server, it should appear in the list of MCP servers. You may have to manually press the refresh button in the top right corner of the MCP server in order to populate the tool list. Here is what the tool list would look like after loading a (modified version of) the weather and sample servers.

Managing MCP servers

MCP servers can be edited or deleted from the MCP settings page.

Using MCP Tools in Composer

The Composer Agent will automatically use any MCP tools that are listed under Available Tools on the MCP settings page if it determines them to be relevant. To prompt tool usage intentionally, simply tell the agent to use the tool, referring to it either by name or by description.

When the agent decided to use a tool, it will display a message in the chat like the following, prompting the user to approve or deny the tool call.

The user can expand the message to see the tool call arguments.

If the user approves the tool call, the agent will use the tool and display the response in the chat. This image shows the response from the sample tool, as well as expanded views of the tool call arguments and the tool call response.