Skip to content

Commit 84b7493

Browse files
RecoDemoclaude
andcommitted
Document get_usage_stats tool, clarify incremental reindexing in README, bump to 0.4.3
README was missing the 18th tool (get_usage_stats) and the mcporter performance note made it sound like the server itself didn't handle change detection. Clarified that incremental reindexing is automatic and the rebuild issue is mcporter-specific. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ffc3579 commit 84b7493

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A structural codebase indexer with an [MCP](https://modelcontextprotocol.io) ser
1212

1313
## What It Does
1414

15-
Indexes codebases by parsing source files into structural metadata -- functions, classes, imports, dependency graphs, and cross-file call chains -- then exposes 17 query tools via the Model Context Protocol, enabling Claude Code and other MCP clients to navigate codebases efficiently without reading entire files.
15+
Indexes codebases by parsing source files into structural metadata -- functions, classes, imports, dependency graphs, and cross-file call chains -- then exposes 18 query tools via the Model Context Protocol, enabling Claude Code and other MCP clients to navigate codebases efficiently without reading entire files.
1616

1717
**Automatic incremental re-indexing:** In git repositories, the index stays up to date automatically. Before every query, the server checks `git diff` and `git status` (~1-2ms). If files changed, only those files are re-parsed and the dependency graph is rebuilt. No need to manually call `reindex` after edits, branch switches, or pulls.
1818

@@ -97,9 +97,9 @@ Restart OpenClaw and verify the connection:
9797
openclaw mcp list
9898
```
9999

100-
All 17 tools will be available to your agent.
100+
All 18 tools will be available to your agent.
101101

102-
**Performance note:** OpenClaw's default MCP integration via mcporter spawns a fresh server process per tool call, which means the index is rebuilt each time (~1-2s for small projects, longer for large ones). For persistent connections, use the [openclaw-mcp-adapter](https://github.com/androidStern-personal/openclaw-mcp-adapter) plugin, which connects once at startup and keeps the server running:
102+
**Performance note:** The server automatically detects file changes via `git diff` before every query (~1-2ms) and incrementally re-indexes only what changed. However, OpenClaw's default MCP integration via mcporter spawns a fresh server process per tool call, which discards the in-memory index and forces a full rebuild each time (~1-2s for small projects, longer for large ones). This is a mcporter process lifecycle limitation, not a server limitation. For persistent connections, use the [openclaw-mcp-adapter](https://github.com/androidStern-personal/openclaw-mcp-adapter) plugin, which connects once at startup and keeps the server running:
103103

104104
```bash
105105
pip install openclaw-mcp-adapter
@@ -150,7 +150,7 @@ over reading entire files when navigating the codebase.
150150

151151
This ensures the AI reaches for surgical indexed queries first, which saves tokens and context window.
152152

153-
### Available Tools (17)
153+
### Available Tools (18)
154154

155155
| Tool | Description |
156156
|------|-------------|
@@ -171,6 +171,7 @@ This ensures the AI reaches for surgical indexed queries first, which saves toke
171171
| `get_file_dependents` | Files that import from a given file |
172172
| `search_codebase` | Regex search across all files (max 100 results) |
173173
| `reindex` | Force full re-index (rarely needed — incremental updates happen automatically in git repos) |
174+
| `get_usage_stats` | Session efficiency stats: tool calls, characters returned vs total source, estimated token savings |
174175

175176
## Benchmarks
176177

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mcp-codebase-index"
7-
version = "0.4.2"
7+
version = "0.4.3"
88
description = "Structural codebase indexer with MCP server for AI-assisted development"
99
requires-python = ">=3.11"
1010
readme = "README.md"

0 commit comments

Comments
 (0)