add-mcp-server

Add MCP servers to Claude Code repositories by updating .mcp.json, .env, and .gitignore.

4|5|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/fartybobo/farty-bobo --skill add-mcp-server-fartybobo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-mcp-server
Source: https://github.com/fartybobo/farty-bobo/tree/main/skills/add-mcp-server
Command: npx skills add https://github.com/fartybobo/farty-bobo --skill add-mcp-server-fartybobo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing project-level MCP servers in Claude Code forces you to juggle .mcp.json, .env, .gitignore, and secrets manually, so you often overwrite existing servers or expose credentials inadvertently.

Core Features & Use Cases

  • Scoped Setup: Gathers server name, type (command versus HTTP/SSE), and any missing env vars before editing files, preventing partial updates that break the MCP config.
  • Credential-safe Config: Reads existing .mcp.json and .env to merge the new server entry, writes ${VAR_NAME} references instead of literal tokens, and ensures .env is covered by .gitignore.
  • Use Case: Add an HTTP-based MCP server used only inside this repo for integration tests, keeping the server definition and secrets isolated from your global Claude Code configuration.

Quick Start

Tell Claude Code to add a project-specific MCP server and update the .env and .gitignore files with its required secrets.

Frequently Asked Questions about add-mcp-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an MCP server to a Claude Code repository?

To add an MCP server to a Claude Code repository, provide the server name, type, and required environment variables to update .mcp.json and .env safely. This merges the new server entry into existing files and prompts for missing secrets before writing.

How do I keep MCP server credentials out of git when using Claude Code?

To keep MCP server credentials out of git, use ${VAR_NAME} environment references in .mcp.json instead of literal tokens and ensure .env is added to .gitignore. This secret handling approach prevents inadvertent credential exposure in your project config.

Can I add both command-based and HTTP/SSE MCP servers scoped to a project?

Yes, you can add both command-based and HTTP/SSE MCP servers scoped to a project. The setup process targets Claude Code repositories and gathers the server type information to configure project-level isolation from your global configuration.

What is the best way to merge a new MCP server into an existing .mcp.json file?

The best way to merge a new MCP server into an existing .mcp.json file is to read the current configuration first and append the new entry. This prevents overwriting existing servers by merging entries and maintaining existing env references during file updates.

Why does my MCP server configuration break when I add a new one manually?

Your MCP server configuration breaks when added manually because partial updates can corrupt the project config. Gathering all required server info and missing secrets before editing .mcp.json prevents partial updates that break the MCP configuration.