otheroauth2

Greptile MCP

Greptile MCP lets authorized agents search connected codebases, inspect pull requests and code reviews, manage custom context, and analyze engineering knowledge bases.

Verdict

Greptile MCP connects your team's code repositories to Switchy so AI can review pull requests, search codebases, and answer questions about your architecture. When you @mention Greptile, it can fetch PR details, run custom review rules, pull analytics on review velocity, and read knowledge-base docs you've indexed. Engineers get instant context on unfamiliar repos; managers get sprint metrics without opening dashboards. The OAuth flow requires repository read access, and you'll need to configure which repos Greptile indexes before the MCP can query them.

Common use cases

  • Review pull requests without leaving chat
  • Search codebase for API usage examples
  • Audit review velocity across teams
  • Fetch architecture docs from knowledge base
  • Enforce custom review rules on commits

Integration

Vendor
Greptile MCP
Category
other
Auth
OAUTH2
Tools
21
Composio slug
greptile_mcp

Tools

  • Create custom context

    Create a persistent review rule or pattern in the selected organization. Omitted type defaults to CUSTOM_INSTRUCTION, omitted status to ACTIVE, omitted scopes to universal scope, and omitted metadata to an empty object. Returns the stored c

  • Get analytics overview

    Get review analytics for repositories visible to the caller, optionally intersected by exact team, repository, and author filters. Omitted dates mean the current calendar month through now in timeZone; period-change metrics compare the imme

  • Get code review

    Get one code-review run by its stable id. Returns codeReview with body, status, commit, timestamps, allowlisted customer metadata, dispatch user, and optional mergeRequest, plus summaryCitations. CLI/headless reviews have source "headless"

  • Get custom context

    Get one saved review rule or pattern and up to 10 linked review-comment references. Returns customContext metadata and linkedComments; it does not return evidence bodies or source URIs. Each linked comment has source "pr" or "headless" and

  • Get knowledge base document

    Read one current knowledge-base markdown document after listing its path. Returns document identity, section, immutable versionId, full characterCount, and content, plus untrustedContent and notice. The serialized response is capped at 80 K

  • Get me

    Identify the caller and discover the organizations available to other tools. Call this when the organization is unknown or after tenant_required; pass an organization's id or handle as organization on a later call. It requires no selected o

  • Get merge request

    Get one pull request or merge request with metadata, statistics, comments, up to 10 recent review records, and summary citations for the latest completed review. Addressed and unaddressed groups reflect each Greptile comment's stored addres

  • List analytics filter options

    List exact team names, repository names, or author logins available to the caller for analytics filters. Query is a trimmed, case-insensitive substring; unique options are locale-sorted. Returns options, full matching total, limit, offset,

  • List analytics findings

    List review findings visible to the caller, newest first, with optional exact scope, severity, security, stored-addressed-status, text, and date filters. Omitted dates mean the current calendar month through now in timeZone; trend fields co

  • List code reviews

    List code-review runs visible to the caller, newest first, optionally filtered by repository, PR number, or status. Returns codeReviews and the number returned as total. CLI/headless runs have source "headless" and mergeRequest null; PR run

  • List custom context

    List saved review rules and learned patterns visible to the caller, newest first. Returns customContexts with id, type, body, status, scopes, metadata, evidenceCount, commentsCount, and createdAt; evidence bodies and source URIs are not ret

  • List knowledge base documents

    List paths in one repository's current published knowledge base to map its documented subsystems before reading. Returns namespaceId, deprecated repoNamespaceExternalId, repoName, indexPresent, sectionVersions.docs, documentPaths, total, an

  • List knowledge bases

    Discover repositories with reachable Greptile knowledge-base data; start here before asking how an unfamiliar repository works. Returns repositories with namespaceId, deprecated repoNamespaceExternalId, and repoName, plus total and returned

  • List merge request comments

    List all matching comments for one pull request or merge request, newest first. Returns comments, repository, prNumber, and total. Each comment exposes isGreptileComment rather than sourceType, plus stored addressed state, optional extracte

  • List merge requests

    List merge requests and pull requests visible to the caller, newest first. Optionally restrict by a repository tuple, source branch, author, or state; sourceBranch and authorLogin are case-insensitive substring filters. This server cannot d

  • List pull requests

    Alias of list_merge_requests with the same filters and result contract. List visible pull requests newest first; sourceBranch and authorLogin are case-insensitive substring filters, and this server cannot detect a local checkout or current

  • List repositories

    List repositories visible to the caller in the selected organization, sorted by name. Each entry contains namespaceId for knowledge-base tools and the name/remote/defaultBranch/optional remoteUrl tuple for pull-request and review tools; int

  • Search custom context

    Search visible custom-context bodies by case-insensitive substring, newest matches first. Returns customContexts and query; each result includes id, type, body, status, scopes, metadata, evidenceCount, commentsCount, and createdAt. Evidence

  • Search greptile comments

    Search Greptile-generated review comments by case-insensitive body substring across PR and CLI/headless reviews, newest first. Returns comments, query, the returned count as total, and an addressed/unaddressed/suggestion summary. Results ha

  • Search knowledge base

    Search one repository's current knowledge base for a case-insensitive substring when you know the term, symbol, endpoint, or convention to investigate. Returns repository identity, query, pinned sectionVersions, matching document results wi

  • Trigger code review

    Request a new asynchronous Greptile review for an existing GitHub pull request or GitLab merge request. This queues normal review processing, which consumes review credits, persists a review run, and can post or update review feedback on Gi

