Get the FREE Ultimate OpenClaw Setup Guide →

create

Scaffold production-ready MCP servers in seconds

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio agentailor-create-mcp-server node src/server.js

How to use

This MCP server scaffold generates a production-ready MCP server project with two framework options (Official MCP SDK or FastMCP) and two transport modes (HTTP streamable or stdio). The generated project includes an Express-based HTTP server, optional OAuth support, and a ready-to-customize TypeScript codebase. To run the server you typically use the project's npm scripts (dev for development builds and start for production). After you generate a server, navigate into the project directory and install dependencies, then start the server to begin handling MCP tool calls and prompts.

Within the generated project you’ll find the MCP server implementation in src/server.ts and the Express app setup in src/index.ts. The server exposes MCP tools, prompts, and resources, and can be run in HTTP mode for remote access or in stdio mode for local clients. If you enable OAuth, you’ll also configure authentication flows as described in the readme and docs. You can inspect, test, and extend the server using the included MCP Inspector (npm run inspect) to debug tool calls and responses.

How to install

Prerequisites:

  • Node.js (v14+ recommended) and npm/yarn
  • Basic familiarity with TypeScript projects

Installation steps:

  1. Ensure Node.js and npm are installed. Verify: node -v npm -v

  2. Install the MCP server scaffold package globally (optional) or use npx to run it directly without global install: npm install -g @agentailor/create-mcp-server

    or use npx without global install

  3. Create a new MCP server project (interactive or CLI mode):

    Interactive mode

    npx @agentailor/create-mcp-server

    CLI mode (example)

    npx @agentailor/create-mcp-server --name=my-server --framework=sdk --template=stateless

  4. Navigate to the generated project folder and install dependencies: cd my-mcp-server npm install

  5. Start the server in development: npm run dev

  6. Open a browser or HTTP client to the server endpoints or connect via MCP clients as documented in the repo.

Additional notes

Tips and notes:

  • The generator supports two frameworks (Official MCP SDK or FastMCP) and two transport modes (HTTP streamable or stdio). Choose options based on deployment needs.
  • If you enable OAuth, configure your OAuth provider details in the generated auth middleware and environment files as described.
  • For production Docker deployment, the generated project includes a Dockerfile suitable for HTTP transport. Use docker build -t your-image . and docker run -d -p 8080:8080 your-image to deploy.
  • Common issues often relate to port configuration, OAuth callback URLs, or missing environment variables. Refer to .env.example in the generated project and update accordingly.
  • If you modify server behavior, run npm run build (if applicable) before starting in production mode to ensure compiled artifacts are up to date.

Related MCP Servers

Sponsor this space

Reach thousands of developers