How to Install MCP Servers in Claude Code: The Complete Guide
Three ways to add MCP servers to Claude Code, from one-command installs to full manual configuration
What are MCP Servers?
MCP stands for Model Context Protocol. It is an open standard that lets AI agents connect to external tools and services through a structured interface. An MCP server is a small program that exposes capabilities (like querying a database, managing files, or calling an API) as typed tools that an agent can call. Think of each MCP server as a plugin that gives your agent a new superpower.
For Claude Code users, MCP servers are the primary way to extend what your agent can do beyond reading and writing code. Want Claude Code to query your Supabase database directly? There is an MCP server for that. Want it to control a browser, run Playwright tests, or manage your GitHub repos? All MCP servers. Installing them is straightforward once you know how, and this guide covers every method.
Method 1: The Quick Way (Loaditout CLI)
The fastest way to install an MCP server in Claude Code is with the Loaditout CLI. First, search for the server you need. For example, if you want a Postgres-related server:
npx loaditout search postgresThis returns a list of matching MCP servers from the Loaditout registry, which indexes over 2,600 servers. Once you find the one you want, install it with a single command:
npx loaditout add supabase/mcpThat is it. The CLI writes the correct configuration directly to your .claude/settings.json file, including the command, arguments, and any required environment variable placeholders. No manual editing, no typos, no guessing at the right JSON structure. One command, done. You can start using the new MCP server in your next Claude Code session immediately.
Method 2: Manual Configuration
If you prefer full control, you can configure MCP servers by hand. Open the .claude/settings.json file in your project root. If it does not exist yet, create it. This is the file where Claude Code reads its MCP server configuration.
Add an mcpServers block to the JSON. Each key is the name you want to give the server, and the value describes how to run it. Here is a complete example that adds the Supabase MCP server:
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server"
],
"env": {
"SUPABASE_ACCESS_TOKEN": "your-token-here"
}
}
}
}Most MCP servers use the stdio transport, which means Claude Code launches the server as a subprocess and communicates over standard input/output. This is the default and what you see above: a command with args. Some servers use HTTP transport instead, where the server runs independently and Claude Code connects to it over a URL. For HTTP servers, you would specify a url field pointing to the server's endpoint.
Manual configuration gives you the most flexibility. You can set custom environment variables, override default arguments, or configure servers that are not yet listed in any registry. The tradeoff is that you need to look up the correct command, arguments, and env vars yourself.
Method 3: Use the Loaditout MCP Server
Here is the most powerful approach. Instead of installing MCP servers yourself, you can give Claude Code the ability to search for and install them on its own. The Loaditout MCP server is a meta-server: it exposes the Loaditout registry as tools that your agent can call directly. Your agent can search for servers, read their details, and install them, all within a conversation.
To set this up, add the Loaditout MCP server to your config:
{
"mcpServers": {
"loaditout": {
"command": "npx",
"args": [
"-y",
"loaditout",
"mcp"
]
}
}
}Once installed, your agent gains the ability to browse over 2,600 MCP servers and skills without you lifting a finger. Just tell Claude Code something like “I need a server for managing GitHub issues” and it will search, find, and install the right one. This is especially useful for teams where developers want to discover and add capabilities on the fly without leaving their workflow.
Finding MCP Servers
The Loaditout registry at loaditout.ai/skills?type=mcp-tool indexes over 2,600 MCP servers and counting. You can browse by category (databases, browser automation, DevOps, cloud platforms, and more) or search by keyword to find exactly what you need. Every server listing includes a description, author information, and a copy-paste install command.
From the command line, use npx loaditout search <keyword> to search without leaving your terminal. Whether you are looking for a database connector, a testing framework integration, or a deployment tool, the registry is the fastest way to find a compatible MCP server with a verified install path.
Troubleshooting Common Issues
- “MCP server not found” - Double-check the command path. Make sure the package name is spelled correctly and that the binary is available on your system. Run the command manually in your terminal to verify it works outside of Claude Code.
- “Connection refused” - For HTTP transport servers, ensure the server process is actually running before starting Claude Code. Check the port number and confirm no firewall rules are blocking the connection.
- “Permission denied” - This usually means a missing or invalid environment variable. Check that all required
envvalues in your config are set correctly. API tokens and access keys are the most common culprit. - Server starts but tools are not available - Restart your Claude Code session after modifying
.claude/settings.json. Changes to MCP configuration only take effect on session start. - Slow server startup - Some MCP servers need to download dependencies on first run (especially those using
npx -y). The first launch may take longer than expected. Subsequent launches will be faster.
Recommended MCP Servers to Start With
If you are new to MCP servers, here are some popular ones to try first:
- GitHub MCP - Manage repositories, issues, pull requests, and more directly from Claude Code. Essential for any developer workflow.
- Browser Use - Give your agent the ability to navigate web pages, fill out forms, and extract data from live websites.
- Supabase MCP - Query and manage your Supabase database tables, run SQL, and interact with your backend without switching tools.
- Playwright MCP - Run end-to-end browser tests, take screenshots, and automate testing workflows from within your agent session.
Each of these can be installed with a single npx loaditout add command, or configured manually using the examples above. Browse the full catalog at loaditout.ai/skills.