Skip to content

[Feature]: agent-setup should mention MCP tools when writing instructions #168

@sethbrasile

Description

@sethbrasile

Problem

grepai agent-setup writes instructions to CLAUDE.md, .cursorrules, .windsurfrules, GEMINI.md, and AGENTS.md that only document CLI usage (grepai search "..." --json). If the user also has the grepai MCP server configured (via .mcp.json), the agent reads these CLI-only instructions and shells out to Bash instead of using the native MCP tools (grepai_search, grepai_trace_callers, etc.).

Related: #167 (quickstart docs note that agent-setup is "not needed if you use MCP")

Suggested Fix

Update the agentInstructions const in cli/agent_setup.go to include a "Choosing Your Integration" section that lists MCP tools as preferred and CLI as fallback. Something like:

### Choosing Your Integration

grepai can be accessed two ways. **Prefer MCP tools when available**.

**MCP tools** (preferred — available if grepai MCP server is configured):
- `grepai_search` — semantic code search
- `grepai_trace_callers` — find all callers of a symbol
- `grepai_trace_callees` — find all callees of a symbol
- `grepai_trace_graph` — build complete call graph
- `grepai_index_status` — check index health

**CLI via shell** (fallback — always works if grepai is installed):
[existing CLI examples]

This way agent-setup and MCP coexist gracefully — agents that have MCP access use MCP, and agents that don't have MCP fall back to CLI.

Happy to submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions