Greptile MCP
Vendor MCP16 toolsOAuth 2.1/DCRDeveloper ToolsSearchAIAI-powered code search and understanding API that indexes GitHub and GitLab repositories, enabling natural language queries over codebases.
Greptile MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set 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> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_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)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'greptilmcp_list_code_reviews',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_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)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Search knowledge base, greptile comments, custom context — Case-insensitive substring search across one repository’s knowledge base
- List knowledge bases, knowledge base documents, pull requests — 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
- Get knowledge base document, merge request, custom context — Get the markdown body of a single knowledge base document
- Review trigger code — Trigger a Greptile code review for a pull request
- Create custom context — Create a new custom context for an organization to guide Greptile’s code review behavior
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
greptilmcp_create_custom_context#Create a new custom context for an organization to guide Greptile's code review behavior.5 params
Create a new custom context for an organization to guide Greptile's code review behavior.
bodystringoptionalThe content of the custom context instruction or pattern.metadataobjectoptionalAdditional metadata to associate with the custom context.scopesobjectoptionalScope configuration for where this custom context applies.statusstringoptionalThe initial status of the custom context: ACTIVE, INACTIVE, or SUGGESTED. Defaults to ACTIVE.typestringoptionalThe type of custom context: CUSTOM_INSTRUCTION or PATTERN. Defaults to CUSTOM_INSTRUCTION.greptilmcp_get_code_review#Get detailed code review information including status, comments, and analysis results.1 param
Get detailed code review information including status, comments, and analysis results.
codeReviewIdstringrequiredThe unique identifier of the code review to retrieve.greptilmcp_get_custom_context#Get detailed custom context information including evidence and linked comments.1 param
Get detailed custom context information including evidence and linked comments.
customContextIdstringrequiredThe unique identifier of the custom context to retrieve.greptilmcp_get_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.2 params
Get the markdown body of a single knowledge base document. Returns the content plus the section and versionId it was read from.
pathstringrequiredDocument path obtained from List Knowledge Base Documents.repoNamespaceExternalIdstringrequiredRepository handle obtained from List Knowledge Bases.greptilmcp_get_merge_request#Get detailed merge request information including metadata, statistics, Greptile comments, and review analysis.5 params
Get detailed merge request information including metadata, statistics, Greptile comments, and review analysis.
defaultBranchstringrequiredThe default branch of the repository.namestringrequiredThe repository name (e.g. owner/repo).prNumbernumberrequiredThe pull request or merge request number.remotestringrequiredThe git hosting provider: github, gitlab, azure, or bitbucket.remoteUrlstringoptionalThe remote URL of the repository.greptilmcp_list_code_reviews#List code reviews with optional filtering by repository, PR number, and review status.8 params
List code reviews with optional filtering by repository, PR number, and review status.
defaultBranchstringoptionalFilter by the repository's default branch.limitnumberoptionalMaximum number of results to return (1-100). Defaults to 20.namestringoptionalFilter by repository name (e.g. owner/repo).offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.prNumbernumberoptionalFilter by pull request number.remotestringoptionalFilter by git hosting provider.remoteUrlstringoptionalFilter by the remote URL of the repository.statusstringoptionalFilter by code review status.greptilmcp_list_custom_context#List organization custom context with optional filtering by type and generation source.4 params
List organization custom context with optional filtering by type and generation source.
greptileGeneratedbooleanoptionalFilter by whether the context was generated by Greptile.limitnumberoptionalMaximum number of results to return (1-100). Defaults to 20.offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.typestringoptionalFilter by context type: CUSTOM_INSTRUCTION or PATTERN.greptilmcp_list_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.3 params
List the document paths in one repository's current published knowledge base. Every returned path can be passed straight to Get Knowledge Base Document.
repoNamespaceExternalIdstringrequiredRepository handle obtained from List Knowledge Bases.limitnumberoptionalMaximum number of results to return (1-100). Defaults to 20.offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.greptilmcp_list_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.2 params
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.
limitnumberoptionalMaximum number of results to return (1-100). Defaults to 20.offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.greptilmcp_list_merge_request_comments#Get all comments for a pull request or merge request, with optional filtering by generation source, addressed status, and date range.9 params
Get all comments for a pull request or merge request, with optional filtering by generation source, addressed status, and date range.
defaultBranchstringrequiredThe default branch of the repository.namestringrequiredThe repository name (e.g. owner/repo).prNumbernumberrequiredThe pull request or merge request number.remotestringrequiredThe git hosting provider: github, gitlab, azure, or bitbucket.addressedbooleanoptionalFilter by whether the comment has been addressed.createdAfterstringoptionalFilter comments created after this ISO 8601 datetime.createdBeforestringoptionalFilter comments created before this ISO 8601 datetime.greptileGeneratedbooleanoptionalFilter by whether the comment was generated by Greptile.remoteUrlstringoptionalThe remote URL of the repository.greptilmcp_list_merge_requests#List merge requests/PRs with optional filtering by repository, branch, author, and state.9 params
List merge requests/PRs with optional filtering by repository, branch, author, and state.
authorLoginstringoptionalFilter by the author's login username.defaultBranchstringoptionalFilter by the repository's default branch.limitnumberoptionalMaximum number of results to return (1-100). Defaults to 20.namestringoptionalFilter by repository name.offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.remotestringoptionalFilter by git hosting provider.remoteUrlstringoptionalFilter by the remote URL of the repository.sourceBranchstringoptionalFilter by the source branch of the merge request.statestringoptionalFilter by merge request state: open, closed, or merged.greptilmcp_list_pull_requests#List pull requests with optional filtering by repository, branch, author, and state. Alias for list_merge_requests.9 params
List pull requests with optional filtering by repository, branch, author, and state. Alias for list_merge_requests.
authorLoginstringoptionalFilter by the author's login username.defaultBranchstringoptionalFilter by the repository's default branch.limitnumberoptionalMaximum number of results to return (1-100). Defaults to 20.namestringoptionalFilter by repository name.offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.remotestringoptionalFilter by git hosting provider.remoteUrlstringoptionalFilter by the remote URL of the repository.sourceBranchstringoptionalFilter by the source branch of the pull request.statestringoptionalFilter by pull request state: open, closed, or merged.greptilmcp_search_custom_context#Search custom context by content using text search.3 params
Search custom context by content using text search.
querystringrequiredText query to search custom context content.limitnumberoptionalMaximum number of results to return (1-50). Defaults to 10.offsetnumberoptionalNumber of results to skip for pagination. Defaults to 0.greptilmcp_search_greptile_comments#Search Greptile review comments across all merge requests using text search.4 params
Search Greptile review comments across all merge requests using text search.
querystringrequiredText query to search Greptile review comments.createdAfterstringoptionalFilter comments created after this ISO 8601 datetime.includeAddressedbooleanoptionalWhether to include already-addressed comments in results. Defaults to false.limitnumberoptionalMaximum number of results to return (1-50). Defaults to 10.greptilmcp_search_knowledge_base#Case-insensitive substring search across one repository's knowledge base. Returns matching documents with line numbers and surrounding snippets.4 params
Case-insensitive substring search across one repository's knowledge base. Returns matching documents with line numbers and surrounding snippets.
querystringrequiredSubstring to search for (2-200 characters).repoNamespaceExternalIdstringrequiredRepository handle obtained from List Knowledge Bases.limitnumberoptionalMaximum number of results to return (1-50). Defaults to 10.sectionsarrayoptionalKnowledge base sections to search; defaults to 'docs' only.greptilmcp_trigger_code_review#Trigger a Greptile code review for a pull request. Supported on GitHub and GitLab only.6 params
Trigger a Greptile code review for a pull request. Supported on GitHub and GitLab only.
namestringrequiredThe repository name (e.g. owner/repo).prNumbernumberrequiredThe pull request number to trigger a code review for.remotestringrequiredThe git hosting provider. Only github and gitlab are supported.branchstringoptionalThe source branch of the pull request to review.defaultBranchstringoptionalThe default branch of the repository.remoteUrlstringoptionalThe remote URL of the repository.