MCP-Server in-house: Agents with their own knowledge fed
Coding agents are only as good as their context. MCP — the Model Context Protocol — is the standardized interface through which agents obtain tools and knowledge. Public MCP servers are useful. The self-built ones, which point to our own systems, are strategic.
What an MCP server does
An MCP server is a small service that provides resources (data) and tools (actions). The agent — Claude Code, Codex, or a custom one — communicates with it via JSON-RPC.
Agent ⟷ MCP-Client ⟷ MCP-Server ⟷ Internal Systems
The protocol is simple. The intelligence lies in what the server provides.
Our MCP servers
Grounded Docs. The server we use most. It reads the documentation of the software we use — Stalwart, Zammad, Qdrant, vLLM — and makes it available to the agent as a semantically searchable resource. The agent doesn't have to guess which configuration option exists. It looks it up.
ERP Winline Connector. An MCP server that has read access to our ERP: customer master, open items, inventory levels. The agent can use it to generate code based on real data structures — not on invented example tables.
Translogica Status. Transport orders, shipment tracking, current positions. The MCP server provides them to the agent when it writes workflow code for logistics.
Building: no witchcraft
An MCP server is manageable in Python:
from mcp.server import Server, stdio_server
from mcp.types import Tool, TextContent
server = Server("erp-connector")
@server.list_tools()
async def list_tools():
return [Tool(name="get_offene_posten", description="Query open items of a customer", inputSchema={...})]
@server.call_tool()
async def call_tool(name, arguments):
if name == "get_offene_posten":
kdnr = arguments["kundennummer"]
daten = winline_db.query(f"SELECT ... WHERE kdnr = ?", kdnr)
return [TextContent(type="text", text=str(daten))]
The server runs as a process; the agent connects at startup. No firewall opening, no exposed port — communication runs over stdin/stdout.
Security: The principle of least privilege
An MCP server gets only what it needs. The ERP connector has read access to selected views — no write rights, no direct access to the production database. The agent can query, not modify.
Conclusion
Public MCP servers are good. Self-built ones are the difference between an agent that produces generic code and one that understands your business. The investment is an afternoon per system — and pays off in every further coding task.
How much effort is it to build our own MCP server?+
Manageable. An MCP server is a small service that provides resources and tools over JSON-RPC, written in Python in a few lines. It runs as a local process; the agent connects at startup over stdin/stdout — no firewall opening and no exposed port. We budget about an afternoon per connected system, and it pays off in every subsequent coding task.
How do you prevent an agent from modifying our business data?+
Through the principle of least privilege. The ERP connector gets read access only to selected views — no write rights and no direct access to the production database. The agent can query real data structures to generate realistic code, but it cannot change anything. Control over write actions always stays with a human and outside the model.
Why build our own MCP servers instead of using only public ones?+
Public servers are useful, but the strategically valuable ones point at your own systems — internal docs, ERP data, or transport status. They are the difference between an agent that produces generic code and one that understands your business. The agent looks things up instead of guessing whether a config option exists, and works with real data structures rather than invented examples.