claude-code-mcp-manual-install

Edit ~/.claude.json mcpServers entries with jq for HTTP and stdio servers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/shimo4228/claude-code-learned-skills --skill claude-code-mcp-manual-install
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-mcp-manual-install
Source: https://github.com/shimo4228/claude-code-learned-skills/tree/main/skills/claude-code-mcp-manual-install
Command: npx skills add https://github.com/shimo4228/claude-code-learned-skills --skill claude-code-mcp-manual-install

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a Claude Code session cannot access the CLI (e.g., inside a nested session), adding MCP servers is blocked. This Skill provides a workaround by using jq to edit the ~/.claude.json file and add MCP server entries under mcpServers.

Core Features & Use Cases

  • Edit ~/.claude.json to add MCP servers under mcpServers using jq.
  • Supports both in-session usage when the CLI is unavailable and non-interactive environments.
  • Advises atomic write patterns and a restart to ensure the server list loads reliably.

Quick Start

Edit the ~/.claude.json file to add a new entry under mcpServers with jq, then restart Claude Code to apply changes.

Frequently Asked Questions about claude-code-mcp-manual-install

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

FAQPage Schema
How do I add MCP servers to Claude Code without using the CLI?

To add MCP servers without CLI access, edit the ~/.claude.json file directly using jq to insert new entries under the mcpServers section, then restart Claude Code to apply the changes.

Can I configure stdio and HTTP type MCP servers inside a nested Claude Code session?

Yes, you can configure both stdio and HTTP type MCP servers inside a nested session by using jq to append their configurations into the mcpServers section of the ~/.claude.json file.

Do I need jq installed to automate MCP server configuration in non-interactive environments?

Yes, jq is required to automate MCP server configuration in non-interactive environments because it handles the atomic JSON edits needed to safely update the ~/.claude.json file.

What is the best way to prevent session corruption when editing the mcpServers section in claude.json?

The best way to prevent session corruption when editing the mcpServers section is to apply atomic write patterns with jq and restart Claude Code immediately after the changes are saved.

Why does my newly added MCP server not load after updating claude.json?

Newly added MCP servers may not load if you skip the required restart after updating claude.json; a session restart is necessary to reliably reload the server list from the updated file.

When do I need to manually edit claude.json to add MCP servers instead of using standard commands?

You need to manually edit claude.json when you are in a nested or non-interactive Claude Code session where the standard CLI is unavailable, blocking normal MCP server additions.