The MCP Project Orchestrator is a comprehensive tool for managing Model Context Protocol (MCP) projects, providing template management, prompt handling, and Mermaid diagram generation capabilities. This guide will help you install and use the tool effectively.
You can install the MCP Project Orchestrator using pip:
pip install mcp-project-orchestrator
Alternatively, if you use Poetry for dependency management:
poetry add mcp-project-orchestrator
The Template Manager allows you to handle project templates for quick setup:
from mcp_project_orchestrator.templates import TemplateManager
# Initialize template manager
manager = TemplateManager("path/to/templates")
# List available templates
templates = manager.list_templates()
print(templates)
# Apply a project template with custom variables
manager.apply_template("fastapi-project", {
"project_name": "my-api",
"project_description": "My FastAPI project",
"author_name": "John Doe",
"author_email": "[email protected]"
})
The Prompt Manager helps you organize and render prompt templates:
from mcp_project_orchestrator.prompts import PromptManager
# Initialize prompt manager
manager = PromptManager("path/to/prompts")
# List available prompts
prompts = manager.list_prompts()
print(prompts)
# Render a prompt with variable substitution
rendered = manager.render_prompt("system-prompt", {
"name": "User",
"project": "MCP"
})
print(rendered)
Generate and render Mermaid diagrams using the built-in tools:
from mcp_project_orchestrator.mermaid import MermaidGenerator, MermaidRenderer
# Initialize generators
generator = MermaidGenerator()
renderer = MermaidRenderer()
# Generate a flowchart
flowchart = generator.generate_flowchart(
nodes=[
("A", "Start"),
("B", "Process"),
("C", "End")
],
edges=[
("A", "B", ""),
("B", "C", "")
]
)
# Render to SVG
renderer.render(flowchart, "flowchart.svg")
For a complete workflow combining templates, prompts, and diagrams:
from mcp_project_orchestrator.templates import TemplateManager
from mcp_project_orchestrator.prompts import PromptManager
from mcp_project_orchestrator.mermaid import MermaidGenerator, MermaidRenderer
# Initialize components
template_manager = TemplateManager("templates/")
prompt_manager = PromptManager("prompts/")
mermaid_generator = MermaidGenerator()
mermaid_renderer = MermaidRenderer()
# Create a new project from template
template_manager.apply_template("api-project", {
"project_name": "customer-api",
"version": "1.0.0"
})
# Generate a system prompt for the project
system_prompt = prompt_manager.render_prompt("api-system-prompt", {
"api_name": "customer-api",
"api_version": "1.0.0"
})
# Create architecture diagram
architecture = mermaid_generator.generate_flowchart(
nodes=[
("client", "Client"),
("api", "API"),
("db", "Database")
],
edges=[
("client", "api", "HTTP"),
("api", "db", "SQL")
]
)
# Save diagram to project directory
mermaid_renderer.render(architecture, "customer-api/docs/architecture.svg")
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.