Skip to main content

Cursor Setup

Learn how to connect your deployed ToolBoost MCPs to Cursor, the AI-first code editor.

Overview

Cursor is an AI-powered code editor built on VS Code that supports MCP servers. By connecting ToolBoost MCPs to Cursor, you can extend its AI capabilities with external tools and data sources.

Prerequisites

  • Cursor installed (Download here)
  • A ToolBoost account with at least one deployed MCP
  • Your project's API key from ToolBoost dashboard

Finding Your Connection URL

  1. Go to your MCP's detail page on ToolBoost
  2. Ensure the MCP is deployed to your project
  3. In the "Use" section, find the Cursor configuration
  4. Copy the connection URL:
https://toolboost.dev/server/author/mcp-name/mcp?api_key=YOUR_API_KEY

Configuration Methods

Cursor supports two ways to configure MCP servers:

  1. Open Cursor
  2. Go to Cursor SettingsMCP
  3. Click "Add MCP Server"
  4. Paste your connection URL
  5. Give it a friendly name
  6. Click "Save"

Method 2: Manual Configuration File

For more control, you can manually edit the configuration file.

Manual Configuration Steps

1. Locate the Config File

Cursor uses a project-specific or global configuration file:

Project-specific (recommended):

.cursor/mcp.json

Global (applies to all projects):

  • macOS/Linux: ~/.cursor/mcp.json
  • Windows: %APPDATA%\.cursor\mcp.json

2. Create/Edit the Configuration

Create or edit the mcp.json file:

{
"mcpServers": {
"your-mcp-name": {
"serverUrl": "https://toolboost.dev/server/author/mcp-name/mcp?api_key=YOUR_API_KEY",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

Replace:

  • your-mcp-name - A friendly name (lowercase, no spaces)
  • YOUR_API_KEY - Your actual ToolBoost API key
  • author/mcp-name - Your actual MCP path

3. Multiple MCPs

To add multiple MCPs:

{
"mcpServers": {
"github": {
"serverUrl": "https://toolboost.dev/server/github/github-mcp-server/mcp?api_key=YOUR_API_KEY",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
},
"postgres": {
"serverUrl": "https://toolboost.dev/server/modelcontextprotocol/servers-postgres/mcp?api_key=YOUR_API_KEY",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
},
"filesystem": {
"serverUrl": "https://toolboost.dev/server/modelcontextprotocol/servers-filesystem/mcp?api_key=YOUR_API_KEY",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

4. Save and Restart

  1. Save the configuration file
  2. Restart Cursor completely
  3. Open a new project or file

Project-Specific Configuration

For different MCPs per project, create .cursor/mcp.json in your project root:

my-project/
├── .cursor/
│ └── mcp.json
├── src/
└── package.json

This allows you to:

  • Use different API keys per project
  • Enable specific MCPs per project
  • Commit project-specific MCP configurations (without API keys)
Security

Don't commit API keys to version control! Use environment variables or .env files instead.

Using Environment Variables

For better security, use environment variables for API keys:

1. Create a .env file:

TOOLBOOST_API_KEY=tb_your_actual_key_here

2. Reference in mcp.json:

{
"mcpServers": {
"github": {
"serverUrl": "https://toolboost.dev/server/github/github-mcp-server/mcp?api_key=${TOOLBOOST_API_KEY}",
"headers": {
"Authorization": "Bearer ${TOOLBOOST_API_KEY}"
}
}
}
}

3. Add .env to .gitignore:

.env

Verifying the Connection

After restarting Cursor:

  1. Open a file in your project
  2. Trigger the AI assistant (Cmd/Ctrl + K or Cmd/Ctrl + L)
  3. Your MCPs should be available

Test Commands

Try these commands in Cursor's AI chat:

For GitHub MCP:

@github list my repositories

For Filesystem MCP:

@filesystem show files in the current directory

For Postgres MCP:

@postgres show database tables

Common Issues & Solutions

MCP Not Detected

Problem: MCP doesn't appear in Cursor after restart.

Solutions:

  • Verify JSON syntax (no trailing commas!)
  • Check file is in correct location (.cursor/mcp.json or ~/.cursor/mcp.json)
  • Restart Cursor completely (quit and reopen)
  • Check Cursor's developer console for errors (View → Toggle Developer Tools)

Connection Failures

Problem: "Failed to connect to MCP" error.

Solutions:

  • Verify internet connection
  • Check the connection URL is correct
  • Ensure API key is valid and not expired
  • Confirm MCP is deployed in your ToolBoost project

Authorization Errors

Problem: "Unauthorized" or "403 Forbidden" errors.

Solutions:

  • Verify API key in both serverUrl and headers
  • Check for typos in the API key
  • Ensure you haven't regenerated the API key
  • Confirm you're using the correct project

Environment Variable Issues

Problem: Environment variables not being replaced.

Solutions:

  • Restart Cursor after creating .env
  • Check .env file is in project root
  • Verify syntax: VARIABLE_NAME=value (no spaces around =)
  • Try hardcoding first to verify it works

Complete Examples

Basic Configuration

{
"mcpServers": {
"github": {
"serverUrl": "https://toolboost.dev/server/github/github-mcp-server/mcp?api_key=tb_abc123",
"headers": {
"Authorization": "Bearer tb_abc123"
}
}
}
}

Multiple Projects

Project A (.cursor/mcp.json):

{
"mcpServers": {
"work-postgres": {
"serverUrl": "https://toolboost.dev/server/modelcontextprotocol/servers-postgres/mcp?api_key=tb_work_key",
"headers": {
"Authorization": "Bearer tb_work_key"
}
}
}
}

Project B (.cursor/mcp.json):

{
"mcpServers": {
"personal-github": {
"serverUrl": "https://toolboost.dev/server/github/github-mcp-server/mcp?api_key=tb_personal_key",
"headers": {
"Authorization": "Bearer tb_personal_key"
}
}
}
}

With Environment Variables

.env:

TOOLBOOST_API_KEY=tb_abc123def456

.cursor/mcp.json:

{
"mcpServers": {
"github": {
"serverUrl": "https://toolboost.dev/server/github/github-mcp-server/mcp?api_key=${TOOLBOOST_API_KEY}",
"headers": {
"Authorization": "Bearer ${TOOLBOOST_API_KEY}"
}
},
"postgres": {
"serverUrl": "https://toolboost.dev/server/modelcontextprotocol/servers-postgres/mcp?api_key=${TOOLBOOST_API_KEY}",
"headers": {
"Authorization": "Bearer ${TOOLBOOST_API_KEY}"
}
}
}
}

.gitignore:

.env

Best Practices

  1. Project-Specific Config: Use .cursor/mcp.json for project-specific MCPs
  2. Environment Variables: Store API keys in .env files
  3. Version Control: Add .cursor/mcp.json to git, but not .env
  4. Naming Convention: Use clear, descriptive names for MCPs
  5. Documentation: Comment your config (Cursor supports // comments in JSON)

Tips & Tricks

Auto-complete MCP Names

Cursor auto-suggests MCP names when you type @ in the AI chat.

Keyboard Shortcuts

  • Cmd/Ctrl + K: Inline AI edit
  • Cmd/Ctrl + L: AI chat
  • Cmd/Ctrl + I: Quick AI command

Debugging

Enable Cursor's developer tools to see MCP connection logs:

  1. Go to ViewToggle Developer Tools
  2. Check Console tab for MCP-related messages

Next Steps

Need Help?