MCP Config Generator
Generate a .mcp.json configuration file tailored to the user's project and tech stack. This file tells Claude Code which MCP servers to connect to, so the user gets relevant tools automatically when working in their repo.
Workflow
Step 1 — Check for user input
Look at what the user has already told you. If they've named specific MCP servers or services they want (e.g., "set up Supabase and GitHub MCP"), skip the interview and go straight to Step 3. If not, proceed to Step 2.
Step 2 — Interview the user
Ask the user which MCP servers they'd like. Keep it conversational — don't dump the full list. Instead, ask what services and tools they use in this project. Things like:
- Database (Supabase, Postgres)
- Payments (Stripe)
- Analytics (PostHog)
- Source control (GitHub)
- Design tools (Figma, Pencil)
- UI components (shadcn, 21st.dev Magic)
- Browser automation (Playwright)
- Web scraping (Firecrawl)
- Documentation lookup (Context7)
Once you have their selections, move to Step 3.
Step 3 — Offer codebase review
Ask the user:
"Would you also like me to review your project's codebase and recommend additional MCP servers that could be useful?"
- If yes → proceed to Step 4.
- If no → skip to Step 5.
Step 4 — Review codebase & recommend servers
Analyze the project to understand its tech stack. Look at:
package.json(dependencies, devDependencies)- Framework config files (e.g.,
next.config.*,vite.config.*,nuxt.config.*) - Database config or migration files
.env/.env.examplefiles (to see what services are already in use)- Any existing
.mcp.jsonor MCP-related config - Project structure and key directories
Cross-reference what you find against the server catalog in references/mcp-servers.md. For each recommendation, briefly explain why it would be useful for this specific project — don't just list servers.
Present your recommendations and let the user confirm which ones to include before generating the file.
Step 5 — Generate .mcp.json
Read references/mcp-json-config.md for the exact file format and best practices. Then generate the .mcp.json file at the project root with all selected MCP servers.
Follow these rules when generating the config:
-
Use environment variables for secrets. Never hardcode API keys, tokens, or passwords. Use
${VAR_NAME}syntax so each team member can set their own credentials. -
Pick the right transport type. Use
"type": "http"for remote servers that provide a URL endpoint. Use"type": "stdio"for servers that run locally vianpxor another CLI command. Only use SSE if a server specifically requires it — HTTP is preferred. -
Use the exact server configs from the catalog. The installation blocks in
references/mcp-servers.mdare tested and correct. Use them as-is rather than improvising configs. If the user wants a server not in the catalog, construct the config based on that server's official documentation. -
Include helpful comments as a companion message. After writing the file, tell the user:
- Which environment variables they need to set (and where to get the values)
- Any one-time setup steps (e.g.,
npx playwright installfor Playwright) - That they can check server status with
/mcpinside Claude Code
-
Validate the JSON. Make sure the output is valid JSON — no trailing commas, no comments in the file, proper escaping.
Reference Files
references/mcp-servers.md— Catalog of popular MCP servers with descriptions and installation configs. Read this when you need to look up server details or recommend servers based on a project's tech stack.references/mcp-json-config.md— Complete guide to.mcp.jsonfile format, transport types, environment variable expansion, and security best practices. Read this when generating the config file.