Appearance
Connect an agent
Package: elsai-codegraph v1.6.2
The base agent starts the container itself over stdio. There is no port and no separate service. The agent sees one tool, elsai_codegraph_explore.
One repository
yaml
mcp_servers:
- transport: stdio
command: docker
args:
- run
- -i
- --rm
- -v
- /path/to/repos:/repos
- elsai-codegraph
- serve
- --mcp
- --path
- /repos/helpdesk--path makes that repository the default, so the agent can leave projectPath out.
On Windows, when Docker runs inside WSL, the command is wsl and the arguments start with -u, root, docker, then the same run arguments. Use the /mnt/c/... path for the mount.
Several repositories
Use one container and one mount. Leave --path off. Index each repository once:
bash
for r in helpdesk jellyfin insurance; do
docker run --rm -v /path/to/repos:/repos elsai-codegraph init -i /repos/$r
doneyaml
mcp_servers:
- transport: stdio
command: docker
args: [run, -i, --rm, -v, "/path/to/repos:/repos", elsai-codegraph, serve, --mcp]Tell the agent which path is which, in its system prompt:
text
You can query indexed codebases through elsai_codegraph_explore.
There is no default repository. Always pass projectPath, chosen from this list:
- helpdesk -> /repos/helpdesk : Python helpdesk services
- jellyfin -> /repos/jellyfin : C# Jellyfin media server
- insurance -> /repos/insurance : Python insurance eligibility service
A question that spans repositories is one call per repository.A parent folder is adopted as the default only when exactly one sub-project is indexed. With two or more, the agent must pass projectPath.