feat: Add setup-mcp.sh for generating local MCP config
Some checks failed
DSS Project Analysis / dss-context-update (push) Has been cancelled

If ${workspaceFolder} isn't supported, run:
  ./scripts/setup-mcp.sh

Generates .mcp.json with absolute paths for current setup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-10 16:14:54 -03:00
parent 2b736f7ddd
commit 8713e2b1c9
2 changed files with 29 additions and 0 deletions

2
.gitignore vendored
View File

@@ -68,3 +68,5 @@ dist/
out/
storybook-static/
venv/
# Local MCP config (generated)
# .mcp.json

27
scripts/setup-mcp.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Generate .mcp.json with absolute paths for current setup
DSS_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cat > "$DSS_ROOT/.mcp.json" << EOF
{
"\$schema": "https://raw.githubusercontent.com/anthropics/claude-code/main/schemas/mcp-servers.schema.json",
"mcpServers": {
"dss": {
"command": "$DSS_ROOT/venv/bin/python3",
"args": ["$DSS_ROOT/dss-claude-plugin/servers/dss-mcp-server.py"],
"env": {
"PYTHONPATH": "$DSS_ROOT:$DSS_ROOT/dss-claude-plugin",
"DSS_HOME": "$DSS_ROOT/.dss",
"DSS_DATABASE": "$DSS_ROOT/.dss/dss.db",
"DSS_CACHE": "$DSS_ROOT/.dss/cache",
"DSS_BASE_PATH": "$DSS_ROOT"
},
"description": "Design System Server MCP - local development"
}
}
}
EOF
echo "Generated .mcp.json for: $DSS_ROOT"
echo "Restart Claude Code to load the DSS MCP server."