Skip to content

Commit 64a3607

Browse files
authored
docs: update README.md to explain how the MCP is triggered (#35)
1 parent f505c8a commit 64a3607

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ Or use opencode.json:
8585

8686
Optionally, you can run `cocoindex-code index` to create or update the index. Without running it, the MCP server will automatically build and keep the index up-to-date in the background.
8787

88+
## When Is the MCP Triggered?
89+
90+
Once configured, your coding agent (Claude Code, Codex, Cursor, etc.) automatically decides when semantic code search is helpful — especially for finding code by description, exploring unfamiliar codebases, fuzzy/conceptual matches, or locating implementations without knowing exact names.
91+
92+
You can also nudge the agent explicitly, e.g. *"Use the cocoindex-code MCP to find how user sessions are managed."* For persistent instructions, add guidance to your project's `AGENTS.md` or `CLAUDE.md`:
93+
94+
```
95+
Use the cocoindex-code MCP server for semantic code search when:
96+
- Searching for code by meaning or description rather than exact text
97+
- Exploring unfamiliar parts of the codebase
98+
- Looking for implementations without knowing exact names
99+
- Finding similar code patterns or related functionality
100+
```
101+
88102
## Features
89103
- **Semantic Code Search**: Find relevant code using natural language queries when grep doesn't work well, and save tokens immediately.
90104
- **Ultra Performant to code changes**:⚡ Built on top of ultra performant [Rust indexing engine](https://github.com/cocoindex-io/cocoindex/edit/main/README.md). Only re-indexes changed files for fast updates.

0 commit comments

Comments
 (0)