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
- Go to your MCP's detail page on ToolBoost
- Ensure the MCP is deployed to your project
- In the "Use" section, find the Cursor configuration
- 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:
Method 1: Cursor Settings (Recommended)
- Open Cursor
- Go to Cursor Settings → MCP
- Click "Add MCP Server"
- Paste your connection URL
- Give it a friendly name
- 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 keyauthor/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
- Save the configuration file
- Restart Cursor completely
- 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)
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:
- Open a file in your project
- Trigger the AI assistant (Cmd/Ctrl + K or Cmd/Ctrl + L)
- 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.jsonor~/.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
serverUrlandheaders - 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
.envfile 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
- Project-Specific Config: Use
.cursor/mcp.jsonfor project-specific MCPs - Environment Variables: Store API keys in
.envfiles - Version Control: Add
.cursor/mcp.jsonto git, but not.env - Naming Convention: Use clear, descriptive names for MCPs
- Documentation: Comment your config (Cursor supports
// commentsin 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:
- Go to View → Toggle Developer Tools
- Check Console tab for MCP-related messages
Next Steps
Need Help?
- Email: contact@toolboost.dev
- Cursor Support: cursor.com/support
- Community: Cursor Discord