loading…
Search for a command to run...
loading…
Exposes cookiecutter templates through MCP, enabling discovery, registration, management, and project generation from templates.
Exposes cookiecutter templates through MCP, enabling discovery, registration, management, and project generation from templates.
Dynamo MCP is a system that exposes cookiecutter templates through the Model Context Protocol (MCP). It allows you to discover, register, and manage cookiecutter templates, and generate projects from them - enabling a more efficient, error-free "Vibe coding" experience.
Cookiecutter is a command-line tool that generates projects from templates. It uses a template directory with a cookiecutter.json file to create customized project structures.
Templates enable rapid project scaffolding with best practices built-in. The cookiecutter ecosystem offers thousands of community-maintained templates across programming languages and frameworks, encapsulating collective expertise for developers to leverage instantly.
"Vibe coding" is a modern approach where developers use AI tools to generate code from natural language prompts. Developers describe functionality in plain language while AI handles implementation details.
The synergy between cookiecutter templates, MCP, and AI creates a powerful development workflow:
This combination dramatically reduces errors, accelerates development, and lets developers focus on high-level design rather than repetitive coding tasks.
Great coding starts with great templates. Templates form the foundation of the Vibe Coding approach, combining efficiency, consistency, and enjoyment. When paired with AI-powered code generation, the result is nearly error-free development that maximizes productivity.
Dynamo MCP's extensive template library gives you instant access to templates for virtually any project type, letting you start building with good vibes from day one.
# Clone the repository
git clone https://github.com/ruvnet/dynamo-mcp.git
cd dynamo-mcp
# Install the package
pip install -e .
You can use this repository as a cookiecutter template to create your own MCP server:
# Install cookiecutter if you haven't already
pip install cookiecutter
# Create a new project from the template
cookiecutter https://github.com/ruvnet/dynamo-mcp
# Follow the prompts to customize your project
This will create a new project with the following features:
# Start the MCP server with SSE transport (default)
dynamo-mcp
# Start the MCP server with stdio transport
dynamo-mcp --transport stdio
# Start the MCP server with custom host and port
dynamo-mcp --host 0.0.0.0 --port 8000
The MCP server exposes the following tools:
list_templates: List all available cookiecutter templateslist_templates_by_category: List templates filtered by categoryget_categories: Get all unique template categoriessearch_templates: Search templates by name, description, category, or tagsadd_template: Add a new cookiecutter templateupdate_template: Update a cookiecutter templateremove_template: Remove a cookiecutter templatediscover_templates: Discover templates from the default template libraryget_template_variables: Get the variables for a cookiecutter templatecreate_project: Create a project from a cookiecutter templateThe MCP server also exposes the following resources:
templates://list: List all available cookiecutter templatestemplates://categories: List all template categoriestemplates://category/{category}: List templates in a specific categorytemplates://search/{query}: Search templates by querytemplates://{name}/variables: Get the variables for a specific cookiecutter templatetemplates://{name}/info: Get information about a specific cookiecutter templateimport asyncio
from fastmcp import FastMCPClient
async def main():
# Connect to the MCP server
client = FastMCPClient("http://localhost:3000")
# Add a template
template = await client.call_tool("add_template", {
"url": "https://github.com/audreyfeldroy/cookiecutter-pypackage.git",
"name": "python-package",
"description": "A cookiecutter template for creating Python packages"
})
print(f"Added template: {template}")
asyncio.run(main())
import asyncio
from fastmcp import FastMCPClient
async def main():
# Connect to the MCP server
client = FastMCPClient("http://localhost:3000")
# Create a project
project_path = await client.call_tool("create_project", {
"template_name": "python-package",
"output_dir": "projects",
"variables": {
"project_name": "My Project",
"project_slug": "my_project",
"project_short_description": "A sample project",
"full_name": "John Doe",
"email": "[email protected]",
"github_username": "johndoe",
"version": "0.1.0",
"command_line_interface": "Click",
"use_pytest": "y",
"use_black": "y",
"use_pypi_deployment_with_travis": "y",
"add_pyup_badge": "y",
"create_author_file": "y",
"open_source_license": "MIT"
}
})
print(f"Created project at: {project_path}")
asyncio.run(main())
import asyncio
from fastmcp import FastMCPClient
async def main():
# Connect to the MCP server
client = FastMCPClient("http://localhost:3000")
# Get all categories
categories = await client.call_tool("get_categories", {})
print(f"Available categories: {categories}")
# List templates in a specific category
python_templates = await client.call_tool("list_templates_by_category", {
"category": "Python"
})
print(f"Python templates: {python_templates}")
asyncio.run(main())
import asyncio
from fastmcp import FastMCPClient
async def main():
# Connect to the MCP server
client = FastMCPClient("http://localhost:3000")
# Search for templates
django_templates = await client.call_tool("search_templates", {
"query": "django"
})
print(f"Django-related templates: {django_templates}")
# Access search resource directly
flask_templates = await client.access_resource("templates://search/flask")
print(f"Flask-related templates: {flask_templates}")
asyncio.run(main())
The system includes a SQLite database for storing and managing templates. The database provides the following features:
The database schema is defined in dynamo_mcp/sql/schema.sql and includes the following tables:
templates: Stores template information
id: Unique identifiername: Template nameurl: Template repository URLdescription: Template descriptioncategory: Template categorytags: Comma-separated list of tagscreated_at: Creation timestamptemplate_versions: Stores version information for templates
id: Unique identifiertemplate_id: Reference to templates.idversion: Version stringgit_hash: Git hash of the versioncreated_at: Creation timestamptemplate_dependencies: Stores dependencies between templates
id: Unique identifiertemplate_id: Reference to templates.iddependency_id: Reference to templates.idoptional: Whether the dependency is optionalThe database is automatically initialized when the system starts. You can also manually initialize or reset the database:
# Initialize the database with default templates
python -m dynamo_mcp.scripts.init_db
# Reset the database (delete and recreate)
python -m dynamo_mcp.scripts.init_db --reset
# Initialize the database using the SQL schema file
python -m dynamo_mcp.scripts.init_db_from_sql
# Initialize only the schema without adding templates
python -m dynamo_mcp.scripts.init_db_from_sql --schema-only
The following environment variables can be used to configure the system:
DYNAMO_MCP_BASE_DIR: Base directory for templates and virtual environments (default: ~/.dynamo-mcp)DYNAMO_MCP_TEMPLATES_DIR: Directory for templates (default: ~/.dynamo-mcp/templates)DYNAMO_MCP_VENVS_DIR: Directory for virtual environments (default: ~/.dynamo-mcp/venvs)DYNAMO_MCP_HOST: Host to bind to (default: localhost)DYNAMO_MCP_PORT: Port to bind to (default: 3000)DYNAMO_MCP_TRANSPORT: Transport type (default: sse)DYNAMO_MCP_AUTH_ENABLED: Enable authentication (default: false)DYNAMO_MCP_AUTH_USERNAME: Authentication username (default: admin)DYNAMO_MCP_AUTH_PASSWORD: Authentication password (default: password)# Run all tests
pytest
# Run a specific test
pytest tests/test_basic.py
# Run a comprehensive test
python tests/comprehensive_test.py
dynamo_mcp/: Main packageapi/: API componentsmcp_server.py: MCP serversse_transport.py: SSE transport layercore/: Core componentsenvironment_manager.py: Environment managerinterface_generator.py: Interface generatormodels.py: Data modelsproject_generator.py: Project generatortemplate_registry.py: Template registryutils/: Utility componentsconfig.py: Configurationdatabase.py: Database utilitiesexceptions.py: Exceptionsinit_template_db.py: Database initializationscripts/: Scriptsinit_db.py: Database initialization scriptinit_db_from_sql.py: Database initialization from SQL schemasql/: SQL filesschema.sql: Database schema definitionmain.py: Main entry pointtests/: Teststest_basic.py: Basic teststest_database.py: Database teststest_mcp_stdio.py: MCP stdio transport testscomprehensive_test.py: Comprehensive testsThis project is licensed under the MIT License - see the LICENSE file for details.
This repository is already set up with the basic cookiecutter template structure (cookiecutter.json and hooks). To convert it to a full cookiecutter template with proper variable substitution:
# Run the conversion script
python scripts/convert_to_template.py
# Test the template locally
cookiecutter .
# If everything looks good, commit and push to GitHub
git add .
git commit -m "Convert to cookiecutter template"
git push
After pushing to GitHub, users can create new projects from your template using:
cookiecutter https://github.com/ruvnet/dynamo-mcp
Run in your terminal:
claude mcp add dynamo-mcp -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.