mcpServer-holmesgpt: Instructions file for Claude Code

CLAUDE.md

mcpServer-holmesgpt CLAUDE.md is an instructions file for Claude Code from mumong/mcpServer-holmesgpt. It costs 1,576 tokens per session, scanned A, original, Apache-2.0.

A set of Claude Code instructions for the mcpServer-holmesgpt project. It explains the project, its design principles, and what each module is responsible for.

In plain words
What is it for?
Use it when asking Claude Code to understand or modify the mcpServer-holmesgpt codebase.
Why use it?
It gives the coding agent project-specific guidance, so it can follow the intended structure and design rules when working on the code.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is mumong/mcpServer-holmesgpt's own configuration. It tells Claude Code how to work on mcpServer-holmesgpt itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcpServer-holmesgpt configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mumong/mcpServer-holmesgpt. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mumong/mcpServer-holmesgpt/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/mumong/mcpServer-holmesgpt

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcpServer-holmesgpt CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mumong/mcpserver-holmesgpt/claude-md/github.svg)](https://agentmods.dev/instructions/mumong/mcpserver-holmesgpt/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mumong/mcpserver-holmesgpt/claude-md"><img src="https://agentmods.dev/badge/instructions/mumong/mcpserver-holmesgpt/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcpServer-holmesgpt CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mumong/mcpserver-holmesgpt/claude-md"><img src="https://agentmods.dev/badge/instructions/mumong/mcpserver-holmesgpt/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,576 This file is loaded in full into every session.
When invoked 1,576 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01576 $0.01576
Opus 5.5 $0.00630 $0.00630
Sonnet 5.5 $0.00315 $0.00315
Haiku 4.5 $0.00158 $0.00158

Measured 14d ago against content hash 6170b6cd804a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcpServer-holmesgpt CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

本文档为 Claude Code (claude.ai/code) 在此代码库中工作提供指导。


项目概述

MCP Server Manager - 统一管理 MCP (Model Context Protocol) 服务器的工具,将其转换为 SSE (Server-Sent Events) 端点,供 HolmesGPT 等 AI 服务集成使用。


代码结构

文件/目录 职责
start.py MCPServerManager:读取 YAML、启动子进程、日志(stderr)、崩溃后指数退避重启(1s 起翻倍,上限 60s)
launch_config.py 纯函数:子进程环境变量、mcp-proxy 命令拼装
servers/*_server.py 各 MCP 服务入口(stdio),由 mcp-proxy 暴露为 SSE
servers/holmes_tools/ 工具实现(kubectl/prometheus/runbook 等)、server_adapter.call_text_tool_in_thread(阻塞调用放到工作线程)、mcp_logger(只写 stderr)
servers/aiops_observability/ AIOps 观测采集(collectors)与查询(query,输出 aiops.fact-ledger.v1)
mcp_client.py SSE 调试客户端
scripts/test_unit.py 离线单元/合同测试(make test-unit)

扩展新服务类型

  • 本地服务:新增 servers/<name>_server.py,在配置 basicmcp 中登记 path/port。
  • 第三方包:在 customermcp 中登记(type: npm 或 type: uv + directory);新的包类型在 start.py 的 start_package_server() 中加分支。

架构说明

支持的 MCP 服务类型

  1. npm 包 - npx -y <package>
  2. uv 包 - uv --directory <dir> run <package>
  3. 本地自定义服务器 - servers/ 下的 Python 脚本(sys.executable <path>)

所有类型统一由 mcp-proxy(镜像内预装,缺失时回退 npx -y mcp-proxy)包装: mcp-proxy --port <port> --server sse -- <inner command>,SSE 端点为 http://localhost:<port>/sse。


常用命令

本地开发

# 使用默认配置运行 (mcp_config.yaml)
python start.py

# 使用指定配置运行
python start.py --config path/to/config.yaml

# 列出配置的服务
python start.py --list
# 或
make list

Docker & Kubernetes

# 构建并推送镜像
make build-push

# 部署到 K8s(自动从 VERSION 文件同步版本号)
make deploy

# 仅更新 ConfigMap 并重启(无需重建镜像)
make reload

# 重启 pods
make restart

# 查看状态
make status

# 查看日志
make logs

镜像信息

  • 基础镜像:python:3.11-slim
  • 仓库:xnet.registry.io:8443/xnet-cloud/mcp-server-manager
  • 版本:从 VERSION 文件读取,make deploy 时自动同步到 deploy/deployment.yaml

添加新 MCP 工具

  1. 创建 MCP 服务 - 在 servers/<name>_server.py 编写,或选择第三方 npm/uv 包
  2. 添加配置 - 同步更新两个配置文件:
    • config/mcp_config.yaml(本地开发用)
    • deploy/configmap.yaml(生产环境)
  3. 更新 K8s 清单 - 在以下文件中添加端口:
    • deploy/deployment.yaml - 添加 containerPort
    • deploy/service.yaml - 添加 port 和 targetPort
  4. 更新 aiops 配置 - 在消费者 configmap 中添加新工具的 SSE URL
  5. 重新部署 - make build-push && make deploy

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed · -2 lines · +198 tokens per session 6170b6cd804a
  2. 2mo ago First seen · 158 lines · 1,378 tokens per session scan A 264b9c95da66

Subscribe to this mod's changes

mcpServer-holmesgpt CLAUDE.md is an instructions file published in the GitHub repository mumong/mcpServer-holmesgpt (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,576 tokens to every session, about $0.0063 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

mcpServer-holmesgpt CLAUDE.md compared with instructions from other repositories

mcpServer-holmesgpt CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcpServer-holmesgpt CLAUDE.mdmumong/mcpServer-holmesgptInstructions file22d agoApache-2.0A1,576Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode