Use claude mcp to Add and Manage MCP Servers Without Editing JSON
Adding MCP servers by editing JSON files works, but the claude mcp command is faster and less error-prone — no mismatched brackets or typos in config keys.
# Add an MCP server to your project
claude mcp add my-docs npx -y @modelcontextprotocol/server-filesystem ./docs
That's it — one command, and the server is configured. Claude Code will have access to it in your next session.
List all configured servers to see what's available:
claude mcp list
Remove a server you no longer need:
claude mcp remove my-docs
You can scope servers to different levels:
# Project-level — shared with your team via git
claude mcp add --scope project postgres npx @modelcontextprotocol/server-postgres
# User-level — available across all your projects
claude mcp add --scope user github npx @modelcontextprotocol/server-github
# Local-level — just for this machine, not in git
claude mcp add --scope local my-private-tool npx my-private-mcp-server
For servers that need environment variables:
claude mcp add --env API_KEY=your-key my-api npx my-api-server
A few practical setups:
# File system access for documentation
claude mcp add docs npx -y @modelcontextprotocol/server-filesystem ./docs
# GitHub integration
claude mcp add github npx -y @modelcontextprotocol/server-github
# Database access
claude mcp add postgres npx -y @modelcontextprotocol/server-postgres
# Memory for persistent context
claude mcp add memory npx -y @modelcontextprotocol/server-memory
After adding a server, restart your Claude Code session for it to take effect. The server appears alongside Claude's built-in tools — no extra configuration needed.
Managing MCP servers should be as easy as installing packages — claude mcp add makes it one command instead of a JSON editing session.
via Claude Code
Log in to leave a comment.
MCP servers aren't just for third-party integrations — you can build your own to give Claude direct access to your internal tools, databases, APIs, and workflows. A custom MCP server turns any system your team uses into a tool Claude can call natively from your session.
MCP servers can be scoped at three levels — user (available everywhere you work), project (shared with the team via version control), or enterprise (managed by your organization). Pick the right scope so each project gets exactly the tools it needs without cluttering unrelated ones.
Add MCP servers to Claude Code so it can directly query your database, search documentation, check monitoring dashboards, or interact with any external service — extending what Claude can do far beyond reading files and running commands.