How to add an MCP server to Claude Code
This guide adds MCP servers to Claude Code, using Playwright MCP, Figma MCP Server and Firecrawl MCP Server as examples. Playwright MCP runs locally, Figma MCP Server is hosted and connects by URL, and Firecrawl MCP Server runs locally and can take an API key. By the end you will have seen the command and the config file for each, and how to confirm Claude Code loaded them. The commands come from each listing's install data, and the paths come from Claude Code's own documentation.
Updated Oct 26, 2026 · Built from catalog data; how we rank and grade
Checked against Claude Code's documentation on Oct 26, 2026. Commands and config blocks are generated from the same install data as each listing page.
Before you start
- Claude Code installed and able to start.
- Node.js with npx for local servers that run through npx (check with node --version), or the runtime the server's listing names.
- An API key or account only for servers that need one; hosted servers that sign in with OAuth need an account with that service.
1. Choose a server and see what it needs
Settle two things before typing a command: whether the server needs a key, and how widely Claude Code should share it. The scope you pick decides where the entry is stored.
- Playwright MCP: runs locally, no key needed.
- Figma MCP Server: hosted, connect by URL, no key needed.
- Firecrawl MCP Server: runs locally, can take FIRECRAWL_API_KEY.
- Where Claude Code can keep a server: local (the default, only you in this project), project (shared through .mcp.json) and user (you, every project).
2. Add a local server (Playwright MCP)
Playwright MCP goes in with
claude mcp add, with its launch command after a double dash. The JSON form is the alternative when you want the entry to travel with the project.Add it for you in every project claude mcp add --transport stdio --scope user playwright-mcp -- npx -y @playwright/mcp@0.0.82Or share it with the project: put this in .mcp.json at the project root .mcp.json{ "mcpServers": { "playwright-mcp": { "command": "npx", "args": [ "-y", "@playwright/mcp@0.0.82" ] } } }3. Add a remote server (Figma MCP Server)
Figma MCP Server uses the http transport, so the command takes a URL where the local one took a launch command. The file version records the same URL with a type field.
Add it for you in every project claude mcp add --transport http --scope user figma https://mcp.figma.com/mcpOr share it with the project: put this in .mcp.json at the project root .mcp.json{ "mcpServers": { "figma": { "type": "http", "url": "https://mcp.figma.com/mcp" } } }- If the server asks you to sign in, open /mcp inside Claude Code and choose Authenticate, or run claude mcp login with the server name.
4. Keep API keys out of the file (Firecrawl MCP Server)
Firecrawl MCP Server is the only example here that takes a key. You can pass it with the command, or keep the file clean by pointing to an environment variable and exporting that variable in your shell.
Add it for you in every project claude mcp add --transport stdio --env FIRECRAWL_API_KEY=YOUR_FIRECRAWL_API_KEY --scope user firecrawl-mcp-server -- npx -y firecrawl-mcp@3.34.1Or share it with the project: put this in .mcp.json at the project root .mcp.json{ "mcpServers": { "firecrawl-mcp-server": { "command": "npx", "args": [ "-y", "firecrawl-mcp@3.34.1" ], "env": { "FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}" } } } }Set the variable in the shell you start the host from export FIRECRAWL_API_KEY="paste-your-value-here"- Config values accept ${VAR} and ${VAR:-default}, so a key can stay in your shell environment. An unset variable with no default keeps the literal text and shows a warning in claude mcp list.
- The command keeps the value in ~/.claude.json; the .mcp.json version refers to an environment variable, so nothing secret is committed.
- FIRECRAWL_API_KEY (optional): Your API key for Firecrawl.
5. Restart or reload if the server does not appear
Use this step when the server is missing from the list after you add it. It covers what happens at startup and for servers that come from a shared project file.
- The docs do not say a restart is needed after claude mcp add. Servers connect at startup and can be reconnected from the /mcp menu.
- In an interactive session Claude Code asks you to approve servers from a project .mcp.json before it uses them; claude mcp reset-project-choices resets those answers.
Check that it works
Claude Code can list its servers from the shell or from inside a session, and the list tells you whether each one connected.
claude mcp list- Run claude mcp list from the shell, or /mcp inside a session. The list shows each server as Connected, Needs authentication, Failed to connect, or Pending approval.
Troubleshooting
- Error: MCP server has a "url" but no "type"
- Add "type": "http" (or sse) to the entry in the JSON file. Source
- MCP server already exists in local config
- Remove it from the other scope first with claude mcp remove <name> --scope <scope>, then add it again. Source
- A ${VAR} in the config stays literal
- The variable is unset. Export it before starting Claude Code or give it a default with ${VAR:-default}; claude mcp list shows a warning. Source
- Server shows disconnected in a session
- Open /mcp and reconnect it. Source
Security notes
- A local server runs with your user account's permissions and can do whatever you can on that machine; read what it does before you add it (MCP's security guidance says the same).
- A remote server receives what the agent sends it. Check who runs it and what the service does with your data.
- Config values accept ${VAR} and ${VAR:-default}, so a key can stay in your shell environment. An unset variable with no default keeps the literal text and shows a warning in claude mcp list.
- Agent Market does not grade security yet, so a listing page shows no security grade today; read the server's source and permissions yourself (see How we grade security).
Servers and skills in this guide
From here you can browse the listings that name Claude Code as a supported host, or open a guide for one specific tool.
- 1Playwright MCP
microsoftOfficial
Playwright Tools.
★ 38.6KLast active Oct 22, 2026Local (stdio)Claude Code, Codex, VS Code, Cursor +2
AFreshness: A–Security: not graded yet - 2Figma MCP Server
mcp.figma.comOfficial
The Figma MCP server brings Figma design context directly into your AI workflow.
★ 2.1KLast active Oct 20, 2026Remote (HTTP)Claude Code, VS Code, Cursor, Windsurf
AFreshness: A–Security: not graded yet - 3Firecrawl MCP Server
firecrawlOfficial
Firecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
★ 7.7KLast active Oct 23, 2026Local (stdio), Remote (HTTP)Claude Code, VS Code, Codex, Cursor +2
AFreshness: A–Security: not graded yet
Related
- Install guideHow to install Agent Skills in Claude Code
- Install guideHow to connect Figma to Claude Code
- Install guideHow to connect GitHub to Claude Code
- Install guideHow to connect Unity to Claude Code
- Install guideHow to connect Kubernetes to Claude Code
- Host guideAdd-ons for Claude Code
- Install guideHow to add an MCP server to Codex
- Install guideHow to add an MCP server to Cursor
- Install guideHow to add an MCP server to VS Code
- Install guideRemote vs local MCP servers: how to choose
Sources
- Connect Claude Code to tools via MCP · fetched Oct 26, 2026
Cite this page
How to add an MCP server to Claude Code. Agent Mart. https://agentmart.dev/guides/add-mcp-server-claude-code (last updated 2026-10-26)