Skip to main content
Cursor integration Integrate your deployed MCP servers with Cursor, the AI-first code editor, to supercharge your development workflow.

Overview

Cursor is an AI-first code editor built for productivity. By connecting your MCP servers to Cursor, you can extend its AI capabilities with custom tools tailored to your workflow.

Setup Instructions

1

Open Cursor settings (Cmd/Ctrl + ,)

Access the Cursor settings panel
2

Search for "MCP" or "Model Context Protocol"

Navigate to the MCP configuration section
3

Add the configuration below to your MCP servers

Paste the generated configuration
4

Restart Cursor

Fully quit and restart Cursor
5

Access the server through Cursor's AI features

Use Cursor’s AI chat and features with your MCP server

Configuration Format

{
  "mcpServers": {
    "echo": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint",
        "https://mcp.nimbletools.ai/{workspace-id}/{server-name}/mcp",
        "--token",
        "YOUR_WORKSPACE_TOKEN"
      ]
    }
  }
}

Getting Your Configuration

1

Navigate to Toolbox

Go to the Toolbox section in NimbleBrain Studio
2

Find Your Server

Locate the MCP server you want to connect
3

Click Connect

Click the Connect button on the server card
4

Select Cursor

Choose “Cursor” from the integration options
5

Copy Configuration

Copy the generated configuration to your clipboard

Configuration Details

The configuration includes:
command
string
The command to run (typically npx for Node packages)
args
array
Arguments passed to the command:
  • @nimbletools/mcp-http-bridge - The bridge package
  • --endpoint - Your MCP server endpoint URL
  • --token - Your workspace API token

Workspace Token

You need a workspace API token to authenticate:
  1. Navigate to API Tokens in Studio settings
  2. Click Create Token
  3. Copy the token value
  4. Replace YOUR_WORKSPACE_TOKEN in the configuration
Store your token securely! Anyone with your token can access your workspace.

Using MCP Tools in Cursor

Once configured, you can access your MCP tools through Cursor’s AI features:

In Chat

Ask Cursor’s AI to use your tools:
Can you use the search_knowledge_base tool to find information about authentication?

In Code

Cursor will automatically suggest using your tools when relevant:
# Cursor may suggest: "Use the data_api tool to fetch user data"
user_data = fetch_user_data(user_id)

In Terminal

Some MCP tools can be invoked from Cursor’s integrated terminal.

Troubleshooting

Possible causes:
  • Configuration not saved correctly
  • Cursor not restarted
  • Syntax error in JSON
Solution:
  • Verify JSON is valid (use a JSON validator)
  • Fully quit and restart Cursor (not just reload window)
  • Check Cursor logs for errors (Help → Show Logs)
Possible causes:
  • Invalid or expired token
  • Token not replaced in config
  • Wrong workspace selected
Solution:
  • Generate a new token in Studio
  • Ensure YOUR_WORKSPACE_TOKEN is replaced with actual token
  • Verify token is for the correct workspace
Possible causes:
  • Server not running
  • Network connectivity issues
  • Incorrect endpoint URL
Solution:
  • Check server status in Toolbox (should show “Running”)
  • Verify internet connection
  • Confirm endpoint URL matches your workspace and server
Possible causes:
  • Tool descriptions not clear
  • Context not relevant to tool
  • AI model not recognizing tool use case
Solution:
  • Explicitly ask Cursor to use the tool
  • Provide more context about what you’re trying to do
  • Check tool descriptions in your MCP server

Advanced Configuration

Multiple Servers

You can connect multiple MCP servers:
{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint",
        "https://mcp.nimbletools.ai/{workspace-id}/database/mcp",
        "--token",
        "YOUR_TOKEN"
      ]
    },
    "api": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint",
        "https://mcp.nimbletools.ai/{workspace-id}/api/mcp",
        "--token",
        "YOUR_TOKEN"
      ]
    }
  }
}

Environment Variables

Use environment variables for sensitive data:
{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": [
        "@nimbletools/mcp-http-bridge",
        "--endpoint",
        "https://mcp.nimbletools.ai/{workspace-id}/{server-name}/mcp",
        "--token",
        "${NIMBLEBRAIN_TOKEN}"
      ]
    }
  }
}
Set the environment variable:
export NIMBLEBRAIN_TOKEN="your-token-here"

Best Practices

Use clear, descriptive names for your tools so Cursor’s AI understands when to use them.
Provide detailed descriptions in your MCP server to help Cursor’s AI understand tool capabilities.
The more context you provide in your prompts, the better Cursor will understand which tools to use.
When Cursor doesn’t automatically suggest a tool, explicitly ask it to use the tool by name.
I