MCP: How to Connect Claude with Your Tools

By Ricardo Gutierrez · · 18 min read

In this article

  1. What is MCP
  2. How it works: servers and tools
  3. Configure your first MCP server
  4. The 10 most useful MCP servers
  5. MCP vs function calling
  6. Security: what permissions to grant
  7. Debugging: when an MCP doesn't work
  8. Example: complete workflow with 3 MCPs
  9. FAQ

Quick summary

Complete guide to MCP (Model Context Protocol): connect Claude Code with GitHub, databases, Slack and 100+ tools.

What is MCP

MCP (Model Context Protocol) is an open protocol that allows AI models to connect with external tools. Think of it as USB for AI: a universal standard to plug in any tool.

Team experience: I have 12 MCPs configured in my Claude Code environment: Supabase, GitHub, Docker, Obsidian, Gmail, Google Calendar, n8n, Zapier, filesystem, Exa, Tavily and more. Each MCP you configure is a new capability that Claude Code can use autonomously.

Without MCP, Claude Code can only read files and execute commands in your terminal. With MCP, it can access GitHub, query databases, browse the web, send Slack messages, and much more. For more details, check our guide on MCP + GitHub: automate repositories with Claude.

Anthropic launched MCP as an open standard in late 2024, and since then the ecosystem has grown exponentially. As of May 2026, there are over 100 official and community MCP servers, covering everything from databases to design tools. The key point is that any developer can create an MCP server for their own API or service, making the protocol extensible without depending on Anthropic.

The key concept is that MCP separates the model's intelligence (Claude) from action capabilities (tools). Claude reasons about what to do; MCP servers execute the actions. This allows the same model to adapt to any environment simply by changing which servers are connected.

How it works: servers and tools

Claude Code (MCP Client) MCP Server: GitHub MCP Server: Postgres MCP Server: Slack GitHub API PostgreSQL Slack API
MCP Architecture: Client > Servers > External APIs

Each MCP Server exposes "tools" that Claude Code can use. For example, the GitHub server exposes tools like create_issue, list_pull_requests, search_code.

Claude Code discovers available tools automatically and uses them when needed to complete your task.

The internal flow works like this: when you start Claude Code, it launches all configured MCP servers as local processes. Each server communicates with Claude Code via JSON-RPC over stdio. Upon receiving your prompt, Claude analyzes available tools from all servers and decides which ones it needs to complete the task. If it needs GitHub data and then needs to post to Slack, it executes the calls in sequence, processing each response before deciding the next step.

A detail that isn't obvious: MCP servers run on your local machine. Tokens and credentials never leave your environment. Claude Code only receives the results of the calls, not your credentials. This is fundamental for security, especially if you work with sensitive data or in regulated environments.

Configure your first MCP server

Configuration goes in .claude/settings.json:

{
 "mcpServers": {
 "github": {
 "command": "npx",
 "args": ["-y", "@modelcontextprotocol/server-github"],
 "env": {
 "GITHUB_TOKEN": "ghp_tu_token_aqui"
 }
 }
 }
}

With this, Claude Code can create issues, read PRs, search code and manage repos. All from your terminal.

Let's see another practical example. To configure the Supabase server, which lets you query and modify databases directly:

{
 "mcpServers": {
 "supabase": {
 "command": "npx",
 "args": ["-y", "@supabase/mcp-server"],
 "env": {
 "SUPABASE_ACCESS_TOKEN": "sbp_tu_token_aqui"
 }
 }
 }
}

For the filesystem server, which lets Claude Code access directories outside the current project:

{
 "mcpServers": {
 "filesystem": {
 "command": "npx",
 "args": ["-y", "@modelcontextprotocol/server-filesystem",
          "/ruta/a/directorio1", "/ruta/a/directorio2"]
 }
 }
}

You can combine multiple servers in the same settings.json. Claude Code launches them all at startup and has access to all tools from all servers simultaneously.

The 10 most useful MCP servers

  1. GitHub: issues, PRs, code search, repos. The most used by far. Lets Claude Code create complete PRs, review code and manage projects without leaving the terminal.
  2. PostgreSQL: direct SQL queries against your database. Ideal for debugging, schema verification and data analysis during development.
  3. Filesystem: access to files outside the current directory. Necessary when working with monorepos or needing to read configurations from other projects.
  4. Browser (Puppeteer): web browsing, screenshots, scraping. Lets Claude verify deploys, take screenshots for documentation or extract data from websites.
  5. Slack: send messages, read channels. Perfect for integrating automatic notifications into development workflows.
  6. Supabase: database + auth + storage. One of the most complete integrations: query tables, manage migrations, verify RLS policies.
  7. Docker: manage containers. Start, stop, inspect container logs without switching windows.
  8. Google Calendar: create and query events. Useful for scheduling meetings or checking availability within automated workflows.
  9. Exa: semantic web search (Google alternative). Returns more relevant results for technical queries than traditional search engines.
  10. Obsidian: read and write notes (second brain). Lets Claude Code access your personal knowledge base for additional context.

