Connect Cursor AI to External Tools via MCP Servers

MCP lets Cursor's Agent access external tools, data, and APIs through stdio or HTTP/SSE servers, installed one-click or via mcp.json, avoiding repeated project explanations.

Expose Tools, Prompts, and Data to Cursor Agent Without Manual Context

MCP protocol connects Cursor to external systems like security scanners (Aikido), financial APIs (Alpha Vantage), analytics (Amplitude), or research papers (alphaXiv), so Agent uses them automatically in chats or Plan Mode. Servers expose four core capabilities: Tools (executable functions), Prompts (templated workflows), Resources (readable data sources), and Roots (URI/filesystem boundaries). Servers also initiate Elicitation for user input.

Instead of describing tools repeatedly, integrate them—e.g., Airwallex MCP searches docs and interacts with sandbox APIs during integration. Write servers in Python, JS, Go via stdout or HTTP. Cursor supports three transports for flexibility:

TransportEnvironmentDeploymentUsersInputAuth
stdioLocalCursor-managedSingleShell commandManual
SSELocal/RemoteServerMultipleSSE URLOAuth
Streamable HTTPLocal/RemoteServerMultipleHTTP URLOAuth

This setup pulls real-time data into context, reducing token waste on static explanations.

Install and Configure Servers Flexibly Across Projects

Use one-click installs from Cursor's directory (e.g., Add to Cursor buttons for Aikido Security via npx -y @aikidosec/mcp) or define in .cursor/mcp.json (project-specific) or ~/.cursor/mcp.json (global). For CLI servers:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "mcp-server"],
      "env": {"API_KEY": "${env:API_KEY}"}
    }
  }
}

Remote servers use url with headers or static OAuth:

{
  "mcpServers": {
    "oauth-server": {
      "url": "https://api.example.com/mcp",
      "auth": {
        "CLIENT_ID": "${env:MCP_CLIENT_ID}",
        "CLIENT_SECRET": "${env:MCP_CLIENT_SECRET}",
        "scopes": ["read", "write"]
      }
    }
  }
}

Cursor's fixed OAuth redirect is cursor://anysphere.cursor-mcp/oauth/callback. Interpolate vars like ${workspaceFolder}/tools/server.py, ${env:API_KEY}, or ${userHome} in command/args/env/url/headers. STDIO adds envFile (e.g., .env). Programmatically register via vscode.cursor.mcp.registerServer() extension API for enterprises.

Toggle, Approve, and Visualize Tool Outputs in Chat

Agent lists available MCP tools; toggle them per chat to control context. It auto-detects relevance but seeks approval before execution—expand arrows to review args. Enable auto-run (like terminal commands) in settings for trusted tools. Responses render inline with expandable args/output; images (base64 JPEG/PNG) display for analysis if model supports vision.

Example server returns:

const RED_CIRCLE_BASE64 = "/9j/4AAQSkZJRgAB...";
return {
  content: [{ type: "image", data: RED_CIRCLE_BASE64, mimeType: "image/jpeg" }]
};

Secure installs by verifying sources, reviewing permissions, using minimal API keys, and auditing code—MCP servers execute on your behalf.

Real-World Impact: Streamline Workflows Like Web Dev

In web development, chain Linear (tasks), Figma (designs), and browser tools via MCP for end-to-end flows without context switching. This cuts explanation overhead, enabling Agent to query live data (e.g., Amplitude experiments) directly, boosting productivity on large codebases or data science tasks.

Summarized by x-ai/grok-4.1-fast via openrouter

6705 input / 2068 output tokens in 10408ms

© 2026 Edge