{"post":{"slug":"how-to-use-mcp-servers-2026","title":"How to use MCP servers in 2026: setup, config, and real examples","excerpt":"MCP servers give your AI tools direct access to databases, APIs, and files. This guide shows you how to install, configure, and run them in 2026.","category":"code","date":"April 23, 2026","author":"ByteLedger Team","content":"<span class=\"dropcap\">S</span>etting up an MCP server in 2026 takes minutes, not days. The protocol is stable, the client support is broad, and the registry of pre-built servers covers most common tools. This guide walks you through real setup from config file to first tool call.\n\n## What changed in 2026\n\n- **Claude Desktop ships with MCP support out of the box.** No flags or beta opt-ins needed.\n- **Cursor, Zed, and VS Code Copilot all support MCP.** One server config works across all three.\n- **The official MCP registry at mcp.run** lists hundreds of servers with one-line install commands.\n- **SSE transport is now stable**, making it practical to run a shared MCP server for a team rather than per-developer installations.\n\n## The config file\n\nMCP clients read server definitions from a JSON config. For Claude Desktop on macOS, the path is `~/Library/Application Support/Claude/claude_desktop_config.json`.\n\n```json\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-github\"],\n      \"env\": {\n        \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"ghp_...\"\n      }\n    },\n    \"postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-postgres\",\n               \"postgresql://localhost/mydb\"]\n    },\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\",\n               \"/Users/yourname/projects\"]\n    }\n  }\n}\n```\n\nRestart Claude Desktop and the servers appear in the tool list automatically.\n\n## Popular servers and what they expose\n\n| Server | Install | Tools available |\n| --- | --- | --- |\n| `@mcp/server-github` | npx | list_repos, create_pr, read_file, search_code |\n| `@mcp/server-postgres` | npx | query, list_tables, describe_table |\n| `@mcp/server-filesystem` | npx | read_file, write_file, list_directory |\n| `@mcp/server-slack` | npx | post_message, list_channels, search_messages |\n| `mcp-server-sqlite` | pip | execute_query, list_tables |\n\n## Configuring for Cursor\n\nIn Cursor, open Settings → MCP and paste the same JSON object (the `mcpServers` value). Cursor picks up the servers and surfaces them in the agent panel.\n\n```json\n// ~/.cursor/mcp.json  (or via Settings UI)\n{\n  \"mcpServers\": {\n    \"github\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-github\"],\n      \"env\": { \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"ghp_...\" }\n    }\n  }\n}\n```\n\n## Running an SSE server for team use\n\nFor teams, run one MCP server as an SSE endpoint so everyone connects to the same instance:\n\n```bash\n# Install and run a postgres SSE server\npip install mcp-server-postgres\nmcp-server-postgres --transport sse --port 8080 \\\n  --connection-string \"postgresql://prod-db/myapp\"\n```\n\nEach team member's config points to the SSE URL instead of a subprocess:\n\n```json\n{\n  \"mcpServers\": {\n    \"postgres\": {\n      \"url\": \"http://mcp.internal:8080/sse\"\n    }\n  }\n}\n```\n\n## How to start\n\n1. **Identify the tool you need** — GitHub, a database, internal docs.\n2. **Search the registry** — `mcp.run` or `npm search @modelcontextprotocol`.\n3. **Add the server block** to your client config JSON.\n4. **Set environment variables** for credentials — never hardcode tokens.\n5. **Restart the client** and verify the server appears in the tool list.\n6. **Test with a read-only call first** before granting write permissions.\n\n## Common mistakes\n\n**Hardcoding credentials in the config.** Use environment variables or a secrets manager. The config JSON ends up in dotfiles repos.\n\n**Granting filesystem access to your entire home directory.** Scope the path argument to only the directories the model needs.\n\n**Running SSE servers on public endpoints without auth.** Add API key middleware or run behind a VPN. MCP tools can have significant write access.\n\n**Not restarting the client after config changes.** MCP servers are launched at client startup. Config changes require a restart.\n\n**Ignoring server error logs.** MCP servers write to stderr; your client may suppress it. Run the server manually with `npx ... 2>&1` to see errors.\n\n## What to skip\n\n- **Wrapping every internal API as MCP on day one.** Start with the tool that saves the most context-switching.\n- **Rolling your own transport.** stdio and SSE cover every real use case — custom transports add maintenance with no benefit.\n\n## FAQ\n\n**Can I run multiple MCP servers at once?**\nYes. Each entry in `mcpServers` is an independent process. You can run ten servers simultaneously with no conflict.\n\n**Are MCP servers stateful?**\nstdio servers live for the duration of the client session. SSE servers are persistent processes. Both can maintain in-process state between calls.\n\n**How do I debug a broken server?**\nRun the server binary directly in a terminal and send JSON-RPC payloads manually. All MCP SDK servers log to stderr by default.\n\n**Is there a cost to using MCP servers?**\nThe protocol itself is free. Some hosted MCP endpoints (Stripe, Notion) may use your API quota. Running local servers has no marginal cost.\n\n## Where to go next\n\n- [Model Context Protocol explained in 2026](/blog/model-context-protocol-explained-2026)\n- [Build an AI agent from scratch in 2026](/blog/build-an-ai-agent-from-scratch-2026)\n- [Best AI API providers in 2026](/blog/best-ai-api-providers-2026)","hue":318,"metaTitle":"How to Use MCP Servers in 2026: Setup and Config Guide","metaDescription":"Practical 2026 guide to installing and configuring MCP servers for Claude, Cursor, and VS Code. Real examples for GitHub, Postgres, and file access.","keywords":["how to use mcp servers 2026","mcp server setup 2026","claude desktop mcp config","cursor mcp server","install mcp server 2026","mcp server examples","mcp json config","mcp postgres server","mcp github server 2026","model context protocol setup"],"tldr":["**Most MCP servers install in under five minutes** — the registry has hundreds of ready-made servers for common tools.","**Config lives in one JSON file** — no code required to wire a server to Claude Desktop or Cursor.","**stdio servers run as subprocesses** — SSE servers run as HTTP endpoints; pick based on sharing needs.","**Scope permissions tightly** — an MCP server with write access is as dangerous as a shell with write access.","**Skip:** building a custom server when a community server for your tool already exists."],"readTime":"3 min read","wordCount":755},"related":[{"slug":"mcp-claude-desktop-setup-2026","title":"MCP servers in Claude Desktop: a practical 2026 setup guide","excerpt":"How to set up Model Context Protocol servers in Claude Desktop in 2026 — five MCPs we actually use daily, with config snippets and honest tradeoffs.","category":"ai","date":"February 3, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":188},{"slug":"mcp-servers-guide-2026","title":"MCP servers explained: how to build and use Model Context Protocol in 2026","excerpt":"Model Context Protocol (MCP) became the standard for connecting AI models to external tools in 2026. Here is what it is, why it matters, and how to build your first MCP server in under an hour.","category":"code","date":"January 31, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":308},{"slug":"best-mcp-servers-for-developers-2026","title":"Best MCP Servers for Developers in 2026: What to Use","excerpt":"A plain-language guide to the MCP servers worth wiring into your AI tools in 2026, which ones to skip, and how to add them without creating a security hole.","category":"ai","date":"June 24, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":270}],"sameCategory":[{"slug":"bazel-build-explained-2026","title":"Bazel Explained: What Hermetic Builds Actually Cost","excerpt":"Bazel delivers reproducible, precisely cached builds and demands that you describe everything. Here is what you get, what it costs, and who should say no.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":145},{"slug":"graphql-federation-2026","title":"GraphQL Federation: One Graph, Many Teams","excerpt":"Federation composes independently-owned subgraphs into a single API. Here is what it solves, the operational cost it adds, and when a simpler gateway is enough.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":300},{"slug":"hermetic-builds-explained-2026","title":"Hermetic Builds Explained: Same Inputs, Same Output","excerpt":"A hermetic build depends only on declared inputs. Here is what that property gives you, the common leaks that break it, and how to move toward it incrementally.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":130},{"slug":"monorepo-tooling-compared-2026","title":"Monorepo Tooling Compared: What You Actually Need","excerpt":"Monorepo tools solve task orchestration and caching, not repository layout. Here is what each tier provides and how to tell when you have outgrown the simple option.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":150}],"newer":{"slug":"how-to-start-investing-with-50-2026","title":"How to Start Investing with $50 in 2026: A Beginner Roadmap","excerpt":"You do not need thousands of dollars to begin investing in 2026. Fractional shares, micro-apps, and zero-commission accounts make $50 a real starting point.","category":"finance","date":"April 23, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":296},"older":{"slug":"income-driven-repayment-plans-explained-2026","title":"Income Driven Repayment Plans Explained 2026","excerpt":"A plain-language guide to income driven repayment in 2026 after the SAVE plan fallout: which plans still exist, who they fit, and the tax bomb to watch.","category":"finance","date":"April 23, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":32}}