Academy

Cursor AI + MCP Integration: Connect Your Code Editor to Any Tool

A practical guide to connecting Cursor AI to external tools and data sources via the Model Context Protocol — covering setup, authentication, and the most useful MCP servers for developers.

M
Max Beech· Founder
··8 min read
Cursor AI + MCP Integration: Connect Your Code Editor to Any Tool
TL;DR - Cursor AI supports the Model Context Protocol (MCP), which means you can connect it to databases, APIs, internal tools, and custom data sources without writing custom integration code. - MCP servers tell Cursor what tools and resources are available — the model decides when to use them, without you needing to prompt it explicitly. - Setup is straightforward: add the server URL and any credentials to Cursor's MCP config file, and the tools appear automatically in your AI context. - The most useful MCP servers for developers: filesystem, GitHub, database connectors, documentation tools, and internal API servers. - OpenHelm's MCP server extends this further — connecting Cursor to your organisation's tools with enterprise-grade credential management and audit logging.

---

Why MCP Changes What Cursor Can Do for You

Cursor is an excellent AI code editor. Its ability to understand your codebase, answer questions in context, and make targeted edits is genuinely useful. But it has a boundary: it only knows what's in your files and what you paste into the conversation.

The Model Context Protocol removes that boundary. With MCP, Cursor can query your database to check a value, look up a GitHub issue for context, fetch documentation for a library it's about to use, or call your internal API to understand the data shape. All without you leaving the editor or copying and pasting.

This is the difference between Cursor knowing your code and Cursor knowing your *system*.

For a full conceptual overview of how MCP works, see what is an MCP server. This guide focuses specifically on the Cursor AI integration.

---

How Cursor AI MCP Integration Works

When you connect an MCP server to Cursor, it does three things:

  1. Reads the capability manifest. The server tells Cursor what tools and resources it exposes — their names, descriptions, and parameter schemas.
  2. Makes tools available in the AI context. Cursor's AI model can now see these tools and decide when to use them during a conversation or agentic task.
  3. Routes tool calls through the server. When the model decides to use a tool, Cursor sends the call to the MCP server, which executes it and returns the result.

From your perspective as a developer, you just see a more capable Cursor. Ask it "what's the current value of the feature flag for new user onboarding?" and it queries your feature flag system. Ask it to fix a bug and it can read the relevant GitHub issue for context without you pasting it in.

---

Setting Up MCP in Cursor AI

Step 1: Open Cursor MCP Settings

In Cursor, go to SettingsFeaturesMCP Servers. This reveals the MCP config interface, where you can add servers either via the GUI or directly in the JSON config file located at ~/.cursor/mcp.json.

Step 2: Add Your First MCP Server

The JSON format is:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

For local MCP servers (run as a child process), use the command format above. For remote MCP servers (hosted endpoints), use the url format:

{
  "mcpServers": {
    "openhelm": {
      "url": "https://mcp.openhelm.ai/sse",
      "headers": {
        "Authorization": "Bearer your-openhelm-api-key"
      }
    }
  }
}

Step 3: Restart Cursor and Verify

After saving the config, restart Cursor. Open a new AI conversation and type something that would require using the tool — ask about a file outside your current project, query a database value, or reference a GitHub issue. If the tool appears in the model's response context, the integration is working.

---

The Most Useful MCP Servers for Developers

Filesystem Server

The official filesystem MCP server gives Cursor read/write access to directories you specify. Useful for cross-project context: let Cursor read your API client library while working on a service that consumes it.

GitHub Server

The GitHub MCP server gives Cursor access to issues, PRs, and code. Ask Cursor to "fix the bug described in issue #482" and it reads the issue automatically for context.

Database Connectors

PostgreSQL, SQLite, and MySQL MCP servers let Cursor query your database schema and current data. Particularly useful when writing queries or migrations — Cursor can verify the actual column names and data types rather than relying on what's in your migration files.

Documentation Tools

Context7 and similar documentation MCP servers give Cursor access to up-to-date library docs — useful when working with libraries released after the model's training cutoff.

Internal API Servers

Building a custom MCP server for your internal APIs is one of the highest-leverage investments a development team can make. Once built, Cursor (and any other MCP client) can call your internal services directly. The TypeScript MCP SDK makes it straightforward to expose existing APIs as MCP tools.

---

Cursor AI vs Claude Desktop: What's Different?

Both Cursor and Claude Desktop support MCP. The key differences for developers:

Cursor AIClaude Desktop
Primary useCode editing and developmentGeneral knowledge work
MCP transportPrimarily local (stdio)Local + remote (SSE)
Codebase awarenessDeep — whole-project indexingLimited to what you paste
Agent modeYes (Composer agent)Yes (Claude Projects)
Best for MCPDeveloper tools, code contextGeneral-purpose tool use

For purely developer workflows — code context, database queries, GitHub integration — Cursor is the right client. For broader organisational workflows involving non-code tools, Claude Desktop or an OpenHelm-configured agent is often more appropriate.

---

Enterprise MCP: Credential Management and Audit

For individual developers, storing API tokens in ~/.cursor/mcp.json is acceptable. For team or enterprise deployments, it's not.

The problems:

  • Credentials are stored in plaintext on developer machines
  • Rotating a credential requires updating every developer's config file
  • There's no audit trail of which tools were called, when, and by whom

OpenHelm's hosted MCP server solves these problems for enterprise teams:

  • Credentials are stored in a central vault, not on individual machines
  • The MCP endpoint is a single URL — developers add it to Cursor config once; credentials are managed centrally
  • Every tool call is logged with the user, timestamp, inputs, and output

For teams where developers need access to production APIs, compliance tools, or sensitive internal services, this matters significantly. See our MCP server guide for the full context of enterprise MCP deployment.

---

Frequently Asked Questions

Does Cursor AI MCP work with all MCP servers?

Cursor supports the MCP spec — any server that implements the protocol correctly will work. There are occasional compatibility issues with servers using newer spec features; check the specific server's documentation for Cursor compatibility notes.

Can I use MCP in Cursor's Agent mode?

Yes. Cursor's Composer agent (the agentic mode) uses MCP tools in the same way as the regular AI chat. When the agent is planning and executing multi-step tasks, it can call MCP tools as part of that execution.

Is it safe to give Cursor access to production databases via MCP?

With the right controls, yes. Use read-only credentials for database MCP servers in development contexts. For production data, scope permissions carefully and consider routing through a managed MCP endpoint like OpenHelm that provides audit logging. Never give an AI agent write access to production databases without explicit approval gates.

What's the fastest way to get started with Cursor MCP?

Install the filesystem and GitHub MCP servers first — they require minimal setup and immediately demonstrate the value. From there, add database and internal API servers as your use cases demand.

---

Cursor + MCP: A More Capable Developer Experience

The developer who uses Cursor with MCP integration isn't just getting autocomplete and inline chat. They're working with an AI that can query their systems, read their docs, check their issues, and work across the full context of their engineering environment — not just the files currently open.

That's a meaningfully different capability. And it's available now, with tools that are already in your stack.

Explore OpenHelm's MCP server for teams who need enterprise-grade tool connectivity, or see what is an MCP server for the full protocol background.

More from the blog

Stop doing the work around the work

OpenHelm connects to your tools, reads the context, and does the steps, so you sign off on the result instead of producing it. See how it covers an entire role’s weekly workload, check the pricing, or run it yourself with the free local app.