mcp-aggregator: Instructions file for Claude Code

CLAUDE.md

mcp-aggregator CLAUDE.md is an instructions file for Claude Code from MarimerLLC/mcp-aggregator. It costs 2,651 tokens per session, scanned A, original, MIT.

A project guide for an MCP Aggregator, a .NET application that connects AI tools and services through the Model Context Protocol.

In plain words
What is it for?
Use it when building, running, configuring, or extending the aggregator's standard-input and HTTP servers, MCP tools, registry storage, and downstream connections.
Why use it?
It gives developers the project layout, build commands, configuration rules, and safeguards needed to change the system without breaking its communication or stored data.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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-aggregator CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/marimerllc/mcp-aggregator/claude-md"><img src="https://agentmods.dev/badge/instructions/marimerllc/mcp-aggregator/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,651 This file is loaded in full into every session.
When invoked 2,651 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.02651 $0.02651
Opus 5.5 $0.01060 $0.01060
Sonnet 5.5 $0.00530 $0.00530
Haiku 4.5 $0.00265 $0.00265

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

Security

Grade A, and why

mcp-aggregator 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 · 150 lines

How it starts

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

MCP Aggregator — Developer Guide

Project Structure

  • src/McpAggregator.Core/ — Shared library: models, services, MCP tools, storage
  • src/McpAggregator.StdioServer/ — Stdio MCP host (console app)
  • src/McpAggregator.HttpServer/ — HTTP/SSE MCP + REST API host (web app)
  • data/ — Runtime data directory (registry.json, skills/)

Build & Run

dotnet build                                          # Build all
dotnet run --project src/McpAggregator.HttpServer      # Run HTTP server
dotnet run --project src/McpAggregator.StdioServer     # Run stdio server

Critical Rules

  1. StdioServer must NEVER write to stdout/stderr — those streams are the MCP transport. All logging goes to file/OTLP sinks only.
  2. MCP tools are defined in Core — both hosts discover them via WithToolsFromAssembly(typeof(ConsumerTools).Assembly).
  3. Registry persistence uses atomic writes — temp file + rename to prevent corruption.
  4. Connections are lazy — downstream MCP servers are connected on first use, not at registration.
  5. Only WrapperToolCatalog mutates McpServerOptions.ToolCollection, PromptCollection and ResourceCollection at runtime, and it only ever adds or removes DownstreamToolWrapper / DownstreamPromptWrapper / DownstreamResourceWrapper instances. The aggregator's own attributed tools are never touched.
  6. ServerInstructions is the hand-written orientation in AggregatorInstructions (ceiling 6 KB, pinned by ServerInstructionsTests); the skill document is never embedded in the handshake, it stays behind get_service_skill(serverName: "mcp-aggregator") (issue #44).

Typed wrapper tools (issue #39), proxied prompts (issue #40) and bridged resources (issue #45)

Every downstream tool is exposed as a DownstreamToolWrapper named {server}__{tool} carrying the downstream inputSchema unchanged, every downstream prompt as a DownstreamPromptWrapper (McpServerPrompt) named {server}__{prompt} carrying the downstream arguments unchanged, and every downstream resource or resource template as a DownstreamResourceWrapper (McpServerResource) at mcp-aggregator://{server}/{uri} (ResourceUriNaming: fixed scheme, server name as authority, downstream URI verbatim as path, templates keep their {…}) carrying the downstream metadata unchanged. WrapperToolCatalog (singleton, registered in AddAggregatorMcpServer) builds all three from ToolIndex (ToolDetail.Protocol / PromptDetail.Protocol / ResourceDetail.Protocol + ProtocolTemplate keep the wire objects). Everything below applies to prompts and resources as it does to tools, with PromptCollection / ResourceCollection, ToolIndex.PromptsChanged / ResourcesChanged, prompts/list_changed / resources/list_changed, a ListPromptsHandler / ListResourcesHandler + ListResourceTemplatesHandler, and a GetPromptHandler / ReadResourceHandler fallback standing in for the tool equivalents; prompts and resources have no isError result, so wrapper-side failures are McpProtocolExceptions with readable messages. Resource specifics: the SDK's McpServerResourceCollection keys plain URIs as System.Uri (fragment ignored, host case-insensitive; the catalog keeps the first of two colliding entries), resources/read tries an exact key then IsMatch on every entry then the fallback handler, the wrapper's template matcher is its own RFC 6570 approximation (the SDK's is internal), the unknown-URI error code is ResourceNotFound before protocol 2026-07-28 and InvalidParams from it on, and subscriptions are not bridged: resources.subscribe is kept unadvertised (the PostConfigure guard clears what WithSubscribeToResourcesHandler sets) and the subscribe/unsubscribe handlers reject with InvalidRequest. Design note: docs/typed-wrapper-tools.md Q12. AggregatorOptions.WrapperMode:

Read the full file on GitHub · 150 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 · +3 lines · +70 tokens per session 491005475e1e
  2. 1mo ago Changed · +29 lines · +623 tokens per session 0b83b4ad452e
  3. 1mo ago Changed · +53 lines · +1,065 tokens per session 3fd17a5ee9ad
  4. 2mo ago Changed · +7 lines · +138 tokens per session ed8b56f32586
  5. 2mo ago First seen · 58 lines · 755 tokens per session scan A 72a58123c297

Subscribe to this mod's changes

mcp-aggregator CLAUDE.md is an instructions file published in the GitHub repository MarimerLLC/mcp-aggregator (27 stars, last pushed 1mo ago), licensed MIT. It adds 2,651 tokens to every session, about $0.0106 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-30.

Related

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

mcp-aggregator CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-aggregator CLAUDE.mdMarimerLLC/mcp-aggregatorInstructions file271mo agoMITA2,651Claude 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