Documentation
¶
Overview ¶
Package install registers the codegraph MCP server into the AI coding agents found on the machine. The "main" agents (Claude Code, Codex, opencode) are auto-registered — via their own add-CLI where one exists (safe: the agent owns its config format), or a careful config-file merge where it doesn't. Anything else is covered by a generic manual snippet (GenericManual).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaudeCommand ¶
ClaudeCommand is the `claude mcp add` invocation: user scope (any repo), stdio transport, no repo arg (the server reads $CLAUDE_PROJECT_DIR at runtime).
func CodexCommand ¶
CodexCommand is the `codex mcp add` invocation. Codex stores it in ~/.codex/config.toml (user scope), so it applies to any repo.
func GenericManual ¶
GenericManual is the fallback for any agent codegraph doesn't auto-register: the stdio server command to wire into that agent's MCP config.
Types ¶
type Agent ¶
type Agent struct {
Name string
Detect func() bool // is this agent installed on the machine?
Install func(bin string) error // auto-register; nil = manual only
Manual func(bin string) string // paste-ready fallback instructions
}
Agent is one AI coding agent codegraph can register itself with.
type Outcome ¶
type Outcome struct {
Agent string
Installed bool
Err error
Manual string // set when the user must act (no auto path, or it failed)
}
Outcome reports what happened for one detected agent.