Skip to main content
The Greptile plugin gives Claude Code two ways to work with your reviews:
  • the Greptile MCP server, for reading and resolving review results and for searching your organization’s knowledge base and coding patterns
  • the Greptile CLI, for reviewing your working branch before a pull request exists
They are two ends of one pipeline. The CLI dispatches reviews; the MCP server reads them back — both the ones the CLI dispatched and the ones Greptile ran on your pull requests.
Prerequisites: A Greptile account with your repositories connected, Claude Code v2.1 or later, and Node 22+ on your machine for the bundled CLI.

Installation

Both surfaces sign in with OAuth. There is no API key to create.
1

Add the Greptile marketplace

2

Install the plugin

Choose an installation scope:
  • User scope — available in all your Claude Code sessions
  • Project scope — available to all collaborators on this repository
  • Local scope — available only in this repository, only for you
3

Authenticate the MCP server

Open the /mcp menu and authenticate greptile. Your browser opens auth.greptile.com; sign in and approve access. Claude Code stores and refreshes the tokens for you.
4

Authenticate the CLI

This completes the same OAuth flow for the bundled CLI, which keeps its own credentials in ~/.greptile/auth.json.The two sign-ins are separate: same Greptile account and same provider, but Claude Code and the CLI each hold their own tokens. You only need the one whose surface you plan to use.
5

Verify the installation

The greptile plugin should be listed and enabled, with the greptile MCP server connected. Then try a tool:

Commands

/greptile:review dispatches a headless review: it reviews your working branch and does not need an open pull request. The result is stored on your Greptile account, so the MCP tools can read it back with source: "headless".

What You Can Do

Once installed, ask Claude Code to work with your Greptile reviews in natural language.

Fix All Comments on a PR

Claude fetches unaddressed comments, analyzes the suggested fixes, and applies them directly to your code.
Claude Code applying a fix from a Greptile comment

Claude applies a fix for invalid date handling based on Greptile's review comment

Review Before You Open a PR

Reviews your working branch against main without needing a pull request, then summarizes the findings and offers to fix them.

Analyze Security Concerns

Claude fetches the complete review and breaks down any security-related feedback.
Claude Code showing security analysis from Greptile review

Full review analysis showing security issues, bug issues, and priority recommendations

Summarize Blocking Issues

Claude Code summarizing blocking issues across PRs

Summary of open PRs with blockers, organized by severity

Example Prompts

Pull Requests & Reviews

Working with Comments

Custom Context

Available Tools

The plugin uses Greptile’s MCP server. list_pull_requests and list_merge_requests work identically.
  • list_pull_requests — List PRs with filters (author, state, branch)
  • list_merge_requests — Alias of list_pull_requests
  • get_merge_request — Get full PR details including review analysis
  • list_merge_request_comments — Get all comments on a PR
View full parameters →
  • list_code_reviews — List reviews with status filters
  • get_code_review — Get detailed review information
  • trigger_code_review — Start a new review on a PR
View full parameters →
  • search_greptile_comments — Search all Greptile comments across repos
View full parameters →
  • list_custom_context — List org coding patterns
  • get_custom_context — Get pattern details
  • search_custom_context — Search patterns by content
  • create_custom_context — Create new patterns
View full parameters →
  • list_knowledge_bases — List the knowledge bases you can access
  • list_knowledge_base_documents — List documents in a knowledge base
  • get_knowledge_base_document — Read one knowledge base document
  • search_knowledge_base — Search documents in a knowledge base
View full parameters →
  • get_analytics_overview — Summary metrics, period changes, chart series, and repository, contributor, and pull request rankings
  • list_analytics_findings — Findings with severity and security totals and trends, filterable by team, repository, author, severity, or status
  • list_analytics_filter_options — The teams, repositories, and authors available to you as filters
View full parameters →

The bundled CLI

The plugin ships the Greptile CLI, so /greptile:review works with no npm or Homebrew install. The bundled copy is the published greptile npm package, verified byte-for-byte in CI against the version it records, and it updates when the plugin updates — not through greptile update, npm, or brew. Any separate greptile you have installed is untouched and unused by these commands, though both share your login at ~/.greptile/auth.json. The plugin registers no hooks and sends no telemetry. It contacts api.greptile.com, auth.greptile.com, and app.greptile.com, plus a 127.0.0.1 loopback listener that receives the OAuth callback during /greptile:login. See the plugin source for details.

Learn More

Troubleshooting

Make sure you’re running Claude Code v2.1 or later:
Then confirm the marketplace and plugin are both registered:
If the plugin is listed but its commands are missing, run /reload-plugins.
Open /mcp and check the greptile server’s status. If it is not authenticated, select it and complete the browser sign-in. Claude Code refreshes the token itself; you only need to repeat this if you revoke access.
The CLI keeps its own credentials, separate from the MCP server. Run:
The bundled CLI is a Node program. Confirm Node 22 or later is on your PATH:
Check that:
  • Your repositories are connected in app.greptile.com
  • You have open PRs with Greptile reviews
  • Your Greptile account has access to those repositories

Next Steps

Agent Skills

Automate the full auto-fix loop with /check-pr and /greploop

Auto-Fix Workflow

Manual patterns for resolving review comments

Custom Context

Add your team’s coding standards for better reviews

Greptile CLI

Install the standalone CLI and run local reviews

Plugin source

Review the marketplace package and plugin source

MCP setup

Configure Greptile MCP in other coding tools