grepai mcp-serve

CLI reference for grepai mcp-serve

grepai mcp-serve

Start grepai as an MCP server

Synopsis

Start grepai as an MCP (Model Context Protocol) server.

This allows AI agents to use grepai as a native tool through the MCP protocol. The server communicates via stdio and exposes the following tools:

  • grepai_search: Semantic code search with natural language
  • grepai_trace_callers: Find all functions that call a symbol
  • grepai_trace_callees: Find all functions called by a symbol
  • grepai_trace_graph: Build a call graph around a symbol
  • grepai_index_status: Check index health and statistics

Arguments: project-path Optional path to the grepai project directory. If not provided, searches for .grepai from current directory.

Flags: —workspace Workspace name. When set, serves using workspace config from ~/.grepai/workspace.yaml without requiring local .grepai/.

Configuration for Claude Code: claude mcp add grepai — grepai mcp-serve claude mcp add grepai — grepai mcp-serve —workspace myworkspace

Configuration for Cursor (.cursor/mcp.json): { “mcpServers”: { “grepai”: { “command”: “grepai”, “args”: [“mcp-serve”] } } }

Configuration for Cursor with explicit path (recommended for Windows): { “mcpServers”: { “grepai”: { “command”: “grepai”, “args”: [“mcp-serve”, “/path/to/your/project”] } } }

grepai mcp-serve [project-path] [flags]

Options

  -h, --help               help for mcp-serve
      --workspace string   Workspace name for workspace-only mode (no local .grepai/ required)

SEE ALSO

  • grepai - Semantic code search CLI
Auto generated by spf13/cobra on 6-Feb-2026