Self-Evolving MCP Brain
A self-updating MCP (Model Context Protocol) system: analyze design/code inputs with an LLM, converse to refine them, then crystallize approved patterns into a local skill library that MCP agents can read.
Components
| File | Role | Port | |---|---|---| | mcp_server.py | FastMCP server; exposes skills://rhythm-standards resource | (stdio MCP) | | ui_server.py | FastAPI backend — bridges UI ↔ freellmapi proxy | 8000 | | frontend_server.py | Static server for the Vue 3 SPA | 3000 | | freellmapi_client.py | Raw-HTTP client for the freellmapi proxy (no OpenAI SDK) | — | | frontend/index.html | Vue 3 chat UI + code preview | — | | .mcp_skills/ | Crystallized skills library (read by the MCP resource) | — |
Prerequisites
- Python 3.10+ (built on 3.12).
- The
freellmapiproxy running locally onhttp://localhost:3001
(it is a Node/Docker app, not a Python package).
- A unified key from the proxy's Keys page.
Setup
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # then edit FREELLMAPI_KEY
set -a; source .env; set +a # export env vars into your shell
Run (Phase 2)
# Terminal A — UI backend
python ui_server.py # :8000
# Terminal B — frontend
python frontend_server.py # :3000
Open http://localhost:3000.
Phase status
- Phase 1 ✅ MCP server + resource.
- Phase 2 ✅ Conversational analyzer UI + freellmapi integration.
- Phase 3 ✅ Crystallization pipeline (APPROVE & CRYSTALLIZE button).
- Phase 4 ✅ End-to-end test with a real link.






