Connect your agent, and let it ask instead of read
The short answer
This is the one step CodeMesh cannot do for you: your agent cannot query CodeMesh until it is connected over MCP. Click Connect next to your agent in the panel and CodeMesh writes its MCP entry, installs its instructions, then proves it with a live handshake. Connected means the handshake passed, not that you clicked.
What Connect actually does
- Writes the MCP entry. Into the config file that agent reads, in the format that agent expects. This is the step people get wrong by hand, because every agent puts it somewhere different.
- Installs the instructions. An agent with a tool it does not know when to reach for will keep reading files instead, so the instructions matter as much as the connection.
- Runs a handshake. A real call over the real transport. If it fails you are told immediately, rather than finding out later when an answer looks wrong.
Any MCP client works, including agents not listed in the panel. For those, the panel keeps the raw endpoint details on its Connect tab.
What your agent gets
Three kinds of question, three kinds of answer. A value or a definition comes back as the matching lines. A path, a call chain or a dependency is walked over real edges. An exact string is searched. In every case what returns is spans of code, not files.
Asked and answered
The console beside this shows the shape of a reply: a question, the tool that answers it, and the spans that came back. No repository crawl, and nothing opened that turned out to be irrelevant.
The exchange below it is the same thing from the agent's side, as a session transcript.
For a client the panel does not list
Any MCP client works. The panel keeps the raw endpoint on its Connect tab, and for a client it does not know about, this is the entry to add by hand. It is the same entry the panel writes for you.
After adding it, restart the client and confirm it lists the CodeMesh tools. That is the hand-rolled equivalent of the handshake.
{
"mcpServers": {
"codemesh": {
"command": "codemesh",
"args": ["mcp-stdio"]
}
}
}Per-agent notes
The mechanism is identical everywhere, so these pages cover only what is specific to each tool: where its config lives and how it reports a working connection.
Claude Code
Connecting Claude Code over MCP, and what changes about how it explores a repository once CodeMesh is attached.
Cursor
Cursor's MCP configuration, and using CodeMesh alongside its own indexing rather than instead of it.
VS Code
The extension and an MCP-capable agent inside VS Code, including agents the panel does not list.
Windsurf
Where Windsurf keeps its MCP entry and how to confirm the handshake passed.
Any MCP client
The raw endpoint, the scopes a client is granted, and what a correct handshake looks like on the wire.
How sync works
What happens between your save and the answer your agent gets, in six beats.
Do I have to edit a config file by hand?
Can I connect more than one agent?
What can a connected agent read?
My agent connected but still reads files. Why?
Install the extension and connect in one sitting
Install, sign in, click Connect. The handshake tells you when it is genuinely working.