Initial commit: Clean DSS implementation
Migrated from design-system-swarm with fresh git history.
Old project history preserved in /home/overbits/apps/design-system-swarm
Core components:
- MCP Server (Python FastAPI with mcp 1.23.1)
- Claude Plugin (agents, commands, skills, strategies, hooks, core)
- DSS Backend (dss-mvp1 - token translation, Figma sync)
- Admin UI (Node.js/React)
- Server (Node.js/Express)
- Storybook integration (dss-mvp1/.storybook)
Self-contained configuration:
- All paths relative or use DSS_BASE_PATH=/home/overbits/dss
- PYTHONPATH configured for dss-mvp1 and dss-claude-plugin
- .env file with all configuration
- Claude plugin uses ${CLAUDE_PLUGIN_ROOT} for portability
Migration completed: $(date)
🤖 Clean migration with full functionality preserved
This commit is contained in:
43
orchestrator/server.py
Executable file
43
orchestrator/server.py
Executable file
@@ -0,0 +1,43 @@
|
||||
|
||||
import asyncio
|
||||
import httpx
|
||||
import logging
|
||||
import sys
|
||||
import os
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
# --- LOGGING SETUP ---
|
||||
logging.basicConfig(level=logging.INFO, format="[%(levelname)s] %(message)s")
|
||||
logger = logging.getLogger("orchestrator")
|
||||
|
||||
# --- CONFIG ---
|
||||
WORKER_URL = "http://localhost:3000"
|
||||
|
||||
# Set port via environment variable
|
||||
os.environ["MCP_SERVER_PORT"] = "3000"
|
||||
|
||||
# --- MCP SERVER ---
|
||||
mcp = FastMCP("design-system-orchestrator")
|
||||
|
||||
@mcp.tool()
|
||||
async def ingest_figma_file(file_key: str, token: str) -> str:
|
||||
"""Ingests a Figma file and extracts design tokens."""
|
||||
async with httpx.AsyncClient() as client:
|
||||
try:
|
||||
resp = await client.post(f"{WORKER_URL}/ingest/figma", json={
|
||||
"fileKey": file_key,
|
||||
"token": token
|
||||
})
|
||||
resp.raise_for_status()
|
||||
return f"Ingestion Success: {resp.json()}"
|
||||
except Exception as e:
|
||||
return f"Worker Error: {str(e)}"
|
||||
|
||||
@mcp.tool()
|
||||
async def get_status() -> str:
|
||||
"""Returns the status of the design system orchestrator."""
|
||||
return "Design System Orchestrator: Online"
|
||||
|
||||
if __name__ == "__main__":
|
||||
logger.info("Starting Design System Orchestrator MCP Server (SSE on port 3000)")
|
||||
mcp.run(transport="sse")
|
||||
Reference in New Issue
Block a user