Skip to content
mcp-generator logo

MCP Server Generator

mcp-generator

Use when setting up project-specific development tools or after analyzing a codebase - generates custom MCP server with semantic search, project-aware tools, and health monitoring capabilities. Works with both basic and enhanced modes. Do NOT use if generic popkit commands are sufficient or for s...

SKILL.md

Full skill instructions

MCP Server Generator

Overview

Generate a custom MCP (Model Context Protocol) server tailored to the specific project's needs, including semantic search, project-specific tools, and contextual capabilities.

Core principle: Every project deserves tools that understand its unique architecture.

Trigger: /​popkit:project mcp command after project analysis

Operating Modes

ModeAvailabilityCapabilities
BasicAlways (no API key)Project analysis, tech stack detection, recommendations
EnhancedWith API keyCustom MCP generation, semantic search, embeddings

Get API key: /​popkit:cloud signup (free)

Arguments

FlagDescription
--from-analysisUse .claude/​analysis.json for tool selection
--no-embedSkip auto-embedding of tools
--no-semanticDon't include semantic search capabilities
--tools <list>Comma-separated list of tools to generate

Generated Structure

.claude/​mcp-servers/[project-name]-dev/
├── package.json
├── tsconfig.json
├── src/
│   ├── index.ts              # MCP server entry point
│   ├── tools/
│   │   ├── project-tools.ts  # Project-specific tools
│   │   ├── health-check.ts   # Service health checks
│   │   └── search.ts         # Semantic search
│   └── resources/
│       └── project-context.ts # Project documentation
└── README.md

Tool Selection Matrix

FrameworkGenerated Tools
nextjscheck_dev_server, check_build, run_typecheck
expresscheck_api_server, health_endpoints
prismacheck_database, run_migrations, prisma_studio
supabasecheck_supabase, supabase_status
redischeck_redis, redis_info
docker-composedocker_status, docker_logs
Commongit_status, git_diff, git_recent_commits, morning_routine, nightly_routine, tool_search

Language-Specific Tools

Node.js: check_nextjs/​vite/​express, run_typecheck, run_lint, run_tests, npm_scripts Python: run_pytest, run_mypy, check_virtualenv, run_lint (ruff/​black) Rust: cargo_check, cargo_test, cargo_clippy

Generation Workflow

  1. Analyze Project - Detect tech stack, frameworks, test tools
  2. Select Tools - Use analysis.json or auto-detect
  3. Generate Code - TypeScript implementations with semantic descriptions
  4. Export Embeddings - tool_embeddings.json for semantic search
  5. Register Server - Update .claude/​settings.json
  6. Report Status - Tools created, embedding summary, next steps
<details> <summary>📄 See detailed workflow steps (optional)</​summary>

Step 1: Project Detection

# Detect tech stack
ls package.json Cargo.toml pyproject.toml go.mod 2>/​dev/​null
# Find main directories
ls -d src lib app components 2>/​dev/​null
# Detect test framework
grep -l "jest\|mocha\|vitest\|pytest" package.json pyproject.toml 2>/​dev/​null

Step 2: Tool Implementation

See examples/​tool-implementation.ts for detailed examples

Step 3: Server Registration

Uses Claude Code 2.0.70+ wildcard syntax:

{
  "mcpServers": {
    "[project]-dev": {
      "command": "node",
      "args": [".claude/​mcp-servers/[project]-dev/​dist/​index.js"],
      "permissions": {
        "allowed": ["mcp__[project]-dev__*"]
      }
    }
  }
}

Benefits of wildcard permissions:

  • All current and future tools automatically allowed
  • Less configuration maintenance
  • Clearer intent: "trust this MCP server"
  • See docs/​MCP_WILDCARD_PERMISSIONS.md for details </​details>

Semantic Tool Descriptions

Write descriptions optimized for semantic search:

GuidelineExample
State action clearly"Check if...", "Run...", "Get..."
Include target"...Next.js development server..."
Mention use cases"...troubleshoot startup issues..."
List outputs"Returns status, URL, response time"
<details> <summary>📋 Before/​After Examples</​summary>

Before (Too Brief)

{
  name: "health:dev-server",
  description: "Check dev server"
}

After (Semantic-Friendly)

{
  name: "health:dev-server",
  description: "Check if the Next.js development server is running and responding on port 3000. Use this to verify the dev environment is working, troubleshoot startup issues, or confirm the app is accessible. Returns status, URL, and response time."
}

</​details>

Auto-Embedding Tools

Generated servers include tool_embeddings.json for semantic search:

{
  "generated_at": "2025-12-26T10:00:00Z",
  "model": "voyage-3.5",
  "dimension": 1024,
  "tools": [
    {
      "name": "health:dev-server",
      "description": "Check if the Next.js...",
      "embedding": [0.123, 0.456, ...]
    }
  ]
}

Requires Voyage API key. Set VOYAGE_API_KEY environment variable or skip with --no-embed.

Post-Generation Output

MCP server generated at .claude/​mcp-servers/[project]-dev/

Tools created (8):
✓ health:dev-server - Check Next.js dev server
✓ health:database - Check PostgreSQL connectivity
✓ quality:typecheck - Run TypeScript type checking
✓ quality:lint - Run ESLint checks
✓ quality:test - Run Jest test suite
✓ git:status - Get git working tree status
✓ git:diff - Show staged and unstaged changes
✓ search:tools - Semantic tool search

Embedding Summary:
- Tool embeddings: .claude/​tool_embeddings.json
- Total tools: 8
- Successfully embedded: 8
- Model: voyage-3.5

Next steps:
1. cd .claude/​mcp-servers/[project]-dev
2. npm install
3. npm run build
4. Restart Claude Code to load MCP server

Would you like me to build and test it?

MCP Wildcard Permissions

Added in Claude Code 2.0.70

PopKit-generated MCP servers use wildcard permissions by default:

{
  "mcpServers": {
    "{project-name}-dev": {
      "permissions": {
        "allowed": ["mcp__{project-name}-dev__*"]
      }
    }
  }
}

Permission Patterns

PatternUse Case
mcp__server__*Trust all tools (recommended for first-party servers)
mcp__server__health-*Trust tools by namespace prefix
Explicit listTrust specific tools only (third-party servers)

Custom Permissions

Override permissions after generation:

  1. Edit .claude/​settings.json or .mcp.json
  2. Change from wildcard to explicit allow-list if needed
  3. Add denied list for risky operations:
{
  "permissions": {
    "allowed": ["mcp__git-tools__*"],
    "denied": ["mcp__git-tools__force-push", "mcp__git-tools__delete-branch"]
  }
}

Documentation: docs/​MCP_WILDCARD_PERMISSIONS.md

Integration Requirements

Optional:

  • Project analysis (via analyze-project skill) for best results
  • Voyage AI API key for auto-embedding (recommended)

Enables:

  • Project-specific tools in Claude Code
  • Semantic tool search with natural language queries
  • Health monitoring with detailed status
  • Custom workflows tailored to your stack
  • Discoverable tools across projects

See examples/ directory for detailed code samples and implementation patterns.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View