ClosedMCP SDKs
Keep your existing tools. Wrap your MCP server so each request has a signed-in person.
Start with our SDK
Install our SDK. Wrap your MCP server. Every request now comes with the signed-in person.
npm install @closedmcp/sdk @modelcontextprotocol/sdkimport { McpServer } from
"@modelcontextprotocol/sdk/server/mcp.js";
import {
closedMcpPerson,
serveWithClosedMcp,
} from "@closedmcp/sdk";
serveWithClosedMcp(() => {
const mcp = new McpServer({
name: "hello", version: "1.0.0",
});
mcp.registerTool("hello", { inputSchema: {} },
async () => ({ content: [{
type: "text",
text: `Hello ${closedMcpPerson().email}`,
}] }));
return mcp;
}, {
resource: "https://example.com/mcp",
allowedDomains: ["example.com"],
});Settings and other integrations
MCP_URL is the exact public MCP endpoint you register in ClosedMCP, including its path.
ALLOWED_DOMAINS lists the customer company domains your server accepts. At least one is required.
The TypeScript SDK supports the official MCP SDK and FastMCP. Python supports the official FastMCP and standalone FastMCP 2. Go supports the official Go SDK and mark3labs. Rust supports rmcp.
For private deployments or local tests, set CLOSEDMCP_ORIGIN and CLOSEDMCP_JWKS_URL where supported.
Not using our SDK?
Each SDK is open source and small. Read how it checks a pass in TypeScript, Python, Go or Rust, and do the same in your own code.