How to Configure MCP Servers in Claude config.json: A Complete Guide

To configure MCP servers in Claude, create or edit ~/.claude/config.json to include an mcpServers object that maps server names to their launch commands and script paths, then restart Claude Code to load the new tools.

The joeseesun/qiaomu-anything-to-notebooklm repository provides external MCP (Model Context Protocol) servers that enable Claude to fetch content from restricted sources like WeChat public articles and Feishu documents. Because the core skill logic in main.py delegates content scraping to these external Python processes, you must declare the servers in Claude's global configuration file to activate them.

Locate the Configuration File

Claude reads its global settings from ~/.claude/config.json on startup. If the .claude directory or config.json file does not exist, create them manually. This file controls which external tools Claude can invoke, including the WeChat reader and Feishu reader MCPs provided by this repository.

Step-by-Step Configuration

1. Define the MCP Servers Object

The configuration requires a top-level mcpServers key containing a JSON object. Each key under mcpServers represents a unique server name (used by the skill to reference the tool), and its value specifies how to launch the process.

According to the repository's SKILL.md (lines 75-92) and README.md (lines 71-90), you must provide:

  • command: The interpreter to run (typically python)
  • args: An array containing the absolute path to the server entry point script

2. Configure the WeChat Reader MCP

Add the weixin-reader server to handle WeChat article scraping via Playwright. This corresponds to the FastMCP("weixin-reader") definition found in wexin-read-mcp/src/server.py.

{
  "primaryApiKey": "any",
  "mcpServers": {
    "weixin-reader": {
      "command": "python",
      "args": [
        "/Users/joe/.claude/skills/qiaomu-anything-to-notebooklm/wexin-read-mcp/src/server.py"
      ]
    }
  }
}

3. Configure the Feishu Reader MCP

Add the feishu-reader server to convert Feishu documents to Markdown. This maps to the FastMCP("feishu-reader") implementation in feishu-read-mcp/src/server.py (lines 12-28).

{
  "primaryApiKey": "any",
  "mcpServers": {
    "feishu-reader": {
      "command": "python",
      "args": [
        "/Users/joe/.claude/skills/qiaomu-anything-to-notebooklm/feishu-read-mcp/src/server.py"
      ]
    }
  }
}

4. Complete Configuration Example

To enable both content sources simultaneously, merge the definitions under a single mcpServers object as validated by check_env.py (line 211):

{
  "primaryApiKey": "any",
  "mcpServers": {
    "weixin-reader": {
      "command": "python",
      "args": [
        "/Users/joe/.claude/skills/qiaomu-anything-to-notebooklm/wexin-read-mcp/src/server.py"
      ]
    },
    "feishu-reader": {
      "command": "python",
      "args": [
        "/Users/joe/.claude/skills/qiaomu-anything-to-notebooklm/feishu-read-mcp/src/server.py"
      ]
    }
  }
}

Verify the Configuration

Test Server Execution

Before restarting Claude, verify that the Python scripts execute without errors. Run each server manually to ensure dependencies are installed:


# Test WeChat MCP server

python ~/.claude/skills/qiaomu-anything-to-notebooklm/wexin-read-mcp/src/server.py

# Test Feishu MCP server  

python ~/.claude/skills/qiaomu-anything-to-notebooklm/feishu-read-mcp/src/server.py

If configured correctly, the scripts will initialize and print log messages indicating they are listening for requests.

Restart Claude Code

After saving config.json, completely restart Claude Code to load the new MCP servers. Claude caches the configuration on startup, so edits made while the application is running will not take effect until restart.

Once restarted, the skill can invoke read_weixin_article and read_feishu_doc tools through the FastMCP framework, delegating content fetching to these external processes rather than handling scraping logic internally.

How the Skill Uses MCP

The architecture separates concerns: main.py contains the orchestration logic and URL pattern matching, while the heavy lifting (browser automation for WeChat, Feishu API authentication) resides in the respective MCP servers. When you execute a command like:

qiaomu-anything-to-notebooklm "https://mp.weixin.qq.com/s/abc123"

Claude identifies the URL pattern, calls the corresponding MCP tool defined in config.json, and receives the extracted Markdown content for processing.

Summary

  • Configuration location: Edit ~/.claude/config.json to declare MCP servers
  • Required structure: Each server needs a unique name, command (python), and args array with the absolute path to wexin-read-mcp/src/server.py or feishu-read-mcp/src/server.py
  • Implementation details: Servers use FastMCP framework as defined in their respective src/server.py entry points
  • Activation requirement: Restart Claude Code after saving configuration changes
  • Dependency: The core skill in main.py relies on these external servers for content fetching and cannot scrape WeChat or Feishu content without them

Frequently Asked Questions

Where is the Claude config.json file located?

The global configuration file is located at ~/.claude/config.json in your home directory. If the .claude folder does not exist, create it manually before placing the configuration file there.

Can I configure multiple MCP servers simultaneously?

Yes. The mcpServers object accepts multiple key-value pairs. You can define both weixin-reader and feishu-reader (or additional custom MCPs) within the same configuration file under the single mcpServers parent object.

Why does Claude report that the MCP tool is not found?

This typically indicates that Claude has not loaded the configuration. Verify that the JSON syntax is valid, the file path in args points to the correct location (e.g., wexin-read-mcp/src/server.py), and that you have completely restarted Claude Code after making edits.

Is the primaryApiKey field required for MCP servers?

Yes, Claude requires the primaryApiKey field to be present in config.json for the configuration to load, though the value can be set to "any" or your actual API key. This field is separate from the mcpServers configuration but necessary for Claude's core functionality.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →