Repository navigation
Conversation
misc/mcp/ is a read-only MCP server that serves the README, the drafts' Rejected, Claims and Link notes, the notes and the benchmarks to any AI client, and builds a searchable index of the linked sources on the user's own machine. - ask, lookup, search/fetch and the other tools answer from the list and the indexed sources, with citations; pasted perf stat, toplev and compiler output is parsed deterministically into metrics and notes - the list updates itself daily from main; several clients can share one data directory - runs over stdio (Claude Code, Codex, Claude Desktop, Cursor, VS Code) or Streamable HTTP - mcp.yml tests it on Linux and Windows and checks the wheel and the container; mcp-release.yml publishes to PyPI on an mcp-v* tag
- route a flagged top-down level to the list's part about it: a memory-bound run to the memory hierarchy (by level 2 when measured, else by the cache counters), a front-end-bound one to fetch and decode - detect Intel, AMD or Arm from the PMUs and event names (then the question) and leave the other vendors' sources out of the answer; with no vendor known, vendor-neutral sources lead - add frequency, page faults per second, cache, dTLB and iTLB MPKI, and per-second rates over task-clock as perf computes them; no frequency on hybrid parts, where task-clock spans both core types - count -I intervals and use the last one as elapsed time - take the lowest running share from TopdownL1 metric lines too, and name the group it came from - explain perf's own errors (missing metric group, perf_event_paranoid, unknown or unsupported events, NMI watchdog) instead of searching for their words - read TopdownL2 lines; level 2 orders the reading and is never flagged
The vector cache test told a full reload from an append by its time stamp; on Windows the clock can return the same value for both reads, so the reload looked like none. The store now counts full reloads and the test checks the count. A prefetch still queued at exit no longer raises from a thread pool that the interpreter has already shut down.
ask listed the list's entries the same way whether or not the server had
their text, so a model cited a link's one-line reason as if it had read the
paper. Each entry in an answer is now marked quoted (with its passages and
pages), in the library with no matching passage (with the read_source call
that looks inside) or not read on this machine (with the reason), a coverage
line says which sources the answer rests on, and the rules say a claim is
attributed only through a quoted passage.
- Passages carry the list's title for their source, not a PDF's placeholder
("Untitled Document") or a README's first heading.
- A listed paper the question is about comes with its abstract, joined
across passages, instead of only a keyword window into its results.
- PDFium's U+FFFE line-end hyphens are joined at extraction (pdf extract 2)
and when passages are read, so quotes and the index hold whole words.
- A failed refresh keeps the copy already in the library unless the
document is gone, and its retry waits for next_try.
- Pasted output: objdump --no-show-raw-insn and gdb disassembly are read as
assembly; plain C is code, with float sums carried across a loop, early
exits and array-of-struct fields routed (and benchmarks 03 and 07 named);
remarks are counted per loop with the missed ones first; clang's
floating-point reorder remark is no longer read as aliasing; a pasted note
with commas is no longer taken for perf stat -x.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SbP33zK6gcmsakKiLxS7kW
…f1d30' into claude/peaceful-faraday-r20nh6
cpu-perf: answer from the sources' own text, and say which were read
The crawler fetches only the documents the list links, the way a reader opening each link would, so it no longer consults robots.txt unless asked: --respect-robots (CPU_PERF_RESPECT_ROBOTS=1) restores the old behaviour, and --ignore-robots is still accepted. It still identifies itself, keeps a gap between requests to one host and backs off on rate limits.
When several MCP clients start at once on a machine with no library yet, each process creates the file and switches it to WAL. SQLite can answer "database is locked" at once there, without waiting out the busy timeout, and the losing client failed to start (21 of 480 simultaneous opens in a stress run). Those setup steps are idempotent, so they are now retried with a short random backoff. A test races six processes over twenty fresh libraries; it fails without the retry.
usamahz
changed the base branch from
claude/git-workflow-guidelines-pf1d30
to
main
October 4, 2026 19:23
usamahz
force-pushed
the
claude/pensive-davinci-51jmk6
branch
from
October 4, 2026 19:23
0c7286b to
54cba1c
Compare
This was referenced Oct 4, 2026
Owner
Author
|
Closing as superseded by #7. Every commit here (up to Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
misc/mcp/addscpu-perf, a read-only MCP server that gives any AI client the whole list as something it can search and reason over. It serves the README in reading order, the drafts' Rejected, Claims and Link notes, the notes, and the fourteen benchmarks. It also builds a full-text and semantic index of the linked sources on the user's own machine, so answers come from the papers and manuals and cite them. One command runs it:uvx cpu-perf(version 0.1.0rc1, not yet on PyPI).This PR is the MCP server alone. The website, which renders the list and this server's pages, is #6. It builds on this PR and merges after it.
What it adds
misc/mcp/:ask,lookup,searchandfetch,get_section,get_entry,reading_path,get_benchmark,editorial_record,check_evidence,read_source,read_fileandlibrary_status.cpuperf://resources and templates.perf stat, toplev and compiler output are parsed deterministically into metrics and notes, which are routed to the parts of the list about them.main, and several clients can share one library. When several clients open a new library at once, the open is retried instead of failing.--respect-robotsmakes it skip whatrobots.txtdisallows.misc/mcp/:README.md: an MCP badge, and an "Ask it." paragraph with the commands that add the server to Claude Code and Codex.misc/README.md: anmcp/row.misc/notes/conventions.md: a Tooling bullet..gitignore: the server's environments and builds.mcp.ymltests the server on Linux (Python 3.10 and 3.13) and Windows (3.12), checks that the wheel carries the corpus, and checks that the container serves HTTP.mcp-release.ymlpublishes to PyPI on anmcp-v*tag.The branch. This PR's branch,
claude/pensive-davinci-51jmk6, is the MCP branchclaude/git-workflow-guidelines-pf1d30at54cba1c, with nothing of its own.Merge order. Merge this first, with a merge commit; #6 then shows only the website.
Why this belongs
misc/scripts/check_format.py, and a test fails if the two drift apart.misc/notes/conventions.mdsays so.misc/. Only the README's introduction changes; no entry is added or moved.Performance numbers (only if the entry or its reason carries one)
None added. The server serves the committed numbers as they are, and
check_evidenceaudits a claim against the seven fields.Checks
python3 misc/scripts/check_format.pypasses. The README still has 304 entries; the new paragraph adds none.python3 misc/scripts/check_links.pyreports no dead links: "Every README URL is live" passes on this PR.CI on
54cba1c, all green:Locally on
54cba1c, the server's tests pass: 133 passed, 2 skipped.Conflict of interest
None.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ATeZEnkxVYpJsHQ3ELz6mN