codeweave-mcp: Instructions file for Claude Code

CLAUDE.md

codeweave-mcp CLAUDE.md is an instructions file for Claude Code from semihkayan/codeweave-mcp. It costs 1,950 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for developing an MCP server that helps AI agents understand code through local indexes, such as syntax trees, call graphs, type relationships, and search.

In plain words
What is it for?
They are for building, running, testing, and maintaining the code-understanding MCP server.
Why use it?
They explain the project's architecture and working rules so agents can retrieve focused code context instead of reading entire files.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/semihkayan/codeweave-mcp/claude-md.svg)](https://agentmods.dev/instructions/semihkayan/codeweave-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/semihkayan/codeweave-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/semihkayan/codeweave-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,950 This file is loaded in full into every session.
When invoked 1,950 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01950 $0.01950
Opus 5 $0.00975 $0.00975
Sonnet 5 $0.00390 $0.00390
Haiku 4.5 $0.00195 $0.00195

Measured 6d ago against content hash c08ee51ad701, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

codeweave-mcp 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 6d 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 · 137 lines

How it starts

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

CLAUDE.md

This file contains only what an agent cannot easily derive from code: architectural decisions and their reasons, non-obvious conventions, and cross-cutting rules. Before changing anything, ask: "Can the agent figure this out easily by reading the code?" If yes, don't add it.

If you discover something non-obvious that a future agent couldn't derive from code alone, propose a CLAUDE.md update to the user.

What this project is

MCP server that gives AI agents cheap, precise code understanding. Instead of dumping entire files into context, the agent queries local indexes (AST, call graph, type graph, vector search) and gets back only what it needs. All indexing is local and live — file watcher keeps everything current as code changes.

Primary goal: AI agents should do higher-quality work on code, at lower cost. Less token waste, more relevant context, better decisions. Every feature and improvement must serve this — if it doesn't help the agent work better or cheaper, it doesn't belong here.

Build & Run

npm run build          # TypeScript → dist/
npm run dev            # Run with tsx (dev mode)
npm test               # vitest

Architecture

Single-process Node.js MCP server. stdout is reserved for MCP protocol — never console.log(), use logger from utils/logger.ts (writes to .code-context/server.log).

Layers

index.ts             → MCP shell: registerTool × 3, transport, shutdown
services.ts          → Composition root: ALL concrete instantiation here
tools/               → 3 tool handlers (thin orchestrators, interface-only deps)
core/                → Business logic behind interfaces
parsers/             → 7 language parsers (tree-sitter wrappers)
utils/               → Config, file I/O, git, logging, SQL escape
scripts/             → CLI tools (init, reindex, setup)
types/index.ts       → Data types (FunctionRecord, VectorRow, CallGraphEntry, etc.)
types/interfaces.ts  → All interfaces

Key design decisions

Read the full file on GitHub · 137 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. 6d ago First seen · 137 lines · 1,950 tokens per session scan A c08ee51ad701

Subscribe to this mod's changes

codeweave-mcp CLAUDE.md is an instructions file published in the GitHub repository semihkayan/codeweave-mcp (4 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 1,950 tokens to every session, about $0.0097 per session on Opus 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

Other instructions, from other repositories

vibetags com-example-service-TransactionalPaymentService.instructions.md

Instructions for PIsberg/vibetags, covering copilot instructions for transactionalpaymentservice and strict exception handling.

PIsberg/vibetags · 104 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens