The Greptile MCP connector routes your AI agent's tool calls to Greptile's own MCP server through Scalekit. Each user signs in to Greptile once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 16 tools.
- Tools
- 16
- What they doRead · write · destructive
- 14 · 2 · 014 read2 write0 destructive
- Users sign in with
- OAuth
- OAuth app
- Scalekit's or your own
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Greptile MCP connection
In AgentKit > Connections, create a Greptile MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Scalekit credentials are available for Greptile MCP server, so you don't need to register an OAuth app.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'greptilmcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Greptile MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'greptilmcp_list_code_reviews',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "greptilmcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Greptile MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="greptilmcp_list_code_reviews",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolgreptilmcp_get_code_reviewGet detailed code review information including status, comments, and analysis results.Read-onlyGet Code Review
Get detailed code review information including status, comments, and analysis results.
Inputs
codeReviewIdstringrequired- The unique identifier of the code review to retrieve.
greptilmcp_get_custom_contextGet detailed custom context information including evidence and linked comments.Read-onlyGet Custom Context
Get detailed custom context information including evidence and linked comments.
Inputs
customContextIdstringrequired- The unique identifier of the custom context to retrieve.
greptilmcp_get_knowledge_base_documentGet the markdown body of a single knowledge base document.Read-onlyGet Knowledge Base Document
Get the markdown body of a single knowledge base document. Returns the content plus the section and versionId it was read from.
Inputs
pathstringrequired- Document path obtained from List Knowledge Base Documents.
repoNamespaceExternalIdstringrequired- Repository handle obtained from List Knowledge Bases.
greptilmcp_get_merge_requestGet detailed merge request information including metadata, statistics, Greptile comments, and review analysis.Read-onlyGet Merge Request
Get detailed merge request information including metadata, statistics, Greptile comments, and review analysis.
Inputs
defaultBranchstringrequired- The default branch of the repository.
namestringrequired- The repository name (e.g. owner/repo).
prNumbernumberrequired- The pull request or merge request number.
remotestringrequired- The git hosting provider: github, gitlab, azure, or bitbucket.one of
githubgitlabazurebitbucket remoteUrlstring- The remote URL of the repository.
greptilmcp_list_code_reviewsList code reviews with optional filtering by repository, PR number, and review status.Read-onlyList Code Reviews
List code reviews with optional filtering by repository, PR number, and review status.
Inputs
defaultBranchstring- Filter by the repository's default branch.
limitnumber- Maximum number of results to return (1-100). Defaults to 20.default
20 namestring- Filter by repository name (e.g. owner/repo).
offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0 prNumbernumber- Filter by pull request number.
remotestring- Filter by git hosting provider.one of
githubgitlabazurebitbucket remoteUrlstring- Filter by the remote URL of the repository.
statusstring- Filter by code review status.one of
PENDINGREVIEWING_FILESGENERATING_SUMMARYCOMPLETEDFAILEDSKIPPED
greptilmcp_list_custom_contextList organization custom context with optional filtering by type and generation source.Read-onlyList Custom Context
List organization custom context with optional filtering by type and generation source.
Inputs
greptileGeneratedboolean- Filter by whether the context was generated by Greptile.
limitnumber- Maximum number of results to return (1-100). Defaults to 20.default
20 offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0 typestring- Filter by context type: CUSTOM_INSTRUCTION or PATTERN.one of
CUSTOM_INSTRUCTIONPATTERN
greptilmcp_list_knowledge_base_documentsList the document paths in one repository's current published knowledge base.Read-onlyList Knowledge Base Documents
List the document paths in one repository's current published knowledge base. Every returned path can be passed straight to Get Knowledge Base Document.
Inputs
repoNamespaceExternalIdstringrequired- Repository handle obtained from List Knowledge Bases.
limitnumber- Maximum number of results to return (1-100). Defaults to 20.default
20 offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0
greptilmcp_list_knowledge_basesList the repositories in your organization that have a published Greptile knowledge base — the per-repository documentation Greptile synthesizes from the codebase and consults while reviewing.Read-onlyList Knowledge Bases
List the repositories in your organization that have a published Greptile knowledge base — the per-repository documentation Greptile synthesizes from the codebase and consults while reviewing.
Inputs
limitnumber- Maximum number of results to return (1-100). Defaults to 20.default
20 offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0
greptilmcp_list_merge_request_commentsGet all comments for a pull request or merge request, with optional filtering by generation source, addressed status, and date range.Read-onlyList Merge Request Comments
Get all comments for a pull request or merge request, with optional filtering by generation source, addressed status, and date range.
Inputs
defaultBranchstringrequired- The default branch of the repository.
namestringrequired- The repository name (e.g. owner/repo).
prNumbernumberrequired- The pull request or merge request number.
remotestringrequired- The git hosting provider: github, gitlab, azure, or bitbucket.one of
githubgitlabazurebitbucket addressedboolean- Filter by whether the comment has been addressed.
createdAfterstring- Filter comments created after this ISO 8601 datetime.
createdBeforestring- Filter comments created before this ISO 8601 datetime.
greptileGeneratedboolean- Filter by whether the comment was generated by Greptile.
remoteUrlstring- The remote URL of the repository.
greptilmcp_list_merge_requestsList merge requests/PRs with optional filtering by repository, branch, author, and state.Read-onlyList Merge Requests
List merge requests/PRs with optional filtering by repository, branch, author, and state.
Inputs
authorLoginstring- Filter by the author's login username.
defaultBranchstring- Filter by the repository's default branch.
limitnumber- Maximum number of results to return (1-100). Defaults to 20.default
20 namestring- Filter by repository name.
offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0 remotestring- Filter by git hosting provider.one of
githubgitlabazurebitbucket remoteUrlstring- Filter by the remote URL of the repository.
sourceBranchstring- Filter by the source branch of the merge request.
statestring- Filter by merge request state: open, closed, or merged.one of
openclosedmerged
greptilmcp_list_pull_requestsList pull requests with optional filtering by repository, branch, author, and state.Read-onlyList Pull Requests
List pull requests with optional filtering by repository, branch, author, and state. Alias for list_merge_requests.
Inputs
authorLoginstring- Filter by the author's login username.
defaultBranchstring- Filter by the repository's default branch.
limitnumber- Maximum number of results to return (1-100). Defaults to 20.default
20 namestring- Filter by repository name.
offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0 remotestring- Filter by git hosting provider.one of
githubgitlabazurebitbucket remoteUrlstring- Filter by the remote URL of the repository.
sourceBranchstring- Filter by the source branch of the pull request.
statestring- Filter by pull request state: open, closed, or merged.one of
openclosedmerged
greptilmcp_search_custom_contextSearch custom context by content using text search.Read-onlySearch Custom Context
Search custom context by content using text search.
Inputs
querystringrequired- Text query to search custom context content.
limitnumber- Maximum number of results to return (1-50). Defaults to 10.default
10 offsetnumber- Number of results to skip for pagination. Defaults to 0.default
0
greptilmcp_search_greptile_commentsSearch Greptile review comments across all merge requests using text search.Read-onlySearch Greptile Comments
Search Greptile review comments across all merge requests using text search.
Inputs
querystringrequired- Text query to search Greptile review comments.
createdAfterstring- Filter comments created after this ISO 8601 datetime.
includeAddressedboolean- Whether to include already-addressed comments in results. Defaults to false.default
false limitnumber- Maximum number of results to return (1-50). Defaults to 10.default
10
greptilmcp_search_knowledge_baseCase-insensitive substring search across one repository's knowledge base.Read-onlySearch Knowledge Base
Case-insensitive substring search across one repository's knowledge base. Returns matching documents with line numbers and surrounding snippets.
Inputs
querystringrequired- Substring to search for (2-200 characters).
repoNamespaceExternalIdstringrequired- Repository handle obtained from List Knowledge Bases.
limitnumber- Maximum number of results to return (1-50). Defaults to 10.default
10 sectionsarray- Knowledge base sections to search; defaults to 'docs' only.
greptilmcp_create_custom_contextCreate a new custom context for an organization to guide Greptile's code review behavior.WriteCreate Custom Context
Create a new custom context for an organization to guide Greptile's code review behavior.
Inputs
bodystring- The content of the custom context instruction or pattern.
metadataobject- Additional metadata to associate with the custom context.
scopesobject- Scope configuration for where this custom context applies.
statusstring- The initial status of the custom context: ACTIVE, INACTIVE, or SUGGESTED. Defaults to ACTIVE.one of
ACTIVEINACTIVESUGGESTEDdefaultACTIVE typestring- The type of custom context: CUSTOM_INSTRUCTION or PATTERN. Defaults to CUSTOM_INSTRUCTION.one of
CUSTOM_INSTRUCTIONPATTERNdefaultCUSTOM_INSTRUCTION
greptilmcp_trigger_code_reviewTrigger a Greptile code review for a pull request.WriteTrigger Code Review
Trigger a Greptile code review for a pull request. Supported on GitHub and GitLab only.
Inputs
namestringrequired- The repository name (e.g. owner/repo).
prNumbernumberrequired- The pull request number to trigger a code review for.
remotestringrequired- The git hosting provider. Only github and gitlab are supported.one of
githubgitlab branchstring- The source branch of the pull request to review.
defaultBranchstring- The default branch of the repository.
remoteUrlstring- The remote URL of the repository.
No tools match.