grove
Documentation menu

AI assistants (MCP)

Grove is a Model Context Protocol server. Connect an assistant and it can search all your repositories, read files and dig through history with the same query language you use in the web app.

The quick way: Set me up

Click Set me up in Grove’s top bar. The dialog creates an API key and shows ready-to-paste configuration for Claude Code, GitHub Copilot in VS Code and the browser extension, with your instance’s URL and key filled in.

The Set me up dialog with the Claude Code configurationThe Set me up dialog with the Claude Code configuration

Endpoint and authentication

Endpoint Transport
/mcp Streamable HTTP, for MCP clients
/mcp/call a single JSON-RPC request per POST, for scripts

Send a token as Authorization: Bearer <token>. Either works:

  • API key (grove_…): acts as the user who created it. Create one under Settings → API keys or with Set me up. Grove shows the key once.
  • Service token: a read-only credential that isn’t tied to a user, with an optional expiry, for CI jobs and shared agents. Create one under Settings → API keys → Service tokens.

Grove doesn’t accept tokens from your OIDC provider on these endpoints. On a public instance no token is needed. A request without a valid token gets a 401 pointing to Grove’s protected-resource metadata (/.well-known/oauth-protected-resource).

Client configuration

Claude Code

Add a .mcp.json to your project root to share the server with your team:

{
	"mcpServers": {
		"grove": {
			"type": "http",
			"url": "https://grove.example.com/mcp",
			"headers": { "Authorization": "Bearer grove_…" }
		}
	}
}

Or add it just for yourself:

claude mcp add --transport http grove https://grove.example.com/mcp \
  --header "Authorization: Bearer grove_…"

Run /mcp in Claude Code to check that grove is connected.

GitHub Copilot (VS Code)

Run MCP: Open User Configuration from the command palette and add the server. VS Code asks for the key the first time the server is used, so it isn’t stored in the file:

{
	"servers": {
		"grove": {
			"url": "https://grove.example.com/mcp",
			"type": "http",
			"headers": { "Authorization": "Bearer ${input:grove-api-token}" }
		}
	},
	"inputs": [
		{
			"id": "grove-api-token",
			"type": "promptString",
			"description": "Enter your Grove API token",
			"password": true
		}
	]
}

Other clients

Any client that supports remote MCP servers over HTTP works: point it at https://<your-grove>/mcp and send the token in the Authorization header.

Tools

Tool What it does
search Searches code, commits (type:commit) or diffs (type:diff) with the full query syntax
list_repos Lists the indexed repositories
get_file Returns a file’s full content at the indexed revision

search takes these arguments:

Argument Default Meaning
query – the query, as typed in the web app
isRegex true read terms as regular expressions; false for literal text
maxResults 100 files to return; a count: in the query wins; the server cap applies
maxMatches 50 matched lines per file
returnWholeFile false include whole files instead of matched lines (at most 20 files)

Grove also publishes its syntax guide as the resource help://search-syntax, so assistants can look up filters on their own.

Trying it from the command line

curl -X POST https://grove.example.com/mcp/call \
  -H "Authorization: Bearer grove_…" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"search","arguments":{"query":"repo:api lang:go retryBudget"}}}'

Securing the endpoint

MCP clients don’t send an Origin header, but browsers do. Set MCP_ALLOWED_ORIGINS to your Grove origin so web pages on other sites can’t call /mcp through a visitor’s browser. See Configuration.