MCP Servers, Zero Boilerplate
Build tools once — use them from Claude, Cursor, VS Code, ChatGPT, and any MCP-compatible client.
TypeScript SDK for the Model Context Protocol. Define tools with plain objects — full type safety, auto-generated schemas, zero protocol boilerplate.
import { createServer, tool } from "mcpcraft-sdk" const server = createServer({} name: "my-server" }) server.add(tool({} name: "send_email", description: "Sends an email", input: {} to: {} type: "string", description: "Recipient" }, body: {} type: "string", description: "Content" } }, run: async ({ to, body }) => {} return {} success: true } }})) server.start()What you can build
Ask Claude to query your database. Trigger deploys from chat. Scaffold in seconds.
AI Chat Tools
Ask Claude to query your database by name. Give ChatGPT file access. Let Copilot run shell commands — each one a single tool() call.
import { tool } from "mcpcraft-sdk" const queryDB = tool({} name: "query_db", run: async () => { ... }})API Wrappers
Expose your REST or GraphQL API to any LLM in 10 lines. Auto-typed inputs, built-in Zod validation, no manual schema wiring.
CLI Scaffolding
Scaffold a production MCP server with one command. No config files, no manual setup.
$ npx mcpcraft-sdk init“Scaffolded our entire MCP server in under 10 minutes. The before/after comparison is not exaggerated — this really does replace 50 lines of SDK boilerplate with 12.”
Design a tool, see the schema
Edit the tool definition — the MCP JSON schema updates in real time.
{
"name": "get_weather",
"description": "Get current weather for a city",
"inputSchema": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"units": {
"type": "string"
}
},
"required": [
"city"
]
}
}50+ lines vs 12 lines
The MCP SDK needs manual schema definition, request handlers, transport setup, and error handling. MCPCraft gives you all of that from a single tool() call. stdio transport configured by default — no import needed.
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
const server = new Server({ name: "my-server", version: "1.0.0" }, { capabilities: { tools: {} } });
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [{
name: "send_email",
description: "Sends an email",
inputSchema: {
type: "object",
properties: {
to: { type: "string", description: "Recipient" },
body: { type: "string", description: "Content" }
},
required: ["to", "body"]
}
}]
};
});
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name !== "send_email") {
throw new Error("Tool not found");
}
const { to, body } = request.params.arguments;
if (typeof to !== "string" || typeof body !== "string") {
throw new Error("Invalid schema");
}
// business logic...
});import { createServer, tool } from "mcpcraft-sdk"const server = createServer({ name: "my-server" })server.add(tool({ name: "send_email", description: "Sends an email", input: { to: { type: "string", description: "Recipient" }, body: { type: "string", description: "Content" } }, run: async ({ to, body }) => { return { success: true } }}))server.start()How it works
Three steps to your first MCP server.
Describe your tool inputs and handler in one object.
const greet = tool({
name: "greet",
input: {
name: { type: "string" }
},
run: async ({ name }) => {
return { message: "Hello " + name }
}
})Register tools on the server with a single call.
const server = createServer({
name: "my-server"
})
server.add(greet)
server.add(weatherTool)
server.add(emailTool)Start your server. Any MCP client connects instantly.
$ npx ts-node server.ts
> MCP server running on stdio
> Tools: greet, weather, email
> Ready for connections...Start building now
One command. Zero config.