r/opencodeCLI • u/Whole-Assignment6240 • Feb 21 '26
cocoindex-code - super light weight MCP that understand and searches codebase that just works on opencode
I built a a super light-weight, effective embedded MCP that understand and searches your codebase that just works (AST-based) ! Using CocoIndex - an Rust-based ultra performant data transformation engine. No blackbox. Works for opencode or any coding agent. Free, No API needed.
- Instant token saving by 70%.
- 1 min setup - Just claude/codex mcp add works!
https://github.com/cocoindex-io/cocoindex-code
Would love your feedback! Appreciate a star ⭐ if it is helpful!
To get started:
```
opencode mcp add
```
- Enter MCP server name:
cocoindex-code - Select MCP server type:
local - Enter command to run:
uvx --prerelease=explicit --with cocoindex>=1.0.0a16 cocoindex-code@latest
Or use opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"cocoindex-code": {
"type": "local",
"command": [
"uvx",
"--prerelease=explicit",
"--with",
"cocoindex>=1.0.0a16",
"cocoindex-code@latest"
]
}
}
}
43
Upvotes
3
u/mrfreez44 Feb 21 '26
How does it behave when switching branch? Or using worktrees?
3
u/Miserable-Cow3117 Feb 21 '26
How this compare to Serena or grepai? I've already tried both and I'm not really impressed by the results
2
u/debackerl Feb 21 '26
Very nice! I just found https://github.com/postrv/narsil-mcp yesterday. They also offer code search based on embeddings (their neural_search tool).
How do you split your chunks? Is it based on an AST?
2
u/Mlaz72 Feb 28 '26
u/Whole-Assignment6240 is there any problem with this https://github.com/cocoindex-io/cocoindex-code/pull/22 ? I am patiently waiting it to be part of your project. I already stop using your default model and started using Mistral's embed model instead. But I want to check if that local model from PR will perform faster similarly to your local default model.
1
u/Professional_Past_30 Feb 21 '26
Looks really cool! How does the embedding model work underneath?
1
u/Delyzr Feb 21 '26
No php support ?
1
u/Character_Cod8971 Feb 21 '26
How can I tell the model to always use this instead of its built-in tools. I found models to not use any MCP server except if I specifically tell them which is not what I want to do every time I make a prompt.
1
u/Hot_Dig8208 Feb 22 '26
I tried cocoindex months ago. Its useful when you have a monorepo project. It will make the agent search faster.
The downside of cocoondex is it use postrgres to store the data. I need to run locally since my project is huge. I can’t use free postgress instance for this.
1
u/ThatNickGuyyy Feb 22 '26
I’ll test drive this at work tomorrow!
I work a huge legacy PHP codebase and most of these tools don’t work the greatest. This seems promising!
Will provide feedback!
1
u/chrismo80 Feb 22 '26
currently under test, need to watch token usage if it makes a difference.
but my agent already thanked for the search tool, seems to be handy for him.
1
u/KevinNitroG Feb 23 '26
Is this similar to VectorCode?
1
u/Mlaz72 Feb 21 '26
when I asked model to check if this MCP works correctly, it seems it installed some stuff I did not have on my machine. So I am not sure this is working out of box, and leaving here for you to investigate. I hope my assumption is incorrect but I decided to share this with you anyway.
1
u/landed-gentry- Feb 21 '26
Saves tokens, but at what cost? There's a reason SOTA agentic harnesses aren't using these tools already.
1
u/PunjabiMunda90 Feb 24 '26
could this be published as a docker image? That way wouldn't have to install deps etc.
2
u/[deleted] Feb 21 '26
[removed] — view removed comment