Supercharge your MCP server development with MCP Maker
π Introduction β’ β¨ Features β’ π₯ Installation β’ π§ Usage β’ ποΈ Generated MCP Structure
A CLI utility to quickly create and manage TypeScript MCP (Model Context Protocol) servers following a modular structure.
- Introduction
- Features
- Installation
- Usage
- Generated MCP Server Project Structure
- Contributing
- License
mcp-maker is a command-line utility designed to streamline the process of creating and managing TypeScript MCP servers. It follows the structure and patterns used for making modular MCP servers, providing a consistent and efficient way to scaffold new projects and add components.
Whether you're creating a new MCP server from scratch or adding tools and services to an existing one, mcp-maker simplifies the process and ensures adherence to best practices.
- Quick Project Scaffolding: Create a fully structured MCP server project with a single command
- Automated Tool Creation: Add new tools with proper structure and automatic registration in the toolHandler
- Service Management: Add new services with proper structure and automatic registration
- Prompt Creation: Add new MCP-compatible prompts with proper structure and automatic registration
- Authentication Support: Add multiple authentication types (Basic, Token, OAuth) to your MCP server
- Consistent Structure: Ensures all projects follow the same structure and patterns
- TypeScript Support: Full TypeScript support with proper type definitions
- Interactive CLI: User-friendly command-line interface with helpful prompts
- Template-based Generation: Uses Handlebars templates for consistent code generation
- Automatic Dependency Management: Handles npm dependencies and TypeScript configuration
- Node.js (>= 18.19.0)
- npm (>= 7.0.0)
npm install -g mcp-makernpm install --save-dev mcp-makermcp-maker create server <name> [options]--http: Use HTTP transport instead of default stdio--cors: Enable CORS with wildcard (*) access--port <number>: Specify HTTP port (only valid with --http)--no-install: Skip npm install and build steps-h, --help: Display help for the command
mcp-maker create server my-mcp-server --http --port 3000 --corsThis will create a new MCP server project named my-mcp-server with HTTP transport on port 3000 and CORS enabled.
mcp-maker add tool <name> [options]-h, --help: Display help for the command
cd my-mcp-server
mcp-maker add tool get-user-dataThis will:
- Create a new tool directory in
src/tools/get-user-data - Create the tool implementation and index files
- Update the main tools index to include the new tool
- Update the toolHandler to handle the new tool
mcp-maker add service <name> [options]-h, --help: Display help for the command
cd my-mcp-server
mcp-maker add service user-serviceThis will:
- Create a new service directory in
src/services/user-service - Create the service implementation and index files
- Update the main services index to include the new service
- Set up proper TypeScript types and interfaces
mcp-maker add prompt-h, --help: Display help for the command
cd my-mcp-server
mcp-maker add prompt user-guidanceThis will:
- Create a new prompt directory in
src/prompts/user-guidance - Create the prompt implementation, index, and README files
- Update the main prompts index to include the new prompt
- Set up proper MCP-compatible prompt structure
mcp-maker add auth-h, --help: Display help for the command
cd my-mcp-server
mcp-maker add authThis will:
- Create a new auth directory in
src/authwith all necessary structure - Set up three authentication types:
- Basic Authentication (username/password)
- Token Authentication (API keys, JWT, etc.)
- OAuth 2.0 Authentication (for integrating with OAuth providers)
- Create authentication factory, service, and interfaces
- Set up proper TypeScript types and interfaces
The mcp-maker CLI scaffolds a new MCP server project with the following structure:
my-mcp-server/
βββ src/
β βββ tools/ # Individual tools
β β βββ <tool-name>/ # Each tool in its own directory
β β βββ index.ts # Tool implementation
β β βββ types.ts # Type definitions for the tool
β β
β βββ services/ # Service implementations
β β βββ <service-name>/ # Each service in its own directory
β β βββ index.ts # Service implementation
β β βββ types.ts # Type definitions for the service
β β
β βββ prompts/ # MCP-compatible prompts
β β βββ <prompt-name>/ # Each prompt in its own directory
β β βββ index.ts # Prompt export in MCP format
β β βββ <name>Prompt.ts # Prompt implementation
β β βββ README.md # Documentation for the prompt
β β
β βββ auth/ # Authentication (when added)
β β βββ interfaces/ # Authentication interfaces
β β βββ methods/ # Authentication method implementations
β β βββ AuthFactory.ts # Factory for creating auth providers
β β βββ AuthService.ts # Service for authentication
β β βββ index.ts # Main entry point for auth
β β
β βββ types/ # Global TypeScript type definitions
β βββ utils/ # Utility functions
β βββ config.ts # Configuration
β βββ index.ts # Main entry point
βββ tests/ # Test files
βββ .gitignore
βββ package.json # Project configuration and dependencies
βββ tsconfig.json # TypeScript configuration
βββ README.md
This structure ensures consistency across all MCP server projects created with mcp-maker.
This repository contains the following files and directories:
src/: The source code for themcp-makerCLI utility.tests/: Test files for themcp-makerCLI utility.README.md: This file, which provides an overview of themcp-makerCLI utility.LICENSE: The license under which this project is released.CONTRIBUTING.md: Guidelines for contributing to this project.DEVELOPMENT.md: Guidelines for developing and testing this project.CODE_OF_CONDUCT.md: The code of conduct for this project.
We welcome contributions! Please see our CONTRIBUTING.md for detailed guidelines, including branch naming conventions and pullβrequest requirements.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright Β© 2025 Prakhar Yadav