Honestcode
Local MCP server that checks AI-written Python against your repo for invented APIs
- Pricing
- Open source
- Platforms
- CLI, self-hosted, vscode
- Runs
- Locally
- Version
- 0.5.1
- Listing updated
- today
Similar MCP servers
About Honestcode
Honestcode is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
Where Ruff and Pyright check a file or a type, this server asks a narrower question: does each call the agent wrote resolve to a symbol that exists in the repository it is editing? It parses the target file with Python's standard-library ast module and indexes the project, with no LLM calls and no network use.
When it finds a call to a method that does not exist, it returns evidence the agent can act on: the owner class, the available methods and a did-you-mean suggestion. It stays silent where it cannot prove a symbol is missing, for example on decorated classes, standard-library members or receivers produced by factory functions.
The README describes a PostToolUse hook for Claude Code that verifies every Python file the agent writes and feeds findings back into the conversation, so checking does not depend on the model choosing to call the tool.
Install
Run in a terminal
claude mcp add honestcode -- uvx honestcodeAdd to claude_desktop_config.json
{
"mcpServers": {
"honestcode": {
"command": "uvx",
"args": [
"honestcode"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"honestcode": {
"command": "uvx",
"args": [
"honestcode"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"honestcode": {
"type": "stdio",
"command": "uvx",
"args": [
"honestcode"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"honestcode": {
"command": "uvx",
"args": [
"honestcode"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"honestcode": {
"command": "uvx",
"args": [
"honestcode"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (2)
Taken from the project documentation; the running server may differ.
- scan_file
- Legacy tool returning issues plus the evidence shape for a file.
- verify_file
- Agent-facing tool returning status, findings with evidence and a text summary.
What it does
- Invented API detection
- Flags calls to methods or symbols that do not exist in the codebase.
- Did-you-mean evidence
- Lists available methods and suggests the closest real one.
- Repository grounding
- Indexes the project and resolves receivers from annotations and constructors.
- Two verification tools
- Offers scan_file and verify_file for agent use.
- Automatic hook
- A PostToolUse hook can verify each Python file the agent writes.
- Fully local
- Runs without LLM calls or network access.
Good for
- Catch hallucinated method calls before an agent moves on
- Verify every Python file an agent writes through a Claude Code hook
- Check that new code uses an existing client class correctly
- Add a deterministic review step to agent coding loops
Pricing
Open source
Runs locally; installed from PyPI
Honestcode FAQ
Does it call an LLM?
No. The README says it uses pure AST and symbol resolution, with no LLM calls and no network.
Which languages does it check?
The README describes Python files; the hook skips non-Python files.
Does it replace Ruff or Pyright?
No. It is a layer that checks whether code came from the repository, and it does not do full type inference.
How do I install it?
Run claude mcp add honestcode -- uvx honestcode-mcp, or use honestcode install for Cursor, VS Code and Claude Desktop. Python 3.10 or newer is required.
Is Honestcode free?
Yes. Honestcode is open source, so you can use and self-host it for free.
How do I add Honestcode to Claude Code?
Run this command in your terminal: claude mcp add honestcode -- uvx honestcode
What are the best alternatives to Honestcode?
The closest alternatives to Honestcode are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


