Cross-Tool Standard

.mcp.json Configuration Guide

Configure Model Context Protocol to connect AI assistants to external tools, databases, and APIs. The universal standard for extending AI capabilities.

What is Model Context Protocol?

Model Context Protocol (MCP) is an open standard for connecting AI applications to external data sources and tools. Think of it like USB-C for AI — a universal way to plug capabilities into LLM applications regardless of which AI assistant you're using.

While CLAUDE.md and .cursorrules tell AI how to behave, MCP gives AI what it can access — databases, APIs, file systems, web services, and custom tools.

Cross-Tool Compatibility

MCP is supported by Cursor, Claude Desktop, VS Code, OpenAI Codex, and more. It's the closest thing to a universal AI extension standard.

Configuration File Locations

  • Cursor (project) .cursor/mcp.json
  • Cursor (global) ~/.cursor/mcp.json
  • VS Code .vscode/mcp.json
  • OpenAI Codex ~/.codex/config.toml

.mcp.json Format

MCP configuration uses JSON format to define servers and their capabilities:

.cursor/mcp.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"],
      "env": {}
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    },
    "custom-api": {
      "command": "node",
      "args": ["./mcp-servers/my-api-server.js"],
      "env": {
        "API_KEY": "your_api_key"
      }
    }
  }
}

Configuration Fields

  • command — The executable to run (npx, node, python, etc.)
  • args — Arguments passed to the command
  • env — Environment variables for the server process

Transport Types

MCP supports three transport types:

stdio

Simplest option. Server communicates via stdin/stdout. Best for local development.

SSE (Server-Sent Events)

HTTP-based streaming. Good for distributed teams and remote servers.

Streamable HTTP

Full HTTP flexibility for complex integrations and cloud deployments.

Popular MCP Servers

ServerPurpose
@mcp/server-filesystemRead/write files, search directories
@mcp/server-githubGitHub API access, issues, PRs
@mcp/server-postgresPostgreSQL database queries
@mcp/server-fetchHTTP requests to external APIs
@mcp/server-slackSlack workspace integration

Related Guides

CLAUDE.mdCLAUDE.md Guide.cursorrulesCursor Rules GuideComparisonCompare All Tools

Frequently Asked Questions

Manage Your .mcp.json Files Visually

ClaudeMDEditor lets you browse and organize MCP configurations alongside CLAUDE.md, .cursorrules, and all your other AI coding assistant config files.

Claude CodeCursorCopilotWindsurfGeminiCodexAider
Get ClaudeMDEditor — $13

One-time purchase for macOS Tahoe (26+)