@mantiqo/create-mcp v1.0.19
@mantiqo/create-mcp
A flexible bootstrap tool for creating Model Context Protocol (MCP) servers.
What is this?
This tool creates a customizable scaffold for building MCP servers with optional enhancements. It provides:
- A complete but minimal TypeScript MCP server implementation
- Support for different transport mechanisms (stdio or HTTP) via templates
- Support for built-in templates, local templates, or GitHub templates
- Customization options for ESLint and Prettier
- Simple example showing the pattern for adding tools
- Easy extensibility for your specific needs
Installation
# Install globally from npm
npm install -g @mantiqo/create-mcp
# Or use npx to run without installing
npx @mantiqo/create-mcp@latest my-mcp-projectUsage
Basic Usage
# Create a new MCP project with stdio transport (default)
create-mcp my-mcp-project
# Create a new MCP project with HTTP transport
create-mcp my-mcp-project --template basic-httpTemplate Selection
There are three ways to select templates:
Using built-in templates:
# Use the stdio template (this is the default) create-mcp my-project --template basic-stdio # Use the HTTP template create-mcp my-project --template basic-httpUsing custom local templates:
# Use a local directory as template create-mcp my-project --template ./path/to/templateUsing GitHub templates:
# Use a GitHub repository as template create-mcp my-project --template https://github.com/username/mcp-template
Other Options
# Skip customization prompts
create-mcp my-mcp-project --no-customize
# Skip installing dependencies
create-mcp my-mcp-project --no-installTemplates
Built-in Templates
- basic-stdio (default): Minimal MCP server with stdio transport and echo tool
- basic-http: Minimal MCP server with HTTP transport and echo tool
Each template is designed for a specific transport mechanism. Choose the one that best fits your needs.
Using Custom Templates
You can use any directory or GitHub repository as a template. The tool will:
- Copy all files from the template
- Update package.json with your project information
- Modify README.md to reflect your project name and description
- Optionally customize with additional features
- Include prompts directory for LLM interaction
Template-Specific Configuration Instructions
Templates can provide their own configuration instructions by including a config-instructions.json file at the root of the template. This file allows templates to define exactly how they should be configured in different environments.
Example config-instructions.json:
{
"transportType": "http",
"Claude Desktop": {
"configPath": "$HOME/Library/Application\\ Support/Claude/claude_desktop_config.json",
"instructions": "Add to mcpServers:",
"snippet": "{\n \"mcpServers\": {\n \"${projectName}\": {\n \"type\": \"sse\",\n \"url\": \"http://localhost:3000/mcp\"\n }\n }\n}"
},
"VS Code": {
"configPath": "$HOME/Library/Application\\ Support/Code/User/settings.json",
"instructions": "Add to settings:",
"snippet": "\"mcp\": {\n \"servers\": {\n \"${projectName}\": {\n \"type\": \"sse\",\n \"url\": \"http://localhost:3000/mcp\"\n }\n }\n}"
}
}The format supports:
transportType: Specify "http" or "stdio" to indicate which transport mechanism the template uses- Multiple environments (Claude Desktop, VS Code, etc.)
- Template variables:
${projectName}and${projectDir}are automatically replaced - Custom instructions and configuration snippets
Transport Options
The MCP specification defines different transport mechanisms, which are implemented in our built-in templates:
- stdio (basic-stdio template): Simple transport using standard input/output, ideal for direct integration with Claude Desktop
- HTTP (basic-http template): Uses Streamable HTTP transport with Server-Sent Events (SSE) for server-to-client communication
Customization Options
When using built-in templates, you can add optional features:
- ESLint: Adds linting with TypeScript support
- Prettier: Adds code formatting
Features
The generated MCP server includes:
- TypeScript support
- MCP SDK integration
- Basic server setup with the transport defined by the template
- Example echo tool to demonstrate the pattern
- Clean architecture to extend with your own tools
- Prompts directory with reference materials for LLM interaction
Configuration
stdio Transport (basic-stdio template)
After creating a server with the stdio transport template, you can integrate it with Claude Desktop by adding it to your configuration file:
# Edit Claude Desktop config
$HOME/Library/Application\ Support/Claude/claude_desktop_config.jsonOr for VS Code:
$HOME/Library/Application\ Support/Code/User/settings.jsonIn VS Code, add to the settings.json:
"mcp": {
"servers": {
"my-mcp-project": {
"type": "stdio",
"command": "node",
"args": [
"/absolute/path/to/my-mcp-project/dist/index.js"
]
}
}
}Or for Cursor IDE:
$HOME/.cursor/mcp.jsonFor Claude Desktop and Cursor, add an entry to the mcpServers section:
{
"mcpServers": {
"my-mcp-project": {
"type": "stdio",
"command": "node",
"args": [
"/absolute/path/to/my-mcp-project/dist/index.js"
]
}
}
}After updating the configuration, restart Claude Desktop.
HTTP Transport (basic-http template)
After creating a server with the HTTP transport template, start it and connect to it:
# Start the server
npm start
# The MCP endpoint will be available at:
http://localhost:3000/mcpYou can also configure Claude Desktop to use the HTTP-based MCP server:
{
"mcpServers": {
"my-mcp-project": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}Extending Your Server
The minimal template is designed to be extended. Add your own tools by:
- Editing
src/index.ts - Adding new tool definitions in the
registerTools()method - Following the patterns established in the sample code
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.