Setup

Setup guide

  1. 11. Open your Switchy workspace settings and navigate to the Integrations tab. 2. Find Greptile MCP in the directory and click Connect. 3. You'll be redirected to Greptile's OAuth consent screen—grant read access to the repositories you want AI to query. 4. After authorization, Switchy returns you to the integrations page with a green Connected badge. 5. Go to Greptile's dashboard and confirm which repos are indexed; the MCP can only search codebases Greptile has already crawled. 6. Create a new Project in Switchy, type '@Greptile get me' in the chat, and verify the MCP returns your organization details. 7. To test a real workflow, open a recent pull request in your repo, copy its URL, then ask '@Greptile get merge request [URL]' to see PR metadata and review summaries.

What teammates see: by default, memories from Greptile MCP are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Projects have used this MCP together with a given model.

How Switchy teams use it

Not enough Projects yet to publish anonymised usage stats (we require ≥ 50 Projects per week).

Starter prompts

Summarize Open PRs

@Greptile get analytics overview for this month and list the top five pull requests by comment count, then summarize what's blocking each one.

Explain Unfamiliar Module

@Greptile search the repository for the UserAuthService class, show me where it's defined, and explain what it does and which other services depend on it.

Audit Review Rules

@Greptile get custom context for our organization and show me all active review rules, including their scopes and descriptions.

Fetch Knowledge Base Doc

@Greptile get knowledge base document at path /docs/architecture/api-gateway.md and paste the full content here.

Check PR Review Status

@Greptile get merge request https://github.com/myorg/myrepo/pull/42 and tell me which review comments are still unaddressed.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@greptile get me a code review summary for PR #847 in the api-gateway repo, including any unaddressed comments

Output

Retrieved code review for PR #847. The review flagged 3 concerns: (1) potential SQL injection risk in the query builder at line 142, (2) missing error handling in the webhook handler, and (3) inconsistent naming conventions across 4 new endpoints. Two comments remain unaddressed—the SQL injection warning and the error-handling gap. The review was completed 6 hours ago and includes citations to your team's security guidelines and REST API style guide.

Notes

This example shows Greptile's core review-retrieval capability. The MCP returns structured feedback with citations to your org's custom context (style guides, security rules). You'll need OAuth access to the target repository. The 'unaddressed' flag helps teams triage before merge.

Prompt

@greptile create a custom context rule: all new API endpoints must include rate-limit headers and document them in the OpenAPI spec

Output

Created custom context rule 'API Rate Limit Documentation' with status ACTIVE and universal scope across your organization. This rule will now appear in future code reviews when new endpoint definitions are detected. The rule defaults to CUSTOM_INSTRUCTION type and applies to all repositories unless you narrow the scope later. Rule ID: ctx_9x4k2m.

Notes

This demonstrates Greptile's persistent rule engine—once saved, the pattern influences all subsequent reviews. The MCP defaults to universal scope, so the rule applies org-wide immediately. You can refine scope or deactivate the rule later if it generates noise.

Prompt

@greptile pull analytics for the last 30 days: which repositories had the most unaddressed review comments, and summarize the top 3 recurring issues

Output

Analytics for the past 30 days show 'payments-service' leads with 47 unaddressed comments, followed by 'user-auth' (34) and 'notification-worker' (29). Recurring issues: (1) missing unit tests for new functions (18 instances), (2) hardcoded configuration values instead of environment variables (14 instances), (3) inconsistent error logging formats (11 instances). Data reflects repositories visible to your OAuth token.

Notes

This synthesis example pairs Greptile's analytics API with the AI's summarization. The MCP returns raw counts and metadata; the AI identifies patterns. Note that visibility depends on your OAuth scope—private repos require explicit access. Use this to spot team-wide quality gaps.

Use-case deep-dives

Code review backlog at 8-person eng team

When Greptile wins for persistent review standards across PRs

An 8-person engineering team ships 40 PRs a week and wants every review to check the same security patterns without writing the same comment twice. Greptile's "Create custom context" tool lets you save review rules once—say, "flag any Stripe API call without idempotency keys"—and the MCP applies them to every subsequent PR. The 21-tool surface includes analytics to see which rules catch the most issues and which reviewers address them fastest. This works when your team has 3-5 recurring patterns worth codifying; if you're still figuring out what good looks like, the overhead of writing rules outweighs the benefit. If your review process is stable and you're tired of copy-pasting the same feedback, Greptile turns institutional knowledge into executable checks.

Customer support knowledge base lookup

When Greptile's knowledge base tool closes the gap on technical questions

A 5-person support team fields 200 tickets a month and half require digging through internal docs to explain API behavior or deployment steps. Greptile's "Get knowledge base document" tool pulls markdown docs by path, so your AI can answer "how do we handle webhook retries" without a human opening Notion. The MCP returns full content plus character count and version ID, which matters when you need to cite the exact section or confirm the doc is current. This scenario breaks down if your knowledge base isn't already markdown or if docs change hourly—Greptile reads snapshots, not live edits. If your support load is technical and your docs are stable, this MCP turns your knowledge base into a queryable assistant that scales with ticket volume.

Sprint retrospective with review analytics

When Greptile's analytics surface patterns your retro would miss

A 6-person product team runs two-week sprints and wants to know why PRs sat unreviewed for three days last cycle. Greptile's "Get analytics overview" tool filters by team, repo, and author, then returns review counts and timing for the current month or a custom range. You can ask the AI "which repos had the slowest review turnaround in March" and get an answer without exporting CSV files or writing SQL. The 21-tool count includes merge-request detail and comment threads, so you can drill from aggregate stats into specific PRs. This works when your team ships enough PRs to make patterns meaningful—under 20 PRs a month, you're better off eyeballing the list. If your retros spend 10 minutes reconstructing what happened, Greptile gives you the data to start with why.

Frequently asked

What does Greptile MCP do in Switchy?

Greptile MCP connects your team's code review workflow to Switchy's AI workspace. You can pull analytics on review patterns, retrieve specific code reviews with their citations, manage custom review rules, and query your knowledge base documents. It's designed for teams that want AI assistance grounded in their actual review history and coding standards, not generic advice.

Do I need admin access to connect Greptile MCP?

You'll authenticate via OAuth2, which means Greptile controls what scopes you grant during setup. Typically you need read access to repositories and review data, plus write access if you want to create custom review rules. The "Get me" tool discovers which organizations you can access, so your permissions determine what data Switchy can pull.

Can Greptile MCP trigger new code reviews or merge PRs?

No. The 21 tools are read-heavy: fetching reviews, analytics, merge request metadata, and knowledge base documents. You can create or update custom review rules, but you can't initiate a new review run or approve a pull request. For those actions, use your Git platform's native interface or CI hooks.

Why use Greptile MCP instead of querying GitHub or GitLab directly?

Greptile aggregates review analytics across repositories, surfaces citation-backed summaries, and maintains a knowledge base of your team's patterns. If you just need PR status, hit the Git API. If you want AI to learn from your review history and apply custom rules, Greptile's abstraction saves you from stitching together dozens of API calls.

Who on the team should connect Greptile MCP?

Whoever has visibility into the repositories and review data you want Switchy to access. Engineering leads or DevOps roles are typical, since they often have org-level read permissions. Once connected, any Switchy user can invoke the tools, but the data returned depends on the connector's OAuth scope.

More other MCPs

See all other MCPs →

Data last verified 61 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.