Token导航 LogoToken导航

Agent Skill · 研究检索

mcp-config(MCP 配置)

mcp-config 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

mcp-config 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 45,786。

总安装 824周安装 33GitHub Stars 4,206下载 267核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mcp-config(MCP 配置)
来源仓库:https://github.com/libukai/awesome-agent-skills
仓库路径:skills/mcp-config
安装命令:
npx skills add https://github.com/libukai/awesome-agent-skills --skill mcp-config
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/libukai/awesome-agent-skills --skill mcp-config

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

记录任务执行中的错误、纠正与最佳实践,优化 Agent 持续学习能力。适用于 Codex、Claude、Cursor 等平台的问题复盘与技能迭代。自动捕获失败案例与用户反馈,生成改进建议存入 .mcp.json。需正确配置项目级 MCP 服务,避免全局设置造成上下文污染。更改配置后务必重启宿主进程使变更生效。

来源仓库内路径:skills/mcp-config

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/libukai/awesome-agent-skills --skill mcp-confi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

mcp-config 怎么安装?

在终端执行 npx skills add https://github.com/libukai/awesome-agent-skills --skill mcp-config。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

mcp-config 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

mcp-config 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

mcp-config 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

mcp-config 用的人多吗?

公开数据是累计安装 824 次,近一周安装 33 次,下载 267 次,GitHub 4,206 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

mcp-config 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 4,206 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
mcp-config

MCP 配置 · 本页

8244,206调用外部服务未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

MCP Configuration Management

Overview

This skill helps you properly configure MCP servers in Claude Code. It ensures MCP servers are configured in the right location and scope to avoid unnecessary context pollution across all sessions.

Critical Concepts

Two Valid Configuration Locations

ONLY these two locations are valid for MCP configuration:

  1. User/Local scope: ~/.claude.json

- In the mcpServers field (global for all projects) - Or under specific project paths (project-specific in user config)

  1. Project scope: .mcp.json in your project root

- Checked into source control - Only affects the current project

⚠️ Important Rules

  • DO NOT configure MCPs in ~/.claude.json global mcpServers - This loads MCPs in ALL sessions and wastes context space
  • DO configure MCPs in project-level .mcp.json - This only loads MCPs when working in that specific project
  • Avoid settings.json for MCP control - The permissions.allow field can override disabled settings and cause confusion

When to Use This Skill

Invoke this skill when:

  • Adding a new MCP server to a project
  • Removing/disabling an MCP server
  • MCP servers are loading when they shouldn't be
  • Need to clean up MCP configuration
  • Want to understand why an MCP is or isn't loading

Quick Start

TaskExample
Add MCP to current project"添加 pencil MCP 到当前项目"
Remove MCP from all projects"从所有项目中移除 shadcn-studio-mcp"
Check MCP configuration"检查当前的 MCP 配置"
Clean up global MCPs"清理全局 MCP 配置"

Configuration Workflow

1. Check Current MCP Status

First, understand what MCPs are currently loaded:

# Check user-level configuration
cat ~/.claude.json | grep -A 20 '"mcpServers"' | head -25

# Check project-level configuration
cat .mcp.json 2>/dev/null || echo "No project .mcp.json found"

# Check settings.json (should NOT have MCP config)
cat ~/.claude/settings.json | grep -A 5 '"permissions"'

2. Add MCP to Current Project

Best Practice: Always add MCPs at project level

Create or edit .mcp.json in your project root:

{
  "mcpServers": {
    "server-name": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "package-name"],
      "env": {
        "API_KEY": "your-key-here"
      }
    }
  }
}

3. Remove MCP Configuration

From global config (~/.claude.json):

import json

with open('/Users/likai/.claude.json', 'r') as f:
    data = json.load(f)

# Remove from global mcpServers
if 'mcpServers' in data and 'server-name' in data['mcpServers']:
    del data['mcpServers']['server-name']
    print(f"Removed server-name from global config")

with open('/Users/likai/.claude.json', 'w') as f:
    json.dump(data, f, indent=2)

From project config (.mcp.json):

import json

try:
    with open('.mcp.json', 'r') as f:
        data = json.load(f)

    if 'mcpServers' in data and 'server-name' in data['mcpServers']:
        del data['mcpServers']['server-name']

    with open('.mcp.json', 'w') as f:
        json.dump(data, f, indent=2)
    print("Removed server-name from project config")
except FileNotFoundError:
    print("No .mcp.json found in project")

4. Clean Up settings.json

Remove any MCP-related permissions that might override configuration:

import json

with open('/Users/likai/.claude/settings.json', 'r') as f:
    data = json.load(f)

# Remove permissions block if it contains MCP references
if 'permissions' in data:
    if 'allow' in data['permissions']:
        data['permissions']['allow'] = [
            item for item in data['permissions']['allow']
            if not item.startswith('mcp__')
        ]
        if not data['permissions']['allow']:
            del data['permissions']

with open('/Users/likai/.claude/settings.json', 'w') as f:
    json.dump(data, f, indent=2)

Common MCP Servers

Pencil (Design Tool)

{
  "mcpServers": {
    "pencil": {
      "command": "/Users/likai/.vscode/extensions/highagency.pencildev-0.6.29/out/mcp-server-darwin-arm64",
      "args": ["--app", "visual_studio_code"],
      "env": {},
      "type": "stdio"
    }
  }
}

Shadcn Studio

{
  "mcpServers": {
    "shadcn-studio-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "shadcn-studio-mcp",
        "API_KEY=your-api-key",
        "EMAIL=your-email"
      ],
      "env": {}
    }
  }
}

Unsplash

{
  "mcpServers": {
    "unsplash": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@microlee666/unsplash-mcp-server"],
      "env": {
        "UNSPLASH_ACCESS_KEY": "your-access-key"
      }
    }
  }
}

Troubleshooting

Problem: MCP loads in all sessions

Cause: MCP is configured in ~/.claude.json global mcpServers

Solution:

  1. Remove from ~/.claude.json global config
  2. Add to project-level .mcp.json instead
  3. Restart Claude Code session

Problem: MCP won't disable despite "disabled": true

Cause: permissions.allow in settings.json overrides disabled setting

Solution:

  1. Remove MCP from settings.json permissions
  2. Remove the entire permissions block if empty
  3. Restart Claude Code session

Problem: MCP configuration conflicts

Cause: MCP configured in multiple locations with different settings

Solution:

  1. Check all three locations: ~/.claude.json, .mcp.json, settings.json
  2. Keep configuration in ONE place only (prefer .mcp.json)
  3. Remove from other locations

Problem: Can't find where MCP is configured

Diagnostic commands:

# Search all possible locations
echo "=== Global Config ==="
grep -A 10 '"mcpServers"' ~/.claude.json | head -15

echo "=== Project Config ==="
cat .mcp.json 2>/dev/null || echo "No .mcp.json"

echo "=== Settings ==="
grep -A 5 '"permissions"' ~/.claude/settings.json 2>/dev/null || echo "No permissions"

echo "=== Project Settings ==="
grep -A 5 '"permissions"' .claude/settings.json 2>/dev/null || echo "No project settings"

Best Practices

  1. ✅ Always use project-level .mcp.json for project-specific MCPs
  2. ✅ Keep ~/.claude.json global mcpServers empty to avoid context pollution
  3. ✅ Avoid MCP configuration in settings.json - use it only for permissions if needed
  4. ✅ Restart Claude Code after configuration changes to ensure they take effect
  5. ✅ Check into source control - Commit .mcp.json so team members get the same MCPs
  6. ❌ Never use disabled: true - Just remove the MCP configuration entirely
  7. ❌ Don't mix configuration locations - Pick one place and stick to it

Configuration Priority

When Claude Code loads MCPs, it follows this priority:

  1. Project-level .mcp.json (highest priority)
  2. User-level ~/.claude.json project-specific config
  3. User-level ~/.claude.json global mcpServers
  4. settings.json permissions can override all of the above

Recommendation: Use only project-level .mcp.json to avoid confusion.


Example: Complete Cleanup and Reconfiguration

# 1. Clean up global config
python3 << 'EOF'
import json
with open('/Users/likai/.claude.json', 'r') as f:
    data = json.load(f)
data['mcpServers'] = {}
with open('/Users/likai/.claude.json', 'w') as f:
    json.dump(data, f, indent=2)
print("✓ Cleaned global mcpServers")
EOF

# 2. Clean up settings.json
python3 << 'EOF'
import json
with open('/Users/likai/.claude/settings.json', 'r') as f:
    data = json.load(f)
if 'permissions' in data:
    del data['permissions']
with open('/Users/likai/.claude/settings.json', 'w') as f:
    json.dump(data, f, indent=2)
print("✓ Cleaned settings.json permissions")
EOF

# 3. Create project-level config
cat > .mcp.json << 'EOF'
{
  "mcpServers": {
    "your-mcp-name": {
      "type": "stdio",
      "command": "your-command",
      "args": [],
      "env": {}
    }
  }
}
EOF
echo "✓ Created project .mcp.json"

# 4. Restart Claude Code
echo "⚠️  Please restart Claude Code for changes to take effect"

Summary

  • Two valid locations: ~/.claude.json and .mcp.json
  • Best practice: Use project-level .mcp.json only
  • Avoid: Global mcpServers in ~/.claude.json (wastes context)
  • Avoid: MCP config in settings.json (causes conflicts)
  • Always restart Claude Code after configuration changes

平台分布

Codex

36.92%
按下载量换算99

Claude

31.66%
按下载量换算85

Cursor

20.03%
按下载量换算53

Gemini CLI

9.16%
按下载量换算24

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills