AI Infrastructure

Building your first MCP server for internal tools

A practical outline for building a Model Context Protocol server that exposes an internal system to Claude safely, from scoping to scopes and logging.

2 October 2026 · 7 min read · Serverconfigs engineering

The Model Context Protocol (MCP) is an open standard that lets AI assistants call tools and read data from other systems. An MCP server is a small service that exposes a defined set of tools. Done well, it lets Claude answer questions from live company data. Done badly, it hands an assistant the keys.

1. Choose a narrow first use case

Pick one system and three questions people actually ask of it. For example, a ticketing system: “what is open for this customer?”, “what changed on this ticket?”, “who owns it?”. Resist exposing the whole API.

2. Design tools, not endpoints

A tool should map to a task, with a clear name, a description the model can understand and a strict input schema. Return concise, structured results rather than raw dumps. A few well-described tools outperform many vague ones.

3. Read first

Start read-only. If you later add write actions, make them separate tools with confirmation and narrower scopes.

4. Authenticate properly

Use OAuth where the target supports it, so the server acts with the user’s own permissions rather than a shared superuser. Enforce scopes in the server code, not in the prompt. A prompt is a request, not a control.

5. Log everything

Record who called which tool with which arguments and what came back, to storage your security team can query. This is the audit trail that makes the whole thing defensible.

6. Limit and validate

Validate inputs, cap result sizes, rate-limit per user and treat anything coming back from the model as untrusted input, because prompt injection is a real risk.

7. Test it like an API, and like a model’s tool

Unit tests for the server, plus evaluation prompts that check the model picks the right tool and handles errors sensibly.

8. Deploy it behind your identity

Host it in your cloud, behind your identity provider and, as the number of servers grows, behind a gateway with a registry of approved servers.

The MCP specification and SDKs are at modelcontextprotocol.io. Our MCP service covers servers, gateway and governance. Claude is a product of Anthropic.

Serverconfigs engineering

Notes from the engineers who run cloud cost, platform and AI enablement work for clients.

Keep reading

Related articles.

Newsletter

Practical notes on cost, platform engineering and AI infrastructure. See the Privacy Policy.

Start here

Find the waste first.

45 minutes with an engineer, a read-only look at your bill and a clear list of what to fix.

45-min call with an engineer · Read-only access · No commitment

Talk to an Engineer Free Cost Assessment