Back to blog

Model Context Protocol in Practice: Wiring Private Systems Without Glue Code

Anthropic's open standard changes how agent toolchains communicate. Here is our architectural post-mortem wiring 14 internal business systems using MCP.

Model Context Protocol in Practice: Wiring Private Systems Without Glue Code

Before Model Context Protocol (MCP), integrating an AI assistant with internal company systems looked like a nightmare of custom LangChain wrappers, brittle OpenAPI json parsers, and custom function-calling schemas that broke every time an API version bumped.

MCP changed that by introducing a universal JSON-RPC protocol for AI tool discovery, resource sharing, and prompt templating.

Over the last quarter, we migrated 14 internal enterprise services—ranging from Jira and GitHub to Postgres and proprietary ERP systems—onto custom MCP servers. Here is what we learned.

The Big Architectural Shift

In legacy setups, the client application was responsible for converting every system API into a tool schema, executing the request, and formatting the response for the LLM.

With MCP, the server itself advertises:

  1. Tools: Executable routines (e.g., query_database, create_ticket).
  2. Resources: Read-only data streams (e.g., system logs, schema definitions, markdown docs).
  3. Prompts: Pre-vetted prompt recipes that enforce company compliance standards.
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "lookup_customer_record",
    "arguments": { "accountId": "ACC-9921" }
  }
}

Three Hard-Won Lessons From Production

1. Schema Minimalism Prevents Hallucination

When engineers write MCP tools, their instinct is to expose all 40 columns from their SQL tables. Don't do this. Returning bloated JSON blobs clutters the agent's reasoning loop. Return strictly what the agent needs to make its next decision.

2. Statelessness Is a Superpower

Keep your MCP server stateless. Store state in your underlying database or require the agent to pass explicit identifiers. This ensures multiple agent workers can query the server concurrently without race conditions.

3. Enforce Confirmation Rails for Destructive Actions

Not all tools are equal. A read_user tool can execute automatically. A delete_database_cluster tool must require interactive human confirmation. MCP's native prompt and UI hooks make it simple to flag dangerous tools before they execute.

The Road Ahead

MCP is rapidly becoming the USB-C of the AI ecosystem. If your engineering organization is still writing proprietary agent glue code, stop. Standardize on MCP today and future-proof your agent architecture.