codemcp is a coding assistant that connects Claude Desktop to a codebase so Claude can edit files and run tests directly on a computer. It is intended for pair programming tasks such as implementing features, fixing bugs, and refactoring code.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/ezyang/codemcpWrote 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.
[](https://agentmods.dev/rules/ezyang/codemcp/expecttest)<a href="https://agentmods.dev/rules/ezyang/codemcp/expecttest"><img src="https://agentmods.dev/badge/rules/ezyang/codemcp/expecttest/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.
<a href="https://agentmods.dev/rules/ezyang/codemcp/expecttest"><img src="https://agentmods.dev/badge/rules/ezyang/codemcp/expecttest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00552 |
| Opus 5.5 | $0.00000 | $0.00221 |
| Sonnet 5.5 | $0.00000 | $0.00110 |
| Haiku 4.5 | $0.00000 | $0.00055 |
Grade A, and why
expecttest 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.
What it actually says
expecttest
We use expecttest for testing. If you need to match against a multiline string or some output that is likely to change in the future (e.g., the kind of thing you would have ordinarily done an assertIn with), use an expect test. If a test is assertExpectedInline and it fails, use 'accept' command to update the output, do NOT relax the test. If the output of the test seems nondeterministic (e.g., you run accept but the test is still failing on the assertExpectedInline) you should halt and ask for help from the user.
Below is its README.
This library implements expect tests (also known as "golden" tests). Expect tests are a method of writing tests where instead of hard-coding the expected output of a test, you run the test to get the output, and the test framework automatically populates the expected output. If the output of the test changes, you can rerun the test 'accept' command to accept the output.
Somewhat unusually, this library implements inline expect tests: that is to say, the expected output isn't saved to an external file, it is saved directly in the Python file (and we modify your Python file when updating the expect test.)
The general recipe for how to use this is as follows:
-
Write your test and use
assertExpectedInline()instead of a normalassertEqual. Leave the expected argument blank with an empty string:self.assertExpectedInline(some_func(), """""") -
Run your test. It should fail, and you get an error message about accepting the output with
EXPECTTEST_ACCEPT=1(this means to use 'accept' command) -
Rerun the test with 'accept' command. Now the previously blank string literal will contain the expected value of the test.
self.assertExpectedInline(some_func(), """my_value""")
A minimal working example:
# test.py
import unittest
from expecttest import TestCase
class TestStringMethods(TestCase):
def test_split(self):
s = 'hello world'
self.assertExpectedInline(str(s.split()), """""")
if __name__ == '__main__':
unittest.main()
Run accept command, and the content in triple-quoted string will be
automatically updated, so you don't have to fill it out yourself.
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.
- 1mo ago First seen · 67 lines · 0 tokens per session scan A 189e57d28eab
expecttest is a cursor rule published in the GitHub repository ezyang/codemcp (1,606 stars, last pushed 9mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 552 tokens. 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.
Other cursor rules, from other repositories
use-contract-ir-factories
Use factory functions for creating ContractIR objects instead of manual object creation.
gonavi-go
A Go coding rule set for the GoNavi repository, based on common Go style guides and the project's own conventions. It covers file structure, errors, context, concurrency, logging, and tests.
workflow-level3
Defines the standard workflow for Level 3 (Intermediate Feature) tasks, guiding through comprehensive planning, targeted creative design, structured implementation, detailed reflection, and feature-specific archiving.
reflection-basic
Basic reflection format for Level 2 Simple Enhancement tasks.
rule-calling-guide
Comprehensive guide for calling VAN QA rules.
common-fixes
Utility for VAN QA common validation fixes.