Build a Custom MCP Server to Expose Your Internal APIs
MCP servers aren't just for databases and docs — you can build one to give Claude direct access to your company's internal APIs, dashboards, or microservices.
claude "Scaffold a new MCP server using the @modelcontextprotocol/sdk package.
It should expose three tools:
1. get-user — fetches user details from our internal API at https://api.internal/users/:id
2. search-orders — searches orders by customer email
3. get-metrics — pulls dashboard metrics for a date range
Use stdio transport and include proper Zod input validation."
Claude will generate a complete MCP server project with typed tool definitions, input validation, and error handling. The key structure looks like this:
// src/index.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
const server = new McpServer({ name: "internal-api", version: "1.0.0" });
server.tool("get-user", { id: z.string() }, async ({ id }) => {
const res = await fetch(`https://api.internal/users/${id}`);
return { content: [{ type: "text", text: JSON.stringify(await res.json()) }] };
});
Register it in your .claude/settings.json and Claude can now query your internal systems directly during conversations.
Building a custom MCP server turns Claude from a code assistant into a full teammate that understands your infrastructure.
Log in to leave a comment.
Use --strict-mcp-config to restrict Claude Code to only the MCP servers you explicitly provide, ignoring all other sources.
When an MCP server misbehaves, /mcp gives you a live view of every connected server, its status, and the tools it's exposing — right inside your session.
Add the Slack MCP server to let Claude post deployment updates, incident alerts, or standup summaries directly to your channels.