A creative MCP server that analyzes Python code complexity and style to generate a visual "vibe" (SVG color palette) and a rich, procedural "Abstract Code Art" SVG image representing the code's structure. This allows GitHub Copilot to "see" the mood of the code and describe it creatively.
analyze_code_metricsTool: Calculates cyclomatic complexity, lines of code, comment ratio, and maintainability index usingradon.generate_vibe_paletteTool: Maps the metrics to a theme color palette (hex codes) and a descriptive "vibe" (e.g., "Chaotic Neon", "Zen Garden").generate_abstract_artTool: Generates a rich, procedural SVG artwork based on the code's metrics and color palette.vibe_checkPrompt: A custom prompt that instructs Copilot to run these tools and present the final artwork and a poetic description to the user.
- Ensure you have Python 3.10+ installed.
- Install dependencies using
uv:uv add mcp radon
To use this MCP server with GitHub Copilot in VS Code, you need to configure it in your MCP settings.
- Open the Command Palette (
Cmd+Shift+PorCtrl+Shift+P). - Search for and select "GitHub Copilot: Edit MCP Settings".
- Add the following configuration to the
mcpServersobject in themcp.jsonfile:
{
"mcpServers": {
"code-synesthesia": {
"command": "uv",
"args": [
"run",
"python",
"server.py"
]
}
}
}Note: Ensure the path to server.py is correct for your system.
- Restart VS Code or reload the window.
- Open a Python file and ask Copilot Chat: "Run a vibe check on this file using the code-synesthesia MCP server."
Note: GitHub Copilot Chat in VS Code can render SVG code blocks directly in the chat window, allowing you to see the generated art without leaving the editor!
