mcp-setup

A command that configures Model Context Protocol servers, which let an AI coding tool connect to outside services, according to a project’s architecture.

In plain words
What is it for?
Use it after defining the project architecture or adding an integration to check available servers and configure the ones needed for databases, email, payments, deployment, design, monitoring, or task management.
Why use it?
It avoids guessing server names, commands, transports, or credentials, which can leave integrations unable to start.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/polmarza/project-template/mcp-setup
Clone the repo
git clone --depth 1 https://github.com/polmarza/project-template

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,051 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01051
Opus 5 $0.00000 $0.00526
Sonnet 5 $0.00000 $0.00210
Haiku 4.5 $0.00000 $0.00105

Measured 2d ago against content hash 286bfa7756ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/mcp-setup.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Configura los servidores MCP de este proyecto según el stack definido en docs/architecture.md.

Sigue el "Protocolo de MCPs" de CLAUDE.md. Este comando lo lanza a demanda; el flujo normal es que se ejecute solo al terminar la arquitectura o al añadir una integración nueva.

1. Contexto

  1. Lee docs/architecture.md. Si el stack todavía no está definido, dilo y para aquí: sin stack no hay nada que decidir.
  2. Ejecuta claude mcp list para ver qué servidores hay ya disponibles y en qué estado están.

2. Averigua qué existe

Por cada servicio del stack (base de datos, emails, pagos, despliegue, diseño, observabilidad, gestión de tareas…), determina si publica un servidor MCP.

Si no estás seguro de que exista, de cómo se llama el paquete, de qué transporte usa o de qué credenciales pide, búscalo en la documentación oficial del servicio antes de proponerlo. No inventes comandos ni nombres de variables de entorno: un claude mcp add mal copiado deja un servidor que no arranca y cuesta más depurarlo que buscarlo bien a la primera.

Como fuente vale el dominio del proveedor o su repositorio oficial, nada más. Un blog, un agregador de MCPs o un gist no son fuente válida para un comando que se va a ejecutar en la máquina del usuario: un paquete typosquatteado se ejecuta con npx exactamente igual que el legítimo. Si solo lo encuentras en fuentes no oficiales, dilo y que decida el usuario.

Descarta los servicios sin MCP sin darles vueltas.

3. Pregunta

Presenta la lista de candidatos y, por cada uno, pregunta con qué alcance lo quiere:

Alcance Dónde vive Quién lo ve Cuándo usarlo
Global (user) ~/.claude.json Solo el usuario, en todos sus proyectos Ya lo tiene configurado o lo usa en todas partes. No se toca nada del repo
Proyecto (project) .mcp.json, commiteado Todo el equipo Recomendado: el servidor forma parte del proyecto y el equipo lo hereda
Local (local) ~/.claude.json, bajo la ruta del proyecto Solo el usuario, solo aquí Pruebas o credenciales que no quiere ni referenciadas en el repo

Read the full file on GitHub · 83 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 83 lines · 0 tokens per session scan A 286bfa7756ab

Subscribe to this mod's changes

mcp-setup is a command published in the GitHub repository polmarza/project-template (79 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,051 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.