mcp-proxy: Instructions file for Claude Code

CLAUDE.md

mcp-proxy CLAUDE.md is an instructions file for Claude Code from tbxark/mcp-proxy. It costs 1,939 tokens per session, scanned A, original, MIT.

A repository instruction file for an MCP proxy server written in Go. It documents the project structure, build and test commands, request flow, and how downstream MCP servers are exposed through HTTP.

In plain words
What is it for?
Use it as a reference when working on this MCP proxy repository, especially for running its Go tests, build, formatting, and configuration checks.
Why use it?
It gives coding agents and developers the project-specific rules needed to build, test, and change the repository consistently. The excerpt does not describe a general-purpose add-on beyond that documentation.

Instructions file for Claude Code

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

This is tbxark/mcp-proxy's own configuration. It tells Claude Code how to work on mcp-proxy 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 mcp-proxy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tbxark/mcp-proxy. 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/tbxark/mcp-proxy/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/tbxark/mcp-proxy

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 mcp-proxy CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tbxark/mcp-proxy/claude-md/github.svg)](https://agentmods.dev/instructions/tbxark/mcp-proxy/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/tbxark/mcp-proxy/claude-md"><img src="https://agentmods.dev/badge/instructions/tbxark/mcp-proxy/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 mcp-proxy CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tbxark/mcp-proxy/claude-md"><img src="https://agentmods.dev/badge/instructions/tbxark/mcp-proxy/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,939 This file is loaded in full into every session.
When invoked 1,939 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.01939 $0.01939
Opus 5.5 $0.00776 $0.00776
Sonnet 5.5 $0.00388 $0.00388
Haiku 4.5 $0.00194 $0.00194

Measured 1mo ago against content hash 3409d5f8c981, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-proxy 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 1mo 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 · 84 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

An MCP proxy server (Go, single main package, flat layout) that aggregates multiple downstream MCP servers behind one HTTP entrypoint. Each configured downstream server is exposed at its own route (<baseURL path>/<serverName>/) via SSE or streamable HTTP.

Commands

make build                      # CGO_ENABLED=0 build into ./build/ with version ldflags
go test ./...                   # run all tests
go test -short ./...            # unit tests only (skips the process-spawning end-to-end tests)
go test -run TestName .         # run a single test (all code is in the root package)
make format                     # full pipeline: go fix/fmt/vet, tests, go mod tidy, golangci-lint fmt+run, nilaway
./build/mcp-proxy --config config.json          # run the server
./build/mcp-proxy -check-config --config ...    # validate config and exit

make format expects golangci-lint and nilaway to be installed. Run it (or at least go vet + tests) before considering a change done.

Architecture

Request flow: MCP client → HTTP mux (http.go) → per-server middleware chain (recover, optional logging, optional bearer-token auth) → server.MCPServer (mcp-go) → proxied downstream client (client.go).

  • main.go — flag parsing and dispatch to one of three modes: normal server, -authorize (interactive OAuth), or -auth-status/-doctor (credential diagnostics).
  • config.go — the (only) V2 config schema, validation, and loading via confstore (supports local file or HTTP(S) URL, with env-var expansion). Per-server Options inherit from mcpProxy.options defaults during load(). The V1 schema was removed; FullConfig still carries the old server/clients keys as json.RawMessage purely so a V1 file fails with a migration hint instead of "mcpProxy is required".
  • client.go — wraps mcp-go clients for the three transports (stdio, sse, streamable-http). On startup, each client connects, initializes, and copies the downstream server's tools/prompts/resources/resource-templates onto the local MCPServer (with pagination and tool allow/block filtering). Every client gets a keepalive probe loop (options.pingInterval, default 30s) that drives the health state behind /_readyz — a real tools/list request on modern protocol connections (2026-07-28 removed ping), ping on legacy ones. Client.connect builds the transport, swaps it in under mu, and closes the previous one; tool/prompt/resource handlers resolve the live transport through getClient() at call time, so reconnecting is transparent to in-flight requests. Start gets the long-lived context — mcp-go's SSE transport ties its event stream to it and stdio stores it for request handling — so only Initialize is bounded by connectTimeout.
  • oauth.go / oauth_store.go — OAuth client support for downstream servers requiring interactive auth (e.g. Notion). Tokens and dynamically-registered client credentials persist as JSON under the user config dir (~/.config/mcp-proxy/oauth/ on Linux) via FileTokenStore, so a one-off -authorize run shares state with the daemon. oauthAwareError decorates connection failures with re-auth hints.
  • doctor.go — backs -auth-status (local-only: config + cached token expiry) and -doctor (additionally connects to each remote server; may refresh tokens but never opens a browser).

Read the full file on GitHub · 84 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. 1mo ago Changed · +1 lines · +237 tokens per session 3409d5f8c981
  2. 1mo ago First seen · 83 lines · 1,702 tokens per session scan A aaac859a5649

Subscribe to this mod's changes

mcp-proxy CLAUDE.md is an instructions file published in the GitHub repository tbxark/mcp-proxy (742 stars, last pushed 1mo ago), licensed MIT. It adds 1,939 tokens to every session, about $0.0078 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-09-14.

Related

mcp-proxy CLAUDE.md compared with instructions from other repositories

mcp-proxy CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-proxy CLAUDE.mdtbxark/mcp-proxyInstructions file7421mo agoMITA1,939Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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