$ recombobulate _
home / tips / build-a-custom-mcp-server-to-expose-your-internal-apis
0

Build a Custom MCP Server to Expose Your Internal APIs

bagwaa @bagwaa · Mar 26, 2026 · MCP Servers
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.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Lock Down MCP Servers with --strict-mcp-config

Use --strict-mcp-config to restrict Claude Code to only the MCP servers you explicitly provide, ignoring all other sources.

bagwaa @bagwaa · 4 hours ago
0
Use the /mcp Command to Inspect Your MCP Servers

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.

bagwaa @bagwaa · 6 hours ago
0
Connect the Slack MCP Server for Team Notifications

Add the Slack MCP server to let Claude post deployment updates, incident alerts, or standup summaries directly to your channels.

bagwaa @bagwaa · 9 hours ago