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.5 $0.00740 $0.00740
Sonnet 5.5 $0.00370 $0.00370
Haiku 4.5 $0.00185 $0.00185

Measured 2mo ago against content hash f3622981dacf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 versioning — SCHEMA_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 detection — ckan_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 extraction — parts.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. 2mo 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 7mo ago), licensed MIT. It adds 1,851 tokens to every session, about $0.0074 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

ksp-mods-mcp CLAUDE.md compared with instructions from other repositories

ksp-mods-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ksp-mods-mcp CLAUDE.mdtabbykat113/ksp-mods-mcpInstructions file17mo agoMITA1,851Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144kyesterdayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot
generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginnersInstructions file124ktodayMITA2,981Codex, OpenCode