ClaudeCodeMod

All shelves / MCP servers

MCP Server Cookie Cutter Template

codingthefuturewithai/mcp-cookie-cutter · 22 stars · Python

MCP server A cookiecutter template for creating MCP (Model Control Protocol) servers

Install

The repo has no one-line install. Follow its README.

Open the repo

Files

README.md

MCP Server Cookie Cutter Template

A cookie cutter template for creating new MCP (Model Context Protocol) servers. This template generates a fully functional MCP server with multi-transport support (stdio and streamable HTTP), advanced logging, automatic decorators, and a web-based management UI.

Features

  • Official MCP SDK 1.28+: Built on the official mcp Python SDK (pinned <2.0)
  • Multi-Transport Support: stdio and streamable HTTP in a single implementation, with optional stateless/JSON-response modes for serverless deployments
  • All Three MCP Primitives: Tools, resources (static + templates), and prompts
  • Structured Output: Typed Pydantic tool returns with auto-generated output schemas
  • Tool Metadata: Human-readable titles and behavior annotations (read-only, destructive, idempotent, open-world hints)
  • Automatic Decorators: Exception handling, logging, type conversion, and parallelization
  • Unified Logging System: SQLite-based logging with correlation IDs and extensible destinations
  • Web Management UI: Streamlit-based interface for configuration, logs, and documentation
  • Example Tools: Ready-to-use example tools with best practices (including elicitation, progress, and notification demos)
  • Full MCP Inspector Compatibility: Easy testing and debugging
  • Proper Absolute Imports: Clean package structure throughout
  • DevFlow Integration: Built-in JIRA workflow commands (plan-work, implement, security-review, complete)
  • Comprehensive Documentation: Templates for README, development guide, and setup prompts

Prerequisites

  1. Python 3.11 or higher

    python --version  # Should be 3.11 or higher
  2. uv (Fast Python package installer)

    # Install uv if you don't have it
    curl -LsSf https://astral.sh/uv/install.sh | sh
  3. Cookie Cutter

    uv pip install cookiecutter

Creating a New MCP Server

You can create a new MCP server either directly from GitHub or from a local copy of this template.

Option 1: Directly from GitHub

cookiecutter gh:codingthefuturewithai/mcp-cookie-cutter

Option 2: From Local Copy

  1. Clone this template:

    git clone https://github.com/codingthefuturewithai/mcp-cookie-cutter
  2. Create a project using the local template:

    cookiecutter path/to/mcp-cookie-cutter

Template Configuration

You'll be asked for:

  • project_name: Human-readable name (e.g., "My MCP Server")
  • __project_slug: Python package name (auto-generated from project_name, e.g., "my_mcp_server")
  • description: Short description of your project
  • author_name: Your name
  • email: Your email address
  • server_port: Port for Streamable HTTP transport (default: 3001)

Generated Project Structure

my_mcp_server/              # Your project directory
├── .claude/                # Claude Code integration
│   ├── agents/            # Security scanner agent
│   └── commands/          # DevFlow workflow commands
│       └── devflow/       # JIRA-integrated development workflow
├── my_mcp_server/          # Python package directory
│   ├── __init__.py
│   ├── __main__.py
│   ├── client/             # Client implementations
│   │   ├── __init__.py
│   │   └── app.py         # Test client for development
│   ├── server/            # Server implementation
│   │   ├── __init__.py
│   │   └── app.py        # Multi-transport MCP server (stdio, streamable HTTP)
│   ├── tools/             # Tool implementations
│   │   ├── __init__.py
│   │   └── example_tools.py  # Example tools with decorators
│   ├── decorators/        # Automatic tool decorators
│   │   ├── exception_handler.py
│   │   ├── tool_logger.py
│   │   ├── type_converter.py
│   │   └── parallelize.py
│   ├── log_system/        # Unified logging system
│   │   ├── correlation.py     # Correlation ID tracking
│   │   ├── unified_logger.py  # Main logging interface
│   │   └── destinations/      # Log destinations (SQLite, etc.)
│   ├── ui/                # Streamlit management UI
│   │   ├── app.py
│   │   ├── lib/          # UI components and utilities
│   │   └── pages/        # UI pages (Home, Config, Logs, Docs)
│   ├── config.py          # Server configuration
│   └── logging_config.py  # Logging setup
├── tests/                 # Test suite
│   ├── unit/             # Unit tests
│   └── integration/      # Integration tests
├── pyproject.toml         # Project configuration and dependencies
├── README.md             # Project documentation template
├── DEVELOPMENT.md        # Development guide
├── DEVELOPER_GUIDE.md    # Developer reference
└── SETUP_PROMPT.md       # AI-assisted setup guide

Next Steps

Once your project is generated:

  1. Review Documentation Templates

    • Customize README.md for your project
    • Review DEVELOPMENT.md for development workflow
    • Check DEVELOPER_GUIDE.md for architectural details
    • Use SETUP_PROMPT.md for AI-assisted setup
  2. Set Up Development Environment

    • Install dependencies: uv pip install -e .
    • Run tests: pytest
    • Start the server: python -m your_project_name --transport stdio
  3. Explore Transports

    • STDIO: python -m your_project_name --transport stdio
    • Streamable HTTP: python -m your_project_name --transport streamable-http --port 3001
  4. Test with MCP Inspector

    • Install: npm install -g @modelcontextprotocol/inspector
    • Run: mcp dev your_project_name/server/app.py
  5. Access Management UI

    • Start UI: streamlit run your_project_name/ui/app.py
    • View logs, configure server, browse documentation
  6. Add Your Own Tools

    • Add functions to tools/example_tools.py
    • Decorators are applied automatically
    • Register in example_tools or parallel_example_tools lists
  7. Use DevFlow Workflow (Optional)

    • Connect to JIRA
    • Use /devflow:plan-work ISSUE-KEY to plan
    • Use /devflow:implement ISSUE-KEY to implement
    • Use /devflow:security-review ISSUE-KEY to scan
    • Use /devflow:complete ISSUE-KEY to create PR

License

This template is licensed under the MIT License - see the LICENSE file for details.

Facts

Kind
MCP server
Repo
codingthefuturewithai/mcp-cookie-cutter
Group
Uncategorized
Stars
22
Language
Python
Last push
2026-07-12
Forks
15

More on this shelf

  1. 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
  2. 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
  3. 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
  4. 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
  5. 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  6. 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k