# Create MCP

> A modern CLI tool for generating production-ready Model Context Protocol (MCP) servers

- **Type:** MCP server
- **Install:** `agentstack add mcp-linuxdevil-create-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [LinuxDevil](https://agentstack.voostack.com/s/linuxdevil)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [LinuxDevil](https://github.com/LinuxDevil)
- **Source:** https://github.com/LinuxDevil/Create-MCP
- **Website:** https://mcp-server-generator.com

## Install

```sh
agentstack add mcp-linuxdevil-create-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP Server Generator

A modern CLI tool for generating and extending production-ready Model Context Protocol (MCP) servers. Built with clean architecture and advanced MCP features, this tool creates servers that demonstrate all MCP capabilities through one cohesive example instead of scattered demos. **Now with powerful component extension capabilities!**

[](https://www.npmjs.com/package/mcp-server-generator)
[](https://www.npmjs.com/package/mcp-server-generator)
[](https://opensource.org/licenses/MIT)

> **📦 Available on npm**: [`mcp-server-generator`](https://www.npmjs.com/package/mcp-server-generator) - 442kB of production-ready MCP server templates  
> **📚 Complete Documentation**: [mcp-server-generator.com](https://mcp-server-generator.com)

## 🎬 Video Showcase

See the MCP Server Generator in action! Watch how easy it is to create a production-ready MCP server:

[Watch Demo Video](./generate-mcp.mp4)

Watch the complete workflow from project generation to testing with MCP Inspector

> **📖 Detailed guides and tutorials**: [mcp-server-generator.com](https://mcp-server-generator.com)

## 📋 Table of Contents

- [Video Showcase](#-video-showcase)
- [Overview](#overview)
- [Quick Start](#quick-start)
- [Extending Existing Projects](#extending-existing-projects)
- [Features](#features)
- [CLI Commands](#cli-commands)
- [Generated Project Structure](#generated-project-structure)
- [Usage Examples](#usage-examples)
- [Development Scripts](#development-scripts)
- [Development](#development)
- [Architecture](#architecture)
- [Contributing](#contributing)
- [License](#license)

> **📚 For comprehensive documentation, examples, and guides, visit [mcp-server-generator.com](https://mcp-server-generator.com)**

## Overview

### ✨ **Modern Architecture**

- 🎯 **Unified Example**: One comprehensive Data Analysis Assistant showcasing ALL MCP features
- 🏗️ **Clean Architecture**: Modular design with proper separation of concerns
- 🔧 **Advanced MCP Features**: Elicitation, sampling, multiple analysis methodologies
- 🔍 **MCP Inspector Integration**: Built-in testing with visual and CLI modes
- 📚 **Production Ready**: Comprehensive error handling, validation, and documentation
- 🚀 **Educational**: Learn MCP best practices through real-world implementation
- ➕ **Extensible**: Add new components to existing projects with intelligent automation

### 🌟 **What Makes This Different**

Unlike other MCP generators that create scattered demo examples, this tool provides:

- 🎯 **One Unified Example**: Data Analysis Assistant showcasing ALL MCP features
- 🏗️ **Clean Architecture**: Maintainable, extensible, production-ready code
- 📚 **Educational Value**: Learn MCP best practices through real implementation
- 🧪 **Integrated Testing**: MCP Inspector ready-to-use with pre-configured scripts
- 🚀 **Developer Experience**: Convenient scripts, help system, instant feedback
- ➕ **Component Extension**: Add tools, resources, prompts, services, transports, and utils to existing projects

Perfect for learning MCP development, building production servers, or as a foundation for custom implementations. **Start with our comprehensive example, then extend with your own components!**

**📚 Complete Documentation**: [mcp-server-generator.com](https://mcp-server-generator.com)  
**🚀 Quick Start Guide**: [Installation & Setup](https://mcp-server-generator.com/docs/installation)  
**💡 Examples & Tutorials**: [Component Examples](https://mcp-server-generator.com/docs/examples)

## Quick Start

### Installation

```bash
# One-time usage (recommended)
npx mcp-server-generator my-project

# Global installation
npm install -g mcp-server-generator
mcp-server-generator my-project
```

### Basic Usage

```bash
# Create a comprehensive MCP server with Data Analysis Assistant
npx mcp-server-generator my-analysis-server

# Or specify custom options
npx mcp-server-generator my-analysis-server --transport both --skip-install
```

### Immediate Testing

```bash
# Create and enter project
npx mcp-server-generator my-analysis-server
cd my-analysis-server

# 1️⃣ See everything at once
npm run quick:test         # Shows all 8 tools, 9 resources, 3 prompts

# 2️⃣ Get help with all commands
npm run help               # Complete command reference

# 3️⃣ Test with MCP Inspector (2 terminals)
# Terminal 1:
npm run dev:http:stateless

# Terminal 2:
npm run inspector:config -- --server my-analysis-server-http
```

## Extending Existing Projects

### ➕ **Add Components to Existing Projects**

Easily extend your MCP servers with new components using the powerful `add` command:

```bash
# Add a new tool
npx mcp-server-generator add tool calculator
npx mcp-server-generator add tool file-manager --description "File management tool"

# Add a new resource  
npx mcp-server-generator add resource user-data
npx mcp-server-generator add resource api-docs --author "Your Name"

# Add a new prompt
npx mcp-server-generator add prompt code-review
npx mcp-server-generator add prompt system-design --description "System design prompt"

# Add business logic services
npx mcp-server-generator add service email-sender
npx mcp-server-generator add service data-processor --description "Process data"

# Add custom transports
npx mcp-server-generator add transport websocket  
npx mcp-server-generator add transport grpc --description "gRPC transport"

# Add utility functions
npx mcp-server-generator add util string-helpers
npx mcp-server-generator add util crypto-utils --description "Cryptography utilities"
```

### 🔍 **List Existing Components**

See what components are already in your project:

```bash
# Navigate to your MCP project
cd my-mcp-project

# List all components
npx mcp-server-generator list
```

### ⚙️ **Smart Component Generation**

Each component type includes:

- **📝 Interactive Configuration**: Rich prompts for component-specific settings
- **🔧 Automatic Integration**: Components are automatically registered and ready to use
- **💾 Backup & Rollback**: Safe modifications with automatic backup creation
- **✅ Validation**: Name validation and conflict detection
- **📚 Production-Ready Code**: Generated components follow MCP best practices
- **🎯 Type Safety**: Full TypeScript support with proper typing

### 🛠️ **Component Types**

| Type | Description | Examples |
|------|-------------|----------|
| **🛠️ Tool** | Add functionality and actions | `calculator`, `file-manager`, `data-validator` |
| **📋 Resource** | Add data and documentation | `user-guide`, `api-docs`, `configuration` |
| **💡 Prompt** | Add intelligent templates | `code-review`, `analysis`, `summary` |
| **⚙️ Service** | Add business logic | `email-sender`, `data-processor`, `auth-manager` |
| **🌐 Transport** | Add communication layers | `websocket`, `grpc`, `mqtt` |
| **🔧 Util** | Add helper functions | `string-helpers`, `crypto-utils`, `validators` |

## Features

### 🔧 **Comprehensive Tools** (8 powerful tools)

- **`data-analysis`**: Complete analysis with 5 methodologies, 6 sampling strategies, elicitation integration
- **`server-status`**: Health monitoring and performance tracking
- **`start-elicitation`**: Begin interactive elicitation sessions for guided information gathering
- **`continue-elicitation`**: Continue active elicitation sessions with responses
- **`get-elicitation-status`**: Get status and summary of elicitation sessions
- **`generate-sample`**: Generate samples using 6 different sampling strategies
- **`analyze-sample`**: Analyze sample quality and representativeness
- **`generate-synthetic-data`**: Generate synthetic data based on source patterns

### 📋 **Rich Resources** (9 comprehensive resources)

- **`data-analysis`**: Comprehensive guide to data analysis approaches and techniques
- **`sampling-guide`**: Complete guide to data sampling techniques and strategies
- **`elicitation-workflows`**: Interactive elicitation workflows for guided analysis
- **`analysis-best-practices`**: Industry best practices for effective data analysis
- **`server-info`**: Comprehensive server information and capabilities
- **`server-config`**: Current server configuration and runtime settings
- **`api-docs`**: Complete API documentation for the MCP server
- **`sampling-strategies`**: Documentation of available sampling strategies
- **`sampling-best-practices`**: Guidelines for effective data sampling

### 💡 **Flexible Prompts** (3 intelligent prompts)

- **`research-analysis`**: 8 research methodologies with flexible contexts and output formats
- **`interactive-exploration`**: Generate interactive exploration questions for topics
- **`guided-discovery`**: Create guided discovery sessions for knowledge elicitation

### ✨ **Advanced Features**

- 🧠 **Interactive Elicitation**: Guided analysis with smart question generation
- 📊 **AI-Enhanced Sampling**: 6 sampling strategies including AI-powered techniques
- 🏗️ **Modular Architecture**: Clean separation of concerns with dependency injection
- 🔍 **MCP Inspector Integration**: Visual and CLI testing built-in
- ➕ **Component Extension**: Add new tools, resources, prompts, services, transports, and utilities
- 🔧 **Intelligent Integration**: Automatic registry updates and import management
- 💾 **Safe Modifications**: Backup and rollback system for project changes
- 🎯 **Smart Validation**: Component name validation and conflict detection

### 🚀 **Transport Support**

- **Stdio Transport**: Standard input/output for Claude Desktop and CLI tools
- **HTTP Transport**: RESTful API with Server-Sent Events for web integration
- **Streamable HTTP**: Modern protocol 2025-03-26 with session management

## CLI Commands

### 🚀 **Create New Projects**

```bash
npx mcp-server-generator  [options]
```

**Options:**
- ``: Name of the MCP server project (required)
- `-t, --transport `: Transport type (`stdio`, `http`, `both`) - default: `both`
- `-d, --directory `: Directory to create the project in
- `--skip-install`: Skip installing dependencies
- `--verbose`: Enable verbose logging
- `--oauth`: Enable OAuth authentication for HTTP transport
- `--no-dns-protection`: Disable DNS rebinding protection
- `--stateless`: Enable stateless mode (no session persistence)

### ➕ **Add Components to Existing Projects**

```bash
npx mcp-server-generator add   [options]
```

**Component Types:**
- `tool` - Add functionality and tools to your MCP server
- `resource` - Add data and documentation resources
- `prompt` - Add intelligent prompt templates  
- `service` - Add business logic and processing services
- `transport` - Add custom communication transports
- `util` - Add helper functions and utilities

**Options:**
- ``: Type of component to add (required)
- ``: Name of the component (required)
- `-d, --description `: Component description
- `-a, --author `: Component author
- `--skip-validation`: Skip component name validation
- `--verbose`: Enable verbose logging

### 📋 **List Project Components**

```bash
npx mcp-server-generator list [options]
```

**Options:**
- `--verbose`: Enable verbose logging

**Examples:**
```bash
# Create a new project
npx mcp-server-generator my-server --transport both

# Add components to existing project
cd my-server
npx mcp-server-generator add tool calculator --description "Math calculator"
npx mcp-server-generator add resource user-guide --author "Team"

# List all components
npx mcp-server-generator list
```

## Generated Project Structure

```text
my-analysis-server/
├── src/
│   ├── server.ts                      # Simplified main entry point (106 lines)
│   ├── core/                          # Core server logic
│   │   ├── config.ts                  # Configuration management
│   │   ├── mcp-server.ts              # Core MCP server implementation  
│   │   └── server-factory.ts          # Server instantiation
│   ├── transports/                    # Transport layer
│   │   ├── stdio-transport.ts         # Stdio communication
│   │   ├── http-transport.ts          # HTTP communication
│   │   └── transport-manager.ts       # Transport coordination
│   ├── tools/                         # Modular tool implementations
│   │   ├── index.ts                   # Tool registry
│   │   ├── data-analysis-tool.ts      # Comprehensive analysis tool
│   │   └── server-status-tool.ts      # Monitoring tool
│   ├── resources/                     # Resource providers
│   │   ├── index.ts                   # Resource registry
│   │   ├── data-analysis-resource.ts  # Analysis documentation
│   │   └── server-info-resource.ts    # Server information
│   ├── prompts/                       # Prompt templates
│   │   ├── index.ts                   # Prompt registry
│   │   └── research-analysis-prompt.ts # Multi-methodology prompts
│   ├── services/                      # Business logic
│   │   ├── elicitation.ts             # Interactive guidance
│   │   ├── sampling.ts                # Data sampling
│   │   └── example.ts                 # Example service
│   └── utils/                         # Utilities
│       ├── logger.ts                  # Logging system
│       └── health.ts                  # Health monitoring
├── mcp-inspector.config.json          # MCP Inspector configuration
├── package.json                       # Dependencies and scripts
├── tsconfig.json                      # TypeScript configuration
└── README.md                          # Comprehensive documentation
```

## Usage Examples

### 🚀 **Quick Start Testing**

```bash
# Test individual components
npm run test:tools         # List data-analysis and server-status tools
npm run test:resources     # Browse methodology guides and documentation  
npm run test:prompts       # Test research-analysis prompt

# Start different modes
npm run dev:stdio          # For Claude Desktop integration
npm run dev:http           # For API/web integration
npm run dev:http:oauth     # With authentication

# Visual inspector (UI mode)
npm run inspector

# CLI-based testing
npm run inspector:cli
```

### 🧪 **Testing the Data Analysis Tool**

```bash
# Quick test (shows tool schema)
npm run test:tools

# Advanced test with actual data
npx @modelcontextprotocol/inspector --cli tsx src/server.ts \
  --method tools/call \
  --tool-name data-analysis \
  --tool-arg 'data=[{"age":25,"score":85},{"age":30,"score":92}]' \
  --tool-arg analysis_type=exploratory \
  --tool-arg sampling_strategy=ai-representative \
  --tool-arg enable_elicitation=true

# Test server status monitoring
npx @modelcontextprotocol/inspector --cli tsx src/server.ts \
  --method tools/call \
  --tool-name server-status \
  --tool-arg 'include_details=true' \
  --tool-arg 'format=json'
```

### ➕ **Adding and Testing New Components**

```bash
# Add a custom tool and test it immediately
npx mcp-server-generator add tool calculator --description "Math calculator"
npm run build
npm run test:tools  # Your new tool will appear in the list

# Add a resource and verify it
npx mcp-server-generator add resource user-guide --description "User documentation"
npm run test:resources  # New resource will be listed

# Add a prompt and test it
npx mcp-server-generator add prompt code-review --description "Code review prompt"
npm run test:prompts  # New prompt will be available

# Test your extended server
npm run dev:stdio     # Start with all components
npm run inspector:cli  # Test all components interactively
```

## Development Scripts

### 📝 **Available Scripts** (for generated projects)

```bash
# 🚀 Quick Start & Testing
npm run quick:test         # Show ALL tools, resources & prompts at once
npm run help               # Show all available commands

# 🔧 Development
npm run dev:stdio          # Start with stdio transport (for Claude Desktop)
npm run dev:http           # Start with HTTP transport
npm run dev:http:stateless # Start HTTP in stateless mode (best for inspector)
npm run dev:http:oauth     # Start with OAuth enabled

# 🌐 MCP Inspector Integration (2 terminals)
# Terminal 1: npm run dev:http:stateless
# Termin

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [LinuxDevil](https://github.com/LinuxDevil)
- **Source:** [LinuxDevil/Create-MCP](https://github.com/LinuxDevil/Create-MCP)
- **License:** MIT
- **Homepage:** https://mcp-server-generator.com

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-linuxdevil-create-mcp
- Seller: https://agentstack.voostack.com/s/linuxdevil
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
