Guides / MCP servers for Claude Code
MCP Servers for Claude Code: Setup, Config JSON, and the Best Servers
MCP servers connect Claude to external tools and data. This guide covers MCP server setup for Claude Code and Claude Desktop, the config JSON, a config-generator approach, real examples, and the best MCP servers for GitHub, PostgreSQL, Figma, and Playwright. Package names and commands change, so confirm them in each server's repo and the official MCP docs.
What are MCP servers?
MCP (Model Context Protocol) is an open standard from Anthropic for connecting AI assistants to tools and data through small programs called servers. An MCP server exposes tools and resources; Claude Code and Claude Desktop act as MCP clients that call them. The result: Claude can read your database, search a repo, or drive a browser without custom glue code.
MCP server setup for Claude Code
For Claude Code MCP setup, you register a server with the CLI or a project config file. The pattern is a name plus the command that launches the server:
claude mcp add github -- npx -y @modelcontextprotocol/server-github
Project-scoped servers can live in an .mcp.json file in your repo so your team shares the same setup. Check the docs for the current flags.
Claude Desktop MCP configuration (config JSON)
For Claude Desktop MCP configuration, edit claude_desktop_config.json and add servers under mcpServers. The MCP config JSON looks like this:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>" }
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
}
}
}
Save the file and restart Claude Desktop so it picks up the servers.
MCP config generator
Writing that JSON by hand is error-prone with multiple servers. An MCP config generator (or MCP configurator / MCP configuration generator) lets you pick servers, fill in the env values, and copy valid MCP config JSON — handy when combining several servers or sharing a setup with a team. If you prefer, copy a known-good example like the one above and edit the values.
Best MCP servers (a short list and directory)
Popular, practical MCP servers:
- MCP server for GitHub — read and manage repos, issues, and pull requests.
- MCP server for PostgreSQL — let Claude query your database (often read-only by default).
- MCP server for Figma — bring Figma design context (files, variables) into Claude.
- MCP server for Playwright — browser automation and end-to-end testing.
- Plus filesystem, web-fetch, and chat/ticketing servers.
For a broader MCP server list, browse an MCP marketplace or MCP server directory. Because a server runs with your credentials, verify the source before adding it.
MCP servers for Claude Code vs Claude Desktop
Both apps are MCP clients, so the same server packages work in each. The difference is where config lives: Claude Code uses the CLI or an .mcp.json, while Claude Desktop uses claude_desktop_config.json. Set a server up once and reuse the same command in either.
MCP and Figma
An MCP server for Figma lets Claude *read* design context. That is different from *generating* designs: if you want to turn prompts into editable Figma layers, Claude Design for Figma handles design generation inside Figma. For the prompt-to-design workflow, see generating Figma designs with Claude. To extend Claude Code more broadly, see Claude Code skills and plugins.
FAQ
What are MCP servers? Small programs that expose tools and data to AI clients like Claude Code and Claude Desktop over the Model Context Protocol.
What are the best MCP servers? It depends on your stack — GitHub, PostgreSQL, Figma, and Playwright cover common dev needs.
How do I configure an MCP server? Add it to the MCP config JSON (claude_desktop_config.json) or register it with claude mcp add, then restart the client.
Where is the MCP config JSON? For Claude Desktop it's claude_desktop_config.json; Claude Code uses the CLI or a project .mcp.json.
Are there MCP servers for Claude Code specifically? The same servers work; Claude Code just configures them via the CLI or .mcp.json.
Is there an MCP server for Figma or Playwright? Yes — a Figma MCP server reads design context, and a Playwright MCP server drives a browser; check their repos for setup.
Conclusion
MCP turns Claude into a client for your tools: set a server up in the config JSON or with claude mcp add, start with GitHub, PostgreSQL, Figma, or Playwright, and verify each source. To add reusable workflows on top, see Claude Code skills and plugins.
Claude Design for Figma
Describe a UI and get real, editable Figma layers — the plugin runs locally in your file. 3,000,000 tokens/month, save 51% yearly.
Get the plugin →