agentleFS
nesquikmnesquikm/mcp-rubber-duck/.claude/skills/setup-mcp-server/SKILL.md

setup-mcp-server

Skill179 starsChanged 55 days agoMITView on GitHub

Add mcp-rubber-duck MCP server to an AI coding tool (Claude Desktop, Cursor, VS Code, Windsurf, etc.)

  • Reads credentials

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 9 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS specifies a tool name, use it.

    line 36
  2. Very specific:

    Run uname -s to detect macOS / Linux / Windows (Git Bash).

    line 42
  3. Very specific:

    If we're inside the mcp-rubber-duck repo (check for package.json with "name": "mcp-rubber-duck"), offer from-source via node dist/index.js

    line 48
  4. Distinctive:

    Ask the user which providers to include.

    line 53
  5. Very specific:

    If real key: validate it looks reasonable (starts with expected prefix like sk- for OpenAI, gsk_ for Groq)

    line 66
  6. Very specific:

    If placeholder: use descriptive placeholders like your-openai-api-key-here

    line 67
  7. Very specific:

    Read the config template from .claude/skills/setup-mcp-server/references/tool-configs.md to get the exact JSON/YAML structure for the …

    line 71
  8. Very specific:

    Use the claude mcp add CLI command — this is the idiomatic way:

    line 77
  9. Very specific:

    If the user prefers project-scope, use --scope project (writes to .mcp.json).

    line 85
  10. Distinctive:

    Read the existing config file if it exists

    line 90
  11. Very specific:

    If rubber-duck entry already exists, warn the user and ask before overwriting

    line 91
  12. Distinctive:

    If other MCP servers exist, merge — never overwrite the entire file

    line 92
  13. Very specific:

    If the file doesn't exist, create it (and parent directories with mkdir -p)

    line 93
  14. Distinctive:

    If existing JSON is invalid, warn and offer to backup the broken file before writing

    line 94
  15. Distinctive:

    Write the final config

    line 95
  16. Distinctive:

    After writing the config, tell the user:

    line 106
  17. Distinctive:

    Never overwrite existing MCP server entries for other servers

    line 114
  18. Distinctive:

    Always create parent directories before writing config files

    line 115
  19. Distinctive:

    Use the exact JSON structure from the reference templates

    line 116

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Setup mcp-rubber-duck

You are setting up mcp-rubber-duck as an MCP server in an AI coding tool.

Reference

  • .claude/skills/setup-mcp-server/references/tool-configs.md — per-tool JSON/YAML config templates
  • .claude/skills/setup-mcp-server/references/provider-env-vars.md — env var reference
  • .claude/skills/setup-mcp-server/references/troubleshooting.md — common issues

Supported tools and config paths

ToolConfig File (macOS)KeyNotes
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonmcpServersWindows: %APPDATA%\Claude\claude_desktop_config.json
Claude Code (user)~/.claude.jsonmcpServersPrefer claude mcp add CLI
Claude Code (project).mcp.jsonmcpServersShared via VCS
Cursor (project).cursor/mcp.jsonmcpServers
Cursor (global)~/.cursor/mcp.jsonmcpServers
Windsurf~/.codeium/windsurf/mcp_config.jsonmcpServersSupports ${env:VAR}
VS Code.vscode/mcp.jsonserversDifferent key name! Uses ${env:VAR}
Continue.continue/config.yamlmcpServers (array)YAML format

ChatGPT supports MCP via UI only (Developer Mode > Add MCP Server), not a config file.

1. Determine target tool

If $ARGUMENTS specifies a tool name, use it. Otherwise ask the user:

Supported tools: claude-desktop, claude-code, cursor, windsurf, vscode, continue

2. Detect platform

Run uname -s to detect macOS / Linux / Windows (Git Bash). This affects config file paths.

3. Detect install method

Check in order:

  1. which mcp-rubber-duck — if found, use mcp-rubber-duck as the command
  2. If we're inside the mcp-rubber-duck repo (check for package.json with "name": "mcp-rubber-duck"), offer from-source via node dist/index.js
  3. Default to npx -y mcp-rubber-duck

4. Ask about providers

Ask the user which providers to include. Offer these choices:

  • OpenAI (OPENAI_API_KEY) — most popular
  • Google Gemini (GEMINI_API_KEY)
  • Groq (GROQ_API_KEY) — fast inference
  • Ollama (local, no key needed)
  • CLI agents (Claude CLI, Codex, Gemini CLI, Aider)

Allow multiple selections.

5. Ask about API keys

For each selected HTTP provider that needs a key, ask: provide a real key now or use a placeholder to fill in later?

  • If real key: validate it looks reasonable (starts with expected prefix like sk- for OpenAI, gsk_ for Groq)
  • If placeholder: use descriptive placeholders like your-openai-api-key-here

6. Load reference templates

Read the config template from .claude/skills/setup-mcp-server/references/tool-configs.md to get the exact JSON/YAML structure for the target tool.

7. Write the configuration

For Claude Code (claude-code)

Use the claude mcp add CLI command — this is the idiomatic way:

claude mcp add --scope user rubber-duck -- mcp-rubber-duck

Then set env vars by editing ~/.claude.json to add the env block, or suggest the user set them in their shell profile.

If the user prefers project-scope, use --scope project (writes to .mcp.json).

For all other tools

  1. Determine the config file path (platform-aware) from the reference templates
  2. Read the existing config file if it exists
  3. If rubber-duck entry already exists, warn the user and ask before overwriting
  4. If other MCP servers exist, merge — never overwrite the entire file
  5. If the file doesn't exist, create it (and parent directories with mkdir -p)
  6. If existing JSON is invalid, warn and offer to backup the broken file before writing
  7. Write the final config

Important details

  • Always include "MCP_SERVER": "true" in the env block — this is required
  • VS Code uses "servers" key, not "mcpServers" — get this right
  • Continue uses YAML with mcpServers as an array of objects
  • Windsurf & VS Code support ${env:VAR_NAME} syntax for env var interpolation

8. Print verification steps

After writing the config, tell the user:

  1. Restart the tool (fully quit and relaunch for desktop apps)
  2. Test by using the list_ducks tool with check_health: true
  3. Troubleshoot — point them to .claude/skills/setup-mcp-server/references/troubleshooting.md if anything goes wrong

Important rules

  • Never overwrite existing MCP server entries for other servers
  • Always create parent directories before writing config files
  • Use the exact JSON structure from the reference templates
  • For env var interpolation tools (VS Code, Windsurf), prefer ${env:VAR} syntax over hardcoded keys
  • Include DEFAULT_PROVIDER set to the first selected HTTP provider

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.