How to Add & Configure MCP in Cursor: Complete mcp.json Setup Guide [2026]
Learn how to connect any Model Context Protocol server to Cursor IDE, fix common mcp.json syntax errors, and automate tool injection using the 1-click AIStoreHub CLI.
Unlock deep repository awareness, local database inspection, and terminal automation by configuring MCP servers in Codeium's Windsurf editor.
Codeium's Windsurf editor has introduced native Model Context Protocol (MCP) integration, allowing its autonomous agent Cascade to interact with external developer tools, APIs, and databases. While Windsurf provides an internal settings panel, underlying configurations are stored in ~/.codeium/windsurf/mcp_config.json. This guide provides exact configuration schemas, solves Cascade tool invocation timeouts, and demonstrates automated 1-click installation via AIStoreHub CLI.
$ aihub mcp install community/postgres-mcp --client cursorpip install aistorehubCLI DocsCodeium's Windsurf editor has emerged as one of the most powerful AI-native IDEs in software engineering.
At the heart of Windsurf is Cascade—an agentic coding assistant capable of multi-file reasoning, proactive terminal command execution, and codebase-wide indexing.
With native support for the Model Context Protocol (MCP), Cascade can now extend its perception and execution capabilities far beyond the immediate workspace repository. It can query local database schemas, fetch real-time documentation, test live endpoints, and manage cloud resources directly during coding sessions.
However, many developers struggle with manual configuration, missing environment variables, and locating Windsurf's hidden configuration files. This guide details everything you need to set up, debug, and automate MCP in Windsurf.
In standard AI code completion, an LLM only knows what you paste into chat or what its local tree-sitter index extracts.
When you equip Windsurf's Cascade with MCP servers:
Windsurf manages MCP servers through a centralized configuration file named mcp_config.json.
The file is stored in your operating system's Codeium configuration directory:
| Platform | Default Config Path |
|---|---|
| macOS | ~/.codeium/windsurf/mcp_config.json |
| Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
Windsurf UI Shortcut: You can also access this in the Windsurf editor by navigating to:
Windsurf Settings $\rightarrow$ Cascade $\rightarrow$ Model Context Protocol (MCP) $\rightarrow$ Open Config.
Windsurf follows the standard Model Context Protocol schema. The root structure contains a mcpServers dictionary:
json{ "mcpServers": { "sqlite-local": { "command": "uvx", "args": [ "mcp-server-sqlite", "--db-path", "/Users/username/projects/analytics/data.db" ] }, "github-tools": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-github" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_secret_token_here" } } } }
Once you save your mcp_config.json, Windsurf automatically initializes background server processes:
initialize JSON-RPC request over STDIO to each declared server.tools/list, returning available function names and JSON Schema parameters.sqlite-local has the read_query tool and invokes it autonomously.json"command": "/usr/local/bin/npx" // macOS/Linux "command": "C:\\Program Files\\nodejs\\npx.cmd" // Windows
console.log("Ready")) to stdout, Windsurf's JSON-RPC parser crashes.stderr (console.error in Node, sys.stderr.write in Python).Cmd+Shift+P or Ctrl+Shift+P) and run Developer: Reload Window to force a clean server handshake.Instead of manually editing JSON files and risking formatting errors, use the open-source AIStoreHub CLI (pip install aistorehub):
bash# 1. Install CLI pip install aistorehub # 2. Inject verified MCP server into Windsurf aihub mcp install community/postgres-mcp --client windsurf # 3. List active Windsurf tools aihub list --client windsurf
AIStoreHub validates your schema, resolves executable paths, and creates timestamped backups of your ~/.codeium/windsurf/mcp_config.json before applying changes.
Explore hundreds of verified MCP servers, community tools, and autonomous agents in the AIStoreHub Registry.
Verified packages installable directly via terminal into Cursor, Claude Desktop, and Python runtimes.
Inspect schema, explain queries, and generate zero-downtime migrations in Cursor.
Autonomous prospecting, cold emails, and meeting booking with zero API token bills.
Scan charts, calculate risk/reward brackets, and backtest setups via Claude Code.
Essential clarifications for developers and engineering teams building and operating AI systems.
AIStoreHub is the open registry and 1-click CLI for discovering, running, and installing production-grade AI systems, Model Context Protocol (MCP) servers, and autonomous agents.
Continue learning how to build, monetize, and operate AI systems effectively.
Learn how to connect any Model Context Protocol server to Cursor IDE, fix common mcp.json syntax errors, and automate tool injection using the 1-click AIStoreHub CLI.
Learn how to find claude_desktop_config.json across Windows and macOS, solve spawn ENOENT path errors, pass API tokens securely, and automate tool installation with AIStoreHub CLI.
Learn how Model Context Protocol (MCP) bridges frontier models with local developer environments. Complete setup instructions for Claude Desktop, Cursor, and Windsurf with 1-click CLI installation.