Get the FREE Ultimate OpenClaw Setup Guide →

xmcp

The TypeScript MCP framework

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio basementstudio-xmcp node packages/xmcp/server.js \
  --env PORT="The port the server should listen on (default: 3000)" \
  --env XMCP_API_KEY="Optional API key for authenticated endpoints"

How to use

xmcp is an MCP (Model Context Protocol) server designed to expose a modular set of capabilities for conversational and tooling integration. It provides a stable interface to run command-oriented modules, fetch structured data, and perform actions via a local or remote client. The server loads its capabilities from the packages/xmcp directory, registering available commands and handlers that can be invoked by your MCP client. Typical usage involves starting the server, then issuing MCP requests to execute specific modules, query status, or fetch context needed for enhanced conversation flows. It supports environment-driven configuration and can be extended by adding new modules to the xmcp package tree.

To interact with the server, connect a compatible MCP client and use the predefined endpoints to invoke modules, retrieve results, or compose multi-step actions. Ensure your client sends properly namespaced requests so the server can route them to the correct module handlers. If authentication is enabled via XMCP_API_KEY, include the key in request headers or parameters as configured by your deployment. The server aims to provide predictable, structured responses that can be chained into larger conversational or automation workflows.

How to install

Prerequisites:

  • Node.js (v14+ recommended) and npm or pnpm
  • Access to the repository containing the xmcp package (or a cloned copy)

Installation steps:

  1. Install dependencies for the repository (from the project root): npm install

  2. Navigate to the xmcp package directory and install its specific dependencies (if not handled by the root install): cd packages/xmcp npm install

  3. Prepare environment variables (optional but recommended):

    • PORT: Port for the server to listen on (default 3000)
    • XMCP_API_KEY: Optional API key for protected endpoints
  4. Start the MCP server: npm run start ---prefix packages/xmcp // or if using a direct node invocation: node packages/xmcp/server.js

  5. Verify the server is running by accessing http://localhost:<PORT> or by using an MCP client to ping the server.

Additional notes

Environment variables:

  • PORT controls where the server listens; ensure the port is exposed in your deployment environment.
  • XMCP_API_KEY enables protected endpoints; supply the key with MCP client requests as configured by the server.

Common issues:

  • If the server fails to start, check that Node.js dependencies are installed and that the port is not in use by another process.
  • Ensure the xmcp package directory exists at packages/xmcp and contains server.js or an equivalent entry point.
  • When updating modules, restart the server to load changes.

Configuration options:

  • You can extend capabilities by adding modules under packages/xmcp and updating any module registration as needed.
  • If a different command line or container runtime is used (e.g., uvx, docker), adjust the mcp_config accordingly in your deployment manifest.

Related MCP Servers

Sponsor this space

Reach thousands of developers