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.
MCP servers aren't just for third-party integrations — you can build your own to give Claude direct access to your internal tools, databases, APIs, and workflows. A custom MCP server turns any system your team uses into a tool Claude can call natively from your session.
MCP servers can be scoped at three levels — user (available everywhere you work), project (shared with the team via version control), or enterprise (managed by your organization). Pick the right scope so each project gets exactly the tools it needs without cluttering unrelated ones.
Instead of manually editing settings JSON to add MCP servers, use the claude mcp command — add servers with one line, list what's configured, remove ones you don't need, and scope them to the right level, all from the terminal.