diff --git a/README.md b/README.md index 2e1181e..14722e0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ A part is a directory with: Application services carry the `services` profile, databases and other infrastructure carry `external`. +`mcp_servers` writes `.mcp.json` with the Context7 and Svelte docs servers. + The root also gets a `renovate.jsonc` that is nothing but an `extends` on the shared preset in `templates/renovate`. It does not subscribe the repo to anything on its own: the bot walks an explicit list, so a new repo still has to diff --git a/copier.yml b/copier.yml index d5481fc..a18df7a 100644 --- a/copier.yml +++ b/copier.yml @@ -32,6 +32,15 @@ parts: frontend: frontend default: [] +mcp_servers: + type: str + multiselect: true + help: MCP servers in .mcp.json + choices: + Context7 (library docs): context7 + Svelte docs: svelte + default: [] + init_git: type: bool help: git init and install pre-commit hooks diff --git a/template/{% if mcp_servers %}.mcp.json{% endif %}.jinja b/template/{% if mcp_servers %}.mcp.json{% endif %}.jinja new file mode 100644 index 0000000..b48cf50 --- /dev/null +++ b/template/{% if mcp_servers %}.mcp.json{% endif %}.jinja @@ -0,0 +1,11 @@ +{%- set urls = {'context7': 'https://mcp.context7.com/mcp', 'svelte': 'https://mcp.svelte.dev/mcp'} -%} +{ + "mcpServers": { +{%- for server in mcp_servers %} + "{{ server }}": { + "type": "http", + "url": "{{ urls[server] }}" + }{{ "," if not loop.last }} +{%- endfor %} + } +}