MCP Servers on Claude Code: What They Are and How to Use (2026 Guide)
You're using Claude Code to write code, but every time you need to query the database, check a payment on Stripe, or check a pull request on GitHub, you need to exit Claude Code, open another tool, copy the data, and come back. This breaks the workflow and consumes time.
O MCP (Model Context Protocol)solves exactly this problem. It allows Claude Code to connect directly to external tools and services, without you having to leave the terminal. Claude Code queries the bank, processes payments, reads repositories -- all within the same session.
In this guide, you will understand what MCP is, how to configure it, which servers are available and how to use it in practice with Supabase, Stripe, GitHub and other services.
1. What is MCP (Model Context Protocol)
MCP and aopen protocolcreated by Anthropic that standardizes how AI models connect to external tools and data sources. Think of it as USB-C for AI: a universal interface that allows Claude Code to “plug in” to any service that implements the protocol.
Technical definition:MCP (Model Context Protocol) is a client-server protocol where Claude Code acts as a client and external tools act as servers. Each server exposes a set of tools (functions) that Claude Code can call during a session. Communication takes place via JSON-RPC over stdio or HTTP.
Before MCP, integrating Claude Code with external tools required workarounds: running CLI commands, parsing outputs, copying data manually. With MCP, integration is native. Claude Code knows which tools are available, which tometers each one accepts and how to interpret the results.
The simplest analogy
Imagine that Claude Code is a professional sitting at a desk. Without MCP, it only has access to files on the table (your local project). With MCP, he gets a phone with a direct line to the database, the payment system, the code repository and any other department. He calls, asks for information, receives it and continues working -- without leaving the table.
Protocol components
MCP works with three main components:
- MCPClient:the Claude Code. It sends requests to the servers and processes the responses
- MCPServer:a process that exposes tools for a specific service. Example: Supabase's MCP server exposes tools to query tables, execute SQL, list migrations
- Transport:the communication channel between client and server. Can be stdio (local process) or HTTP (remote server)
2. How MCP works in the Claude Code architecture
When you configure an MCP server on Claude Code, the following happens:
- Initialization:When starting Claude Code, it reads the file
.mcp.jsonand starts the processes of the configured MCP servers - Discovery:Claude Code asks each server what tools it offers. The server responds with a list of functions, tometers and descriptions
- Availability:the tools are available for Claude Code to use during the session, as if they were native functions
- Execution:When Claude Code decides that it needs a tool (for example, querying the bank), it sends a request to the MCP server, which executes the action and returns the result
[MCP] Iniciando server: supabase
[MCP] Iniciando server: github
# 2. Discovery: Claude descobre as tools disponiveis
[MCP:supabase] Tools: execute_sql, list_tables, get_project
[MCP:github] Tools: create_issue, list_prs, get_file
# 3. Voce pede algo que requer dados externos
> quantos usuarios se cadastraram ontem?
# 4. Claude usa a tool MCP automaticamente
[MCP:supabase] execute_sql("SELECT COUNT(*) FROM users WHERE created_at >= '2026-04-01'")
Ontem, 47 novos usuarios se cadastraram no sistema.
The important point: you don't need to tell Claude Code "use Supabase's MCP". It automatically identifies that it needs data from the bank and uses the appropriate tool. The experience is transparent.
3. MCP servers vs skills: what's the difference
This is a common doubt. Both extend Claude Code's capabilities, but in fundamentally different ways:
| Aspect | MCP Servers | Skills |
|---|---|---|
| What they provide | Tools (actions executable in external services) | Expert knowledge and instructions |
| Analogy | Tools on the bench (hammer, wrench, drill) | Expert manual (how to use each tool) |
| Example | Execute SQL on Supabase, create charges on Stripe | Know how to structure optimized queries, how to model data |
| Settings | File.mcp.json | Files.md em .claude/commands/ |
| Requires credentials | Yes (API keys, tokens) | Nao |
| Perform external actions | Sim | No (just instructs Claude) |
In practice,skills and MCP servers are complementary. A "database architect" skill teaches Claude Code the best data modeling practices. Supabase's MCP server allows it to execute these queries directly in the database. Together, you have a Claude Code who knows what to do and has access to do it.
Powerful combination:skillsDev packageinclude instructions for Supabase, Stripe, REST APIs, and more. When combined with the corresponding MCP servers, Claude Code becomes a full-stack developer with direct access to the entire infrastructure.
4. Configuring .mcp.json step by step
The configuration of MCP servers is done in the file.mcp.json. You can configure it in two scopes:
- Project:
.mcp.jsonin the root of the project (versioned in git, shared with the team) - Global:
~/.claude/.mcp.json(available in all projects)
Basic file structure
Complete example with Supabase
Example with multiple servers
After saving the file, restart Claude Code. It will start the servers automatically and you will see the available tools.
Checking if the servers are active
3 MCP servers ativos:
- supabase (12 tools)
- github (15 tools)
- stripe (8 tools)
Use all this potential with ready-made skills
Each Claude upgrade makes his skills even more powerful. The Mega Bundle comes with the latest news — 748+ skills updated, tested and ready to use in Claude Code.
Ver Skills Atualizadas — $95. 7 most used MCP servers in 2026
The MCP ecosystem has grown rapidly. These are the servers most used by the community:
| Server | What it does | npm package |
|---|---|---|
| Supabase | SQL, tables, migrations, edge functions, auth | @supabase/mcp-server |
| GitHub | Issues, PRs, repos, actions, code search | @modelcontextprotocol/server-github |
| Stripe | Customers, charges, subscriptions, invoices | @stripe/mcp-server |
| Slack | Messages, channels, threads, search | @modelcontextprotocol/server-slack |
| Filesystem | Expanded access to files outside the project | @modelcontextprotocol/server-filesystem |
| PostgreSQL | Direct connection to any PostgreSQL database | @modelcontextprotocol/server-postgres |
| Brave Search | Real-time web search | @modelcontextprotocol/server-brave-search |
In addition to these, there are MCP servers for Notion, Linear, Jira, Google Drive, AWS and dozens of other services. The official Anthropic repository lists all verified servers.
6. Practical examples: Supabase, Stripe and GitHub
Example 1: Supabase — query data and create migrations
[MCP:supabase] list_tables()
Tabelas encontradas: users, products, orders, payments, sessions
> quantos pedidos foram feitos nos ultimos 7 dias? agrupe por status
[MCP:supabase] execute_sql("SELECT status, COUNT(*) as total FROM orders WHERE created_at >= NOW() - INTERVAL '7 days' GROUP BY status ORDER BY total DESC")
Pedidos nos ultimos 7 dias:
completed: 234
pending: 18
cancelled: 7
> crie uma migration to adicionar uma coluna "phone" na tabela users
[MCP:supabase] apply_migration("ALTER TABLE users ADD COLUMN phone TEXT;")
Migration aplicada com sucesso.
Example 2: Stripe — verify payments and create products
[MCP:stripe] list_charges({limit: 5})
Ultimos pagamentos:
$9.00 - joao@email.com - 2 abr 2026 (succeeded)
$9.00 - maria@email.com - 2 abr 2026 (succeeded)
$9.00 - pedro@email.com - 1 abr 2026 (succeeded)
...
> crie um produto "Pacote Enterprise" por $97 com checkout link
[MCP:stripe] create_product({name: "Pacote Enterprise", ...})
[MCP:stripe] create_price({unit_amount: 19700, currency: "brl", ...})
Produto criado. Checkout link: https://buy.stripe.com/...
Example 3: GitHub — manage issues and PRs
[MCP:github] list_pull_requests({state: "open", labels: ["bug"]})
3 PRs abertos com label "bug":
#142 - Fix payment webhook timeout
#138 - Resolve CSS overflow on mobile
#135 - Fix date parsing in reports
> crie uma issue to rastrear o bug do checkout no Safari
[MCP:github] create_issue({title: "Bug: checkout falha no Safari 18", body: "...", labels: ["bug", "high-priority"]})
Issue #143 criada com sucesso.
7. How to create your own MCP server
If you have an internal API or a service that does not have an official MCP server, you can create your own. The SDK is available in TypeScript andPython.
Basic structure in TypeScript
Basic structure in Python
After creating the server, configure it in.mcp.json:
8. Good practices and safety
Credential security
- Never commit credentials in git.Use environment variables or a file
.envlocation referenced in.mcp.json - Use tokens with minimal permissions.Supabase's MCP server does not need a token with permission to delete projects. Create tokens with limited scope
- Rotate tokens periodically.Especially in production environments
- Add
.mcp.jsonao.gitignoreif it contains tokens directly (instead of environment variables)
Performance
- Set up only the servers you need.Each server consumes resources. If you don't use Slack, don't configure Slack MCP
- Use project scope.Global MCP servers start on all projects. Prefer per-project configuration when possible
- Monitor token consumption.Each MCP call adds context to the conversation. SQL queries that return 10,000 rows will consume a lot of tokens
Organization
- Document your MCP servers.If you created a costm server, include a README in the directory explaining what it does and how to configure it
- Use descriptive names.
"db-producao"and better than"server1" - Setote environments.Have different configurations for development and production
Claude evolves. Your skills too.
It's not enough to have the most advanced tool — you need to know how to use it. Skills are professional shortcuts that transform Claude into an expert. 748+ skills, 7 categories, $9.
Quero as Skills — $9FAQ
MCP (Model Context Protocol) is an open protocol created by Anthropic that allows Claude Code to connect to external tools and services in a standardized way. Instead of AI just reading and writing local files, MCP allows it to interact directly with databases (Supabase), payment processors (Stripe), repositories (GitHub), communication platforms (Slack) and any other service that implements the protocol.
MCP servers provide tools -- actions that Claude Code can perform on external services, such as querying a database or creating a record on Stripe. Skills provide specialized knowledge and instruction -- like an expert manual that Claude follows. In practice, skills tell Claude HOW to think and act; MCP servers give it ACCESS to perform actions on external systems. The two are complementary. Packages likeminhakills.iooffer hundreds of ready-made skills that work perfectly with MCP servers.
You configure MCP servers by creating or editing the file.mcp.jsonin the root of your project (for project scope) or in~/.claude/.mcp.json(for global scope). The file defines each server with its execution command, arguments and environment variables. After saving the file, restart Claude Code and the servers will be available automatically. Claude Code shows which tools each server offers during startup.