ksp-mods-mcp: Instructions file for Claude Code

CLAUDE.md

ksp-mods-mcp CLAUDE.md is an instructions file for Claude Code from tabbykat113/ksp-mods-mcp. It costs 1,851 tokens per session, scanned A, original, MIT.

Project instructions and technical notes for a tool that collects Kerbal Space Program mod information and makes it searchable through an MCP server. It documents the project structure, design choices, and database schema.

In plain words
What is it for?
Use it when changing the mod harvester, SQLite database, cached data fetchers, or MCP search and lookup tools.
Why use it?
It gives an AI coding agent the project context needed to work consistently in an unfamiliar codebase.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tabbykat113/ksp-mods-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/tabbykat113/ksp-mods-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,851 This file is loaded in full into every session.
When invoked 1,851 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.01851 $0.01851
Opus 5 $0.00925 $0.00925
Sonnet 5 $0.00370 $0.00370
Haiku 4.5 $0.00185 $0.00185

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

Security

Grade A, and why

ksp-mods-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 8d 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 · 101 lines

How it starts

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

ksp-mods-mcp — notes for Claude

Project overview

A uv Python project with two components:

  • harvest CLI — downloads and indexes KSP mod metadata from CKAN-meta into a local SQLite DB
  • ksp-mods-mcp — stdio MCP server that exposes search/lookup tools over that DB

Architecture

harvester/
  db.py         — SQLite schema, all query/write functions, KSP version logic
  harvest.py    — tar.gz streaming, parsing loop, CLI entry point
  enrichment.py — lazy GitHub/SpaceDock fetchers, cache read/write, TTL logic
  ckan_cache.py — CKAN download cache detection (URL hashing, ZIP scanning)
  parts.py      — KSP part extraction from cached ZIPs (CFG parser, localization)
mcp_server/
  server.py     — FastMCP tool definitions, error handling wrapper
explore_mod.py  — standalone exploration script (not part of the package)

Key design decisions

  • Single tar.gz download for Pass 1 — one request gets all ~4000 mods, same approach as CKAN's own C# client. URL: https://github.com/KSP-CKAN/CKAN-meta/archive/refs/heads/master.tar.gz
  • ETag-based skip — re-running harvest is a no-op if nothing changed upstream. ETag stored in the meta table.
  • Schema versioningSCHEMA_VERSION constant in db.py. run_harvest() auto-forces a re-harvest when the stored version in meta is stale. Bump SCHEMA_VERSION whenever a schema change requires re-harvest; no manual --force needed.
  • mod_versions table — stores every .ckan file as a version row (~29k rows). The mods table stores one row per unique identifier, populated from the latest-by-release_date version entry (accumulated in Python during the tar pass, bulk-inserted after). Version history is used for KSP compatibility filtering.
  • max_ksp_version — denormalized onto mods at harvest time. Normalized to major.minor, capped at 1.12 (KSP1 ceiling). Mods with no upper bound or no constraints default to 1.12.
  • KSP version filter — prefix-based tuple comparison in Python (identifiers_supporting_ksp), not SQL. Runs against the full mod_versions table then passes a set of identifiers into the WHERE clause.
  • Platform-aware DB path — defaults to ~/.local/share/ksp-mods-mcp/ckan.db (Linux) or AppData/Local/ksp-mods-mcp/ckan.db (Windows). CKAN_DB env var overrides.
  • Lazy harvest on first tool call — the server triggers run_harvest() on the first tool invocation (not at startup), keeping MCP startup instant. ETag check makes subsequent calls a no-op.
  • Error handling in tools@_tool decorator catches all exceptions and returns them as {"error": "..."} JSON so the model gets a readable message rather than a traceback.
  • CKAN download cache detectionckan_cache.py scans the CKAN downloads directory once per session, builds a set of 8-char URL hashes from ZIP filenames, and answers is_cached(url) in O(1). CKAN hashes the percent-decoded URL (not the raw encoded form). download_url in mods stores all mirror URLs newline-separated so any mirror match counts. Only the latest version's URLs are checked — an older cached ZIP does not set is_cached.
  • Part extractionparts.py opens a cached ZIP, scans GameData/{identifier}/Parts/**/*.cfg, parses KSP's CFG format (brace-depth tracking for MODULE/RESOURCE sub-blocks), and resolves #LOC_... strings from GameData/{identifier}/Localization/en-us.cfg. Bundled deps under other GameData/ subdirectories are ignored.

Read the full file on GitHub · 101 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. 8d ago First seen · 101 lines · 1,851 tokens per session scan A f3622981dacf

Subscribe to this mod's changes

ksp-mods-mcp CLAUDE.md is an instructions file published in the GitHub repository tabbykat113/ksp-mods-mcp (1 stars, last pushed 4mo ago), licensed MIT. It adds 1,851 tokens to every session, about $0.0093 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

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

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,153 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

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

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,737 tokens