Skip to content
What is MCP (Model Context Protocol)?

7 Minutes

What is MCP (Model Context Protocol)?

Fix Bugs Faster! Log Collection Made Easy

Get started

MCP (Model Context Protocol) lets AI agents connect to external tools and data sources in a consistent and secure way, without any custom glue code.

We can think of the MCP as a USB-C port for AI agents.

This open protocol from Anthropic (the guys who built the Claude chatbot) enables AI applications to plug into external tools without any custom glue code. These tools include:

  • Databases.
  • APIs.
  • File systems.
  • Developer tools.

Any MCP-compatible client can plug into any compliant server, and many major AI coding tools now support MCP including Cursor, Claude Code, Codex, Gemini CLI and GitHub Copilot.

If you want to debug using AI tools, you can read the article about our Bugfender’s MCP server.

Here’s the full list of contents:

What problem does MCP solve?

Before MCP, connecting AI applications to external tools usually meant building and maintaining separate integrations for each system.

This is sometimes described as the N×M problem:

(N) AI applications × (M) external tools = too many separate integrations.

MCP helps reduce:

  • Duplicated integration work
  • Fragile connectors when APIs change
  • Lost context between tools
  • Inconsistent permission handling
  • Slower developer workflows
  • Tool switching during debugging

How the Model Context Protocol works

The Model Context Protocol works by separating the AI application from the external systems it needs to access.

Instead of connecting directly to every API, database, file system or developer tool, the AI application communicates with MCP servers through an MCP client.

MCP partWhat it does
HostThe AI application, such as Cursor, Claude Code, Codex, Gemini CLI, or GitHub Copilot.
ClientThe MCP layer inside the host that translates requests into the protocol format.
ServerThe external system that exposes data, tools, or actions to the agent.

The model does not magically know your systems. MCP gives it a controlled doorway into them.

What MCP servers expose

MCP servers expose three main types of capabilities:

CapabilityWhat it means
ToolsActions the agent can trigger, such as searching logs, creating a ticket, running a query, or checking pipeline status.
ResourcesRead-only data the agent can pull, such as files, database records, API responses, documentation, or configuration.
PromptsReusable templates that guide how the agent interacts with a specific tool or workflow.

You’ll find that most developer-focused MCP servers expose tools first, because actions are usually more valuable than passive data access during development workflows.

How an MCP request flows

A typical MCP request follows a simple sequence:

  1. We ask the agent for something that needs external data or action.
  2. The host identifies the right server based on the available MCP connections.
  3. The client sends a structured request to the MCP server.
  4. The server processes the request by reading data, calling an API, or executing an allowed action.
  5. The server returns the result in a standardized format the agent can use.

The whole process is designed to feel transparent. We ask in plain language, and the agent handles the protocol work behind the scenes.

Common MCP use cases for developers

MCP is most useful when the agent needs real development context, not just general code suggestions.

Use caseExample workflow
DebuggingInvestigate crashes, logs, errors, and failed network requests
Codebase navigationSearch repositories, inspect files, review issues, and check pull requests
Database analysisQuery Postgres, Supabase, or internal databases from the IDE
CI/CD monitoringCheck builds, deployments, test results, and pipeline failures
Documentation lookupPull SDK docs, API references, and internal wiki content into the chat

In practice, MCP keeps the agent closer to the actual engineering workflow, and greatly simplifies the file storage process (something which will come as a relief to devs who are already juggling countless tasks).

When to use MCP vs custom API integrations

MCP is usually better when the same tool needs to work across multiple AI agents or coding environments.

Custom API integrations still make sense when you need full control, one specific workflow, or a tightly optimized internal system.

Use MCP whenUse a custom API integration when
Multiple AI tools need accessOne app owns the workflow
Reusability mattersMaximum control matters
Tools change oftenThe integration is stable
Context needs to travel cleanlyLogic is highly specific
You want faster agent setupYou need custom performance tuning

The tradeoff is simple: MCP reduces repeated integration work, but it depends on having or building an MCP server. Custom APIs give more control, but every integration becomes your responsibility.

How to set up an MCP server

MCP setup depends on two things: the MCP server you want to connect and the AI client you use.

Common setup requirements include:

RequirementExamples
MCP clientCursor, Claude Code, Codex, Gemini CLI, GitHub Copilot
MCP serverGitHub MCP, Postgres MCP, Supabase MCP, Datadog MCP, Bugfender MCP
RuntimeNode.js, Python, Docker, npx, uv
AuthenticationAPI token, OAuth, personal access token
Access scopeRepositories, logs, databases, files, documentation

For example, GitHub MCP may need repository permissions. In the case of the Bugfender MCP, it may need read access to logs, crashes, issues, network data, and app environments.

After that, setup usually happens through a JSON config file, a CLI command, or a built-in MCP settings panel.

How to add an MCP server to Cursor

Cursor supports MCP servers through its built-in MCP settings or the mcp.json config file.

To add a server manually, open:

~/.cursor/mcp.json

Then add a server configuration like this:

{
  "mcpServers": {
    "your-tool": {
      "command": "npx",
      "args": [
        "-y",
        "@your-tool/mcp"
      ],
      "env": {
        "API_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

You can also manage MCP servers directly inside Cursor:

Settings → Cursor Settings → MCP

After saving the config, restart Cursor or reload MCP tools. Then run a simple test prompt to confirm the server is connected correctly.

Start with one MCP server first. Add more once the workflow feels useful.

How to add an MCP server to Claude Code

Claude Code supports MCP servers through CLI commands.

The common setup pattern is:

claude mcp add

For example:

claude mcp add your-tool -- npx -y @your-tool/mcp

If the server needs an API token, pass it as an environment variable:

claude mcp add your-tool -e API_TOKEN=YOUR_TOKEN -- npx -y @your-tool/mcp

After adding the server, restart Claude Code or start a new session. Then ask Claude to list available MCP tools or run a simple test action.

Note: use Claude Code MCP when you want terminal-based agents to access external tools during development.

MCP security considerations

MCP gives AI agents access to real systems, so permissions matter.

A well-configured MCP server should follow the principle of least privilege: only expose the minimum data and actions needed for the workflow.

Security areaBest practice
AuthenticationUse OAuth, API tokens, or scoped credentials
PermissionsStart with read-only access whenever possible
Access scopeLimit repositories, databases, logs, or environments
Local serversPrefer local execution for sensitive workflows
AuditabilityReview logs and monitor agent activity regularly

Most MCP security risks come from overly broad permissions, not from the protocol itself.

To sum up

MCP is still early, but the direction is clear: AI agents are moving from chat boxes to working interfaces.

The next step is not just better code completion. It is agents that can read logs, inspect systems, understand context, and help developers move from symptom to root cause faster.

That also raises the bar for tooling. The most useful developer tools will not just have dashboards. They will expose clean, secure, agent-readable interfaces.

MCP is one of the standards making that shift possible.

If you want to start using MCP servers inside AI tools or your IDE for debugging workflows, try Bugfender for free and connect AI agents to real logs and runtime context through our MCP server.

Frequently asked questions about Model Context Protocol (MCP)

Who created MCP?

MCP was created by Anthropic and released in November 2024. It was designed by David Soria Parra and Justin Spahr-Summers, and is maintained as an open-source protocol project with support from OpenAI, Google, and Microsoft.

Which AI agents support MCP?

Many major AI coding agents support MCP: Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and Windsurf. Claude Desktop also supports it for non-coding workflows. Support is growing fast across the ecosystem.

Is MCP safe to use with production data?

MCP supports secure authentication patterns, including OAuth-based flows and scoped credentials. You control what each server can access. Start with read-only servers and audit what data you’re exposing before connecting anything production-critical.

Do I need to build my own MCP server?

Not necessarily. There are already hundreds of MCP servers for common tools like GitHub, Slack, Postgres, and Datadog. You only need to build one if you’re connecting to an internal or proprietary system that doesn’t have an existing server.

What is the difference between MCP and function calling?

Function calling lets LLMs invoke external functions during a conversation. MCP standardizes that on top of function calling by adding a discovery layer, consistent auth, and a common message format so any agent works with any server without custom code.

Expect The Unexpected!

Debug Faster With Bugfender

Start for Free
blog author

Aleix Ventayol

Aleix Ventayol is CEO and co-founder of Bugfender, with 20 years' experience building apps and solutions for clients like AVG, Qustodio, Primavera Sound and Levi's. As a former CTO and full-stack developer, Aleix is passionate about building tools that solve the real problems of app development and help teams build better software.

Join thousands of developers
and start fixing bugs faster than ever.