What you can do with MCP
With MCP servers connected, you can ask Claude Code to:- Implement features from issue trackers: “Add the feature described in JIRA issue ENG-4521 and create a PR on GitHub.”
- Analyze monitoring data: “Check Sentry and Statsig to check the usage of the feature described in ENG-4521.”
- Query databases: “Find emails of 10 random users who used feature ENG-4521, based on our Postgres database.”
- Integrate designs: “Update our standard email template based on the new Figma designs that were posted in Slack”
- Automate workflows: “Create Gmail drafts inviting these 10 users to a feedback session about the new feature.”
Popular MCP servers
Here are some commonly used MCP servers you can connect to Claude Code:Need a specific integration? Find hundreds more MCP servers on GitHub, or build your own using the MCP SDK.
Installing MCP servers
MCP servers can be configured in three different ways depending on your needs:Option 1: Add a remote HTTP server
HTTP servers are the recommended option for connecting to remote MCP servers. This is the most widely supported transport for cloud-based services.Option 2: Add a remote SSE server
Option 3: Add a local stdio server
Stdio servers run as local processes on your machine. They’re ideal for tools that need direct system access or custom scripts.Understanding the ”—” parameter:
The
-- (double dash) separates Claude’s own CLI flags from the command and arguments that get passed to the MCP server. Everything before -- are options for Claude (like --env, --scope), and everything after -- is the actual command to run the MCP server.For example:claude mcp add --transport stdio myserver -- npx server→ runsnpx serverclaude mcp add --transport stdio myserver --env KEY=value -- python server.py --port 8080→ runspython server.py --port 8080withKEY=valuein environment
Managing your servers
Once configured, you can manage your MCP servers with these commands:Plugin-provided MCP servers
Plugins can bundle MCP servers, automatically providing tools and integrations when the plugin is enabled. Plugin MCP servers work identically to user-configured servers. How plugin MCP servers work:- Plugins define MCP servers in
.mcp.jsonat the plugin root or inline inplugin.json - When a plugin is enabled, its MCP servers start automatically
- Plugin MCP tools appear alongside manually configured MCP tools
- Plugin servers are managed through plugin installation (not
/mcpcommands)
.mcp.json at plugin root:
plugin.json:
- Automatic lifecycle: Servers start when plugin enables, but you must restart Claude Code to apply MCP server changes (enabling or disabling)
- Environment variables: Use
${CLAUDE_PLUGIN_ROOT}for plugin-relative paths - User environment access: Access to same environment variables as manually configured servers
- Multiple transport types: Support stdio, SSE, and HTTP transports (transport support may vary by server)
- Bundled distribution: Tools and servers packaged together
- Automatic setup: No manual MCP configuration needed
- Team consistency: Everyone gets the same tools when plugin is installed
MCP installation scopes
MCP servers can be configured at three different scope levels, each serving distinct purposes for managing server accessibility and sharing. Understanding these scopes helps you determine the best way to configure servers for your specific needs.Local scope
Local-scoped servers represent the default configuration level and are stored in your project-specific user settings. These servers remain private to you and are only accessible when working within the current project directory. This scope is ideal for personal development servers, experimental configurations, or servers containing sensitive credentials that shouldn’t be shared.Project scope
Project-scoped servers enable team collaboration by storing configurations in a.mcp.json file at your project’s root directory. This file is designed to be checked into version control, ensuring all team members have access to the same MCP tools and services. When you add a project-scoped server, Claude Code automatically creates or updates this file with the appropriate configuration structure.
.mcp.json file follows a standardized format:
.mcp.json files. If you need to reset these approval choices, use the claude mcp reset-project-choices command.
User scope
User-scoped servers provide cross-project accessibility, making them available across all projects on your machine while remaining private to your user account. This scope works well for personal utility servers, development tools, or services you frequently use across different projects.Choosing the right scope
Select your scope based on:- Local scope: Personal servers, experimental configurations, or sensitive credentials specific to one project
- Project scope: Team-shared servers, project-specific tools, or services required for collaboration
- User scope: Personal utilities needed across multiple projects, development tools, or frequently-used services
Scope hierarchy and precedence
MCP server configurations follow a clear precedence hierarchy. When servers with the same name exist at multiple scopes, the system resolves conflicts by prioritizing local-scoped servers first, followed by project-scoped servers, and finally user-scoped servers. This design ensures that personal configurations can override shared ones when needed.Environment variable expansion in .mcp.json
Claude Code supports environment variable expansion in .mcp.json files, allowing teams to share configurations while maintaining flexibility for machine-specific paths and sensitive values like API keys.
Supported syntax:
${VAR}- Expands to the value of environment variableVAR${VAR:-default}- Expands toVARif set, otherwise usesdefault
command- The server executable pathargs- Command-line argumentsenv- Environment variables passed to the serverurl- For HTTP server typesheaders- For HTTP server authentication
Practical examples
Example: Monitor errors with Sentry
Example: Connect to GitHub for code reviews
Example: Query your PostgreSQL database
Authenticate with remote MCP servers
Many cloud-based MCP servers require authentication. Claude Code supports OAuth 2.0 for secure connections.1
Add the server that requires authentication
For example:
2
Use the /mcp command within Claude Code
In Claude code, use the command:Then follow the steps in your browser to login.
Add MCP servers from JSON configuration
If you have a JSON configuration for an MCP server, you can add it directly:1
Add an MCP server from JSON
2
Verify the server was added
Import MCP servers from Claude Desktop
If you’ve already configured MCP servers in Claude Desktop, you can import them:1
Import servers from Claude Desktop
2
Select which servers to import
After running the command, you’ll see an interactive dialog that allows you to select which servers you want to import.
3
Verify the servers were imported
Use Claude Code as an MCP server
You can use Claude Code itself as an MCP server that other applications can connect to:MCP output limits and warnings
When MCP tools produce large outputs, Claude Code helps manage the token usage to prevent overwhelming your conversation context:- Output warning threshold: Claude Code displays a warning when any MCP tool output exceeds 10,000 tokens
- Configurable limit: You can adjust the maximum allowed MCP output tokens using the
MAX_MCP_OUTPUT_TOKENSenvironment variable - Default limit: The default maximum is 25,000 tokens
- Query large datasets or databases
- Generate detailed reports or documentation
- Process extensive log files or debugging information
Use MCP resources
MCP servers can expose resources that you can reference using @ mentions, similar to how you reference files.Reference MCP resources
1
List available resources
Type
@ in your prompt to see available resources from all connected MCP servers. Resources appear alongside files in the autocomplete menu.2
Reference a specific resource
Use the format
@server:protocol://resource/path to reference a resource:3
Multiple resource references
You can reference multiple resources in a single prompt:
Use MCP prompts as slash commands
MCP servers can expose prompts that become available as slash commands in Claude Code.Execute MCP prompts
1
Discover available prompts
Type
/ to see all available commands, including those from MCP servers. MCP prompts appear with the format /mcp__servername__promptname.2
Execute a prompt without arguments
3
Execute a prompt with arguments
Many prompts accept arguments. Pass them space-separated after the command:
Enterprise MCP configuration
For organizations that need centralized control over MCP servers, Claude Code supports enterprise-managed MCP configurations. This allows IT administrators to:- Control which MCP servers employees can access: Deploy a standardized set of approved MCP servers across the organization
- Prevent unauthorized MCP servers: Optionally restrict users from adding their own MCP servers
- Disable MCP entirely: Remove MCP functionality completely if needed
Setting up enterprise MCP configuration
System administrators can deploy an enterprise MCP configuration file alongside the managed settings file:- macOS:
/Library/Application Support/ClaudeCode/managed-mcp.json - Windows:
C:\ProgramData\ClaudeCode\managed-mcp.json - Linux:
/etc/claude-code/managed-mcp.json
managed-mcp.json file uses the same format as a standard .mcp.json file:
Restricting MCP servers with allowlists and denylists
In addition to providing enterprise-managed servers, administrators can control which MCP servers users are allowed to configure usingallowedMcpServers and deniedMcpServers in the managed-settings.json file:
- macOS:
/Library/Application Support/ClaudeCode/managed-settings.json - Windows:
C:\ProgramData\ClaudeCode\managed-settings.json - Linux:
/etc/claude-code/managed-settings.json
allowedMcpServers):
undefined(default): No restrictions - users can configure any MCP server- Empty array
[]: Complete lockdown - users cannot configure any MCP servers - List of server names: Users can only configure the specified servers
deniedMcpServers):
undefined(default): No servers are blocked- Empty array
[]: No servers are blocked - List of server names: Specified servers are explicitly blocked across all scopes
- These restrictions apply to all scopes: user, project, local, and even enterprise servers from
managed-mcp.json - Denylist takes absolute precedence: If a server appears in both lists, it will be blocked
Enterprise configuration precedence: The enterprise MCP configuration has the highest precedence and cannot be overridden by user, local, or project configurations.