# Honestcode

> Honestcode is an open-source MCP server for developer tools. Local MCP server that checks AI-written Python against your repo for invented APIs. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, vscode
- **Repository:** https://github.com/fengrru/honestcode
- **MCP Registry name:** io.github.Fengrru/honestcode
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-18

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add honestcode -- uvx honestcode
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "honestcode": {
      "command": "uvx",
      "args": [
        "honestcode"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "honestcode": {
      "command": "uvx",
      "args": [
        "honestcode"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "honestcode": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "honestcode"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "honestcode": {
      "command": "uvx",
      "args": [
        "honestcode"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "honestcode": {
      "command": "uvx",
      "args": [
        "honestcode"
      ]
    }
  }
}
```

## Tools

- `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.

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/honestcode