Beyond these 10, there are servers for Notion, Gmail, Google Drive, Airtable, n8n, Zapier, Tavily (web search), HubSpot, Figma, Sentry and dozens more. Anthropic's official GitHub repository (modelcontextprotocol/servers) maintains an updated catalog. The community also publishes servers on npm with the @modelcontextprotocol/ prefix.

MCP vs function calling

If you've already worked with the OpenAI or Anthropic API, you know the concept of "function calling": you define functions in the system prompt and the model invokes them when needed. MCP goes a step further.

Function calling requires the developer to manually define each function in the prompt, handle execution on the client side and forward results back to the model. It's an API-level protocol: you write the code that connects each tool.

MCP is an infrastructure-level protocol. MCP servers are self-describing: they expose their tools with names, descriptions and parameter schemas. Claude Code discovers them automatically. You don't need to write integration code for each tool.

The main differences:

In practice: if you're building an application with the Anthropic API, you'll use function calling. If you're using Claude Code as a development tool, you'll use MCP. They're not mutually exclusive, but they serve different scenarios.

Security: what permissions to grant

MCP is powerful but requires care. An MCP server with database access can read and write data.

MCP security rules

Principle of least privilege: only grant the permissions you need. If you only need to read repos, don't give write permission.

Dedicated tokens: create MCP-specific tokens, never use your main personal token.

Tool review: when Claude Code wants to use a new tool, it will ask for confirmation. Read it before approving.

No sensitive data: don't connect production databases with customer data through MCP without proper precautions.

Additional recommendations for professional environments:

Debugging: when an MCP doesn't work

Setting up MCP usually goes well, but when it fails it can be frustrating because errors aren't always clear. Here are the most common problems and how to solve them.

Server doesn't start: verify the npm package is installed correctly. Run the server command manually in your terminal to see if there are errors. For example: npx -y @modelcontextprotocol/server-github should start without errors if you have Node.js and the correct dependencies.

Authentication error: the token you configured in env is incorrect, expired or doesn't have the necessary scopes. Verify the token on the corresponding platform (GitHub Settings, Supabase Dashboard, etc.).

Tools don't appear: Claude Code discovers tools at startup. If you modify settings.json while Claude Code is already running, you need to restart the session. Close and run claude again.

Call timeouts: some MCP servers (especially those doing web scraping or heavy database queries) may take longer than expected. If Claude Code reports a timeout, verify the external service responds correctly and there are no network issues.

Server conflicts: if two servers expose tools with similar names, Claude Code can get confused. Name your servers descriptively in settings.json and avoid duplicating functionality.

# Verificar que un servidor MCP arranca correctamente
npx -y @modelcontextprotocol/server-github 2>&1 | head -5

# Ver logs de Claude Code para debugging
# Claude Code muestra errores de MCP al inicio de la sesión
# Si ves "MCP server failed to start", revisa el comando y env

Example: complete workflow with 3 MCPs

Scenario: you want Claude Code to review a PR, query the database to verify the schema, and publish a summary on Slack.

# Configuración
{
 "mcpServers": {
 "github": { ... },
 "postgres": { ... },
 "slack": { ... }
 }
}

# Prompt
"Lee el PR #42, verifica que los cambios en el schema
son compatibles con la base de datos actual, y publica
un resumen en #code-reviews de Slack."

Claude Code will execute:

  1. Read the PR #42 diff via GitHub MCP
  2. Query the current schema via PostgreSQL MCP
  3. Compare changes and detect incompatibilities
  4. Publish summary on Slack via Slack MCP

All in a single instruction. Without switching tools.

Another practical example: deploy verification. You configure the Docker and Slack servers. You ask Claude Code: "verify all containers are healthy after the deploy and publish the status to #devops". Claude Code runs docker_container_stats via the Docker MCP, analyzes the results and publishes a formatted summary on Slack with each service's status.

A third case: research with Exa + Obsidian. You ask Claude to investigate the latest vulnerabilities of a specific framework, use the Exa MCP to search the web, and save a structured summary in your Obsidian vault with tags and links. In a single conversation, you generate an intelligence note ready to consult.

FAQ

How many MCP servers can I have active at once?

There's no strict limit, but each server consumes resources (memory, processes). In practice, 10-15 servers work without issues on a machine with 8 GB of RAM. If you notice slowness when starting Claude Code, reduce the number of servers or disable those you don't use frequently.

Can I create my own MCP server?

Yes. The MCP SDK is available in TypeScript and Python. If you have an internal API or your own service, you can create an MCP server that exposes it to Claude Code. Anthropic publishes the complete specification and examples in the modelcontextprotocol/sdk repository.

Does MCP only work with Claude Code?

MCP works with Claude Code, Claude Desktop and any client that implements the protocol. Other editors and tools are starting to adopt the standard. The protocol is open, so anyone can build an MCP client.

What happens if an MCP server fails during a task?

Claude Code handles errors gracefully. If a server doesn't respond, Claude tells you and looks for alternatives. It doesn't lose the conversation context. You can restart the problematic server and ask it to retry the failed operation.

Master MCP and connectivity

Module 05 covers MCP in depth: configuration, 10+ servers, security and connected workflows.

See the full course