What is Xmcp?
xmcp is an open-source framework designed from the ground up to streamline how you build, test, and ship tools for the Model Context Protocol (MCP). Built with a laser focus on developer experience (DX), it removes unnecessary complexity, allowing you to focus on creating powerful, AI-integrated functionalities with TypeScript. If you're looking to build on the MCP ecosystem, xmcp provides the robust and intuitive foundation you need.
Key Features
🗂️ Declarative File-System Routing Simply create a file in your
tools/directory, and xmcp automatically discovers and registers it as a new tool. This convention-over-configuration approach eliminates boilerplate and lets you build new capabilities instantly.⚡ Instant Development with Hot Reloading Make a change to your tool, save the file, and your development server updates immediately. This tight feedback loop allows for rapid iteration and debugging, keeping you in a state of flow.
🛡️ Integrated Middleware for Security & Logic Secure your HTTP endpoints with built-in, easy-to-configure middlewares for API Key and JWT authentication. You can also chain custom middlewares to handle logging, rate limiting, or any other request/response processing you need.
🔌 Flexible Deployment Transports xmcp supports both HTTP and STDIO transports out of the box. Deploy your tools as a web service accessible via an API, or run them locally to allow AI agents to securely perform operations on a user's machine.
⚙️ Seamless Integration with Existing Apps Plug xmcp directly into your existing Next.js or Express applications. This experimental feature allows you to add MCP capabilities to your current projects without starting from scratch, preserving your existing infrastructure.
How xmcp Solves Your Problems:
xmcp is designed for practical, real-world applications. Here are a couple of scenarios where it excels:
Building a Secure, Data-Driven Web Tool Imagine you need to create an AI tool that can query your company's private product database. With xmcp, you can quickly define a
searchProductstool that connects to your database. Using the HTTP transport and the built-inapiKeyAuthMiddleware, you can deploy it as a secure, server-side endpoint. Your AI application can now call this tool to fetch real-time product information, confident that access is properly controlled.Creating a Local File-Management Assistant You want to build a tool that helps an AI agent organize files on your local machine—for example, finding and compressing all images in a specific folder. By using the STDIO transport, you can run your xmcp server locally. This allows the AI to execute the
compressImagestool directly on your computer, performing file system operations securely without ever exposing your files to the web.
Why Choose xmcp?
The primary advantage of xmcp is its unwavering commitment to an exceptional developer experience. While other frameworks may offer similar functionality, xmcp is architected to minimize friction at every step.
Productivity by Default: The file-system-based routing and declarative tool definitions mean you spend more time writing business logic and less time on configuration and boilerplate.
Clarity and Control: By defining your tool's input parameters with Zod schemas, you get automatic type safety, validation, and clear documentation. This ensures your tools are robust, predictable, and easy for both humans and AI to understand.
Conclusion:
xmcp provides a clear, powerful, and enjoyable path for developing applications on the Model Context Protocol. It offers the structure and tooling you need to build secure, scalable, and versatile AI tools, whether they run in the cloud or on a local machine. By prioritizing developer experience, xmcp empowers you to ship innovative solutions faster and with greater confidence.





