[ ABORT TO HUD ]
SEQ. 1

Connecting External Tools

🔌 MCP Integration 20 min 500 BASE XP⌨ HANDS-ON LAB

MCP: The Universal Connector

The Model Context Protocol (MCP) is an open standard that connects Cursor's AI agents to external tools, databases, and services. Think of it as USB for AI — build an MCP server once, connect it to any AI client.

How MCP Works in Cursor

  1. Cursor acts as the MCP Client
  2. MCP Servers expose tools, resources, and prompts
  3. When an agent needs data, it calls an MCP tool
  4. The server executes the request and returns results to the agent

Configuration

ScopeLocationUse Case
Global~/.cursor/mcp.jsonTools available in all projects
Project.cursor/mcp.jsonProject-specific databases, APIs
// .cursor/mcp.json example
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": { "DATABASE_URL": "postgresql://..." }
    }
  }
}

Popular MCP Servers

  • Filesystem: Read/write files outside the project
  • PostgreSQL/MySQL: Query databases directly from the AI
  • GitHub: Create PRs, manage issues, review code
  • Notion/Slack: Read docs, send notifications
  • Brave Search: Web search from within the editor

Transports & Team Distribution

Local servers speak JSON-RPC over STDIO; remote servers use HTTP with OAuth authentication — and Cloud Agents support all of them. On Team plans, admins can distribute vetted MCP servers to everyone via the team marketplace (Cursor 3.10+), and Bugbot can call MCP tools during reviews on Team/Enterprise plans.

Deep Dive: For a comprehensive MCP curriculum (9+ modules), visit the dedicated MCP Academy covering server building, client integration, security, and enterprise deployment.
⌨ HANDS-ON LABWire Up Your First MCP Server
⭐ +150 XP

Give Cursor's agent real tools. Create the project-level MCP config, then smoke-test a reference server with npx before Cursor launches it.

1Create the project-level MCP config file: .cursor/mcp.json.
2Smoke-test the filesystem reference server with npx (package: @modelcontextprotocol/server-filesystem).
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 2 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 3
Where do you configure project-specific MCP servers?
~/.cursor/mcp.json
.cursor/mcp.json in the project root
package.json
.cursorrules
Connecting External Tools Tutorial | MCP Integration — Cursor Academy