From 8713e2b1c91b1dd27e6d6dc9383983c0094bb632 Mon Sep 17 00:00:00 2001 From: Bruno Sarlo Date: Wed, 10 Dec 2025 16:14:54 -0300 Subject: [PATCH] feat: Add setup-mcp.sh for generating local MCP config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitignore | 2 ++ scripts/setup-mcp.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 scripts/setup-mcp.sh diff --git a/.gitignore b/.gitignore index 3109070..6a8d3e5 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,5 @@ dist/ out/ storybook-static/ venv/ +# Local MCP config (generated) +# .mcp.json diff --git a/scripts/setup-mcp.sh b/scripts/setup-mcp.sh new file mode 100755 index 0000000..67a867a --- /dev/null +++ b/scripts/setup-mcp.sh @@ -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."