Magento 2 Experten — Hyvä Theme, Tailwind CSS & SEO aus einer Hand ›

Connecting MCP Servers: External Tools and Data Sources

Connecting MCP Servers: External Tools and Data Sources

~7 Min. Lesezeit Zuletzt aktualisiert am August 8, 2026

The tools from block 2 - Read, Grep, Glob, Edit, Write, Bash - cover everything that happens inside your own project folder. But sometimes Claude Code needs to work with something outside of it: an external service, a database, an API. That's exactly what MCP (Model Context Protocol) is for - an open standard that lets you connect external tools and data sources to Claude Code as additional tools.

What an MCP server is

An MCP server is a small, standalone program that exposes a certain capability or data source following the MCP standard - for example, access to an external ticketing system, a database, or a nutrition-data API. Claude Code connects to such a server and thereby gains new, additional tools, just like it already uses Read or Bash internally.

An example for the recipe planner

Suppose the recipe planner should also show rough nutrition information for each recipe in the future. Without MCP you'd have to build the connection to a suitable service yourself before Claude Code could even work with it. With a fitting MCP server, on the other hand, Claude Code can access it directly once it's set up - for example to look up nutrition data for an ingredient and automatically fill it into a new field on the recipe.

Setting up an MCP server

An MCP server is set up through a configuration that Claude Code reads when the project starts - typically with a name for the server, the command used to start it, and any credentials it needs. Conceptually, such a configuration looks roughly like this (exact details depend on the specific server):

rezept-planer/.mcp.json
{
  "mcpServers": {
    "nutrition-data": {
      "command": "npx",
      "args": ["-y", "@example/nutrition-mcp-server"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}

Once set up, the tools provided by the server automatically become available in Claude Code sessions within the project, and you can address them in plain language: "Look up roughly how many calories 100g of lentils has, and add it to the recipe."

Achtung: An MCP server runs with the same permissions as Claude Code itself, and depending on the kind of server, may get access to sensitive data or external services. Only connect MCP servers from a trustworthy source, and treat any credentials stored for them (API keys and similar) with the same care as anywhere else.

When MCP is worth it

  • When a task regularly needs data from an external system that isn't part of the project folder.
  • When the same external connection should be reused across several projects.
  • Not when a one-off, manual lookup is enough - a normal prompt with the existing tools covers that.

So MCP extends what Claude Code can do at all. The next chapter covers a different kind of extension: hooks, which automatically trigger certain actions on defined events.