MCP & CLI
raph exposes the same capabilities two ways. Prefer MCP when it is connected; fall back to the CLI otherwise.
MCP server
Section titled “MCP server”Start the server (stdio):
raph startInstall project config for supported agents automatically:
raph agents mcp setup --path .This writes the correct config for OpenCode (opencode.json), Claude Code
(.mcp.json), Codex (.codex/config.toml), Cursor (.cursor/mcp.json), and Pi
(.pi/mcp.json).
search— ripgrep-style search (auto/literal/regex/vector, type & scope filters)search_codebase,index_codebasestore_memory,update_memory,deprecate_memory,get_memory_historysearch_project_knowledge,search_shared_knowledge,search_global_preferencesstore_rule,list_rulesadd_document,list_documents,read_document,link_nodescrawl_url,crawl_websitegraph_neighbors,graph_neighbors_cross_corpus,best_vector_match
CLI for agents
Section titled “CLI for agents”Every command takes --format json|text. raph defaults to JSON when it detects
it is being called by an agent (via the RAPH_FORMAT/RAPH_JSON env or a
non-terminal stdout), and to text in an interactive terminal. So an agent can
just run:
raph search "auth middleware" --type funcraph mem search "deployment" --scope projectraph rules list --allraph doc list --type handoffand parse the JSON, with no flags required. Humans get readable output automatically.