> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to the Greptile MCP server

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.

**Authentication:** OAuth2.1/DCR
**Categories:** Developer Tools, Search, AI
**Tools:** 16: 14 read, 2 write, 0 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Vendor MCP
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=GREPTILMCP)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Greptile MCP connection

   In **AgentKit > Connections**, create a Greptile MCP connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for Greptile MCP server, so you don't need to register an OAuth app.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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.actions

   const connector = 'greptilmcp'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { 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 call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'greptilmcp_list_code_reviews',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_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.actions

   connection_name = "greptilmcp"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_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 call
   result = actions.execute_tool(
       tool_input={},
       tool_name="greptilmcp_list_code_reviews",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'greptilmcp_get_code_review',
  toolInput: {
    codeReviewId: '<codeReviewId>',
  },
  connector: 'greptilmcp',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="greptilmcp_get_code_review",
    tool_input={
        "codeReviewId": "<codeReviewId>",
    },
    connection_name="greptilmcp",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `greptilmcp_get_code_review`

Get Code Review · Read-only

Get detailed code review information including status, comments, and analysis results.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `codeReviewId` (`string`, required): The unique identifier of the code review to retrieve.

Example input: `{"codeReviewId":"<codeReviewId>"}`

### `greptilmcp_get_custom_context`

Get Custom Context · Read-only

Get detailed custom context information including evidence and linked comments.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `customContextId` (`string`, required): The unique identifier of the custom context to retrieve.

Example input: `{"customContextId":"<customContextId>"}`

### `greptilmcp_get_knowledge_base_document`

Get Knowledge Base Document · Read-only

Get the markdown body of a single knowledge base document. Returns the content plus the section and versionId it was read from.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `path` (`string`, required): Document path obtained from List Knowledge Base Documents.
- `repoNamespaceExternalId` (`string`, required): Repository handle obtained from List Knowledge Bases.

Example input: `{"path":"<path>","repoNamespaceExternalId":"<repoNamespaceExternalId>"}`

### `greptilmcp_get_merge_request`

Get Merge Request · Read-only

Get detailed merge request information including metadata, statistics, Greptile comments, and review analysis.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `defaultBranch` (`string`, required): The default branch of the repository.
- `name` (`string`, required): The repository name (e.g. owner/repo).
- `prNumber` (`number`, required): The pull request or merge request number.
- `remote` (`string`, required): The git hosting provider: github, gitlab, azure, or bitbucket. One of: `github`, `gitlab`, `azure`, `bitbucket`.
- `remoteUrl` (`string`, optional): The remote URL of the repository.

Example input: `{"defaultBranch":"<defaultBranch>","name":"<name>","prNumber":1,"remote":"github"}`

### `greptilmcp_list_code_reviews`

List Code Reviews · Read-only

List code reviews with optional filtering by repository, PR number, and review status.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `defaultBranch` (`string`, optional): Filter by the repository's default branch.
- `limit` (`number`, optional): Maximum number of results to return (1-100). Defaults to 20. Default: `20`.
- `name` (`string`, optional): Filter by repository name (e.g. owner/repo).
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.
- `prNumber` (`number`, optional): Filter by pull request number.
- `remote` (`string`, optional): Filter by git hosting provider. One of: `github`, `gitlab`, `azure`, `bitbucket`.
- `remoteUrl` (`string`, optional): Filter by the remote URL of the repository.
- `status` (`string`, optional): Filter by code review status. One of: `PENDING`, `REVIEWING_FILES`, `GENERATING_SUMMARY`, `COMPLETED`, `FAILED`, `SKIPPED`.

Example input: `{}`

### `greptilmcp_list_custom_context`

List Custom Context · Read-only

List organization custom context with optional filtering by type and generation source.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `greptileGenerated` (`boolean`, optional): Filter by whether the context was generated by Greptile.
- `limit` (`number`, optional): Maximum number of results to return (1-100). Defaults to 20. Default: `20`.
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.
- `type` (`string`, optional): Filter by context type: CUSTOM_INSTRUCTION or PATTERN. One of: `CUSTOM_INSTRUCTION`, `PATTERN`.

Example input: `{}`

### `greptilmcp_list_knowledge_base_documents`

List Knowledge Base Documents · Read-only

List the document paths in one repository's current published knowledge base. Every returned path can be passed straight to Get Knowledge Base Document.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `repoNamespaceExternalId` (`string`, required): Repository handle obtained from List Knowledge Bases.
- `limit` (`number`, optional): Maximum number of results to return (1-100). Defaults to 20. Default: `20`.
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.

Example input: `{"repoNamespaceExternalId":"<repoNamespaceExternalId>"}`

### `greptilmcp_list_knowledge_bases`

List Knowledge Bases · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`number`, optional): Maximum number of results to return (1-100). Defaults to 20. Default: `20`.
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.

Example input: `{}`

### `greptilmcp_list_merge_request_comments`

List Merge Request Comments · Read-only

Get all comments for a pull request or merge request, with optional filtering by generation source, addressed status, and date range.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `defaultBranch` (`string`, required): The default branch of the repository.
- `name` (`string`, required): The repository name (e.g. owner/repo).
- `prNumber` (`number`, required): The pull request or merge request number.
- `remote` (`string`, required): The git hosting provider: github, gitlab, azure, or bitbucket. One of: `github`, `gitlab`, `azure`, `bitbucket`.
- `addressed` (`boolean`, optional): Filter by whether the comment has been addressed.
- `createdAfter` (`string`, optional): Filter comments created after this ISO 8601 datetime.
- `createdBefore` (`string`, optional): Filter comments created before this ISO 8601 datetime.
- `greptileGenerated` (`boolean`, optional): Filter by whether the comment was generated by Greptile.
- `remoteUrl` (`string`, optional): The remote URL of the repository.

Example input: `{"defaultBranch":"<defaultBranch>","name":"<name>","prNumber":1,"remote":"github"}`

### `greptilmcp_list_merge_requests`

List Merge Requests · Read-only

List merge requests/PRs with optional filtering by repository, branch, author, and state.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `authorLogin` (`string`, optional): Filter by the author's login username.
- `defaultBranch` (`string`, optional): Filter by the repository's default branch.
- `limit` (`number`, optional): Maximum number of results to return (1-100). Defaults to 20. Default: `20`.
- `name` (`string`, optional): Filter by repository name.
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.
- `remote` (`string`, optional): Filter by git hosting provider. One of: `github`, `gitlab`, `azure`, `bitbucket`.
- `remoteUrl` (`string`, optional): Filter by the remote URL of the repository.
- `sourceBranch` (`string`, optional): Filter by the source branch of the merge request.
- `state` (`string`, optional): Filter by merge request state: open, closed, or merged. One of: `open`, `closed`, `merged`.

Example input: `{}`

### `greptilmcp_list_pull_requests`

List Pull Requests · Read-only

List pull requests with optional filtering by repository, branch, author, and state. Alias for list_merge_requests.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `authorLogin` (`string`, optional): Filter by the author's login username.
- `defaultBranch` (`string`, optional): Filter by the repository's default branch.
- `limit` (`number`, optional): Maximum number of results to return (1-100). Defaults to 20. Default: `20`.
- `name` (`string`, optional): Filter by repository name.
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.
- `remote` (`string`, optional): Filter by git hosting provider. One of: `github`, `gitlab`, `azure`, `bitbucket`.
- `remoteUrl` (`string`, optional): Filter by the remote URL of the repository.
- `sourceBranch` (`string`, optional): Filter by the source branch of the pull request.
- `state` (`string`, optional): Filter by pull request state: open, closed, or merged. One of: `open`, `closed`, `merged`.

Example input: `{}`

### `greptilmcp_search_custom_context`

Search Custom Context · Read-only

Search custom context by content using text search.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Text query to search custom context content.
- `limit` (`number`, optional): Maximum number of results to return (1-50). Defaults to 10. Default: `10`.
- `offset` (`number`, optional): Number of results to skip for pagination. Defaults to 0. Default: `0`.

Example input: `{"query":"<query>"}`

### `greptilmcp_search_greptile_comments`

Search Greptile Comments · Read-only

Search Greptile review comments across all merge requests using text search.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Text query to search Greptile review comments.
- `createdAfter` (`string`, optional): Filter comments created after this ISO 8601 datetime.
- `includeAddressed` (`boolean`, optional): Whether to include already-addressed comments in results. Defaults to false. Default: `false`.
- `limit` (`number`, optional): Maximum number of results to return (1-50). Defaults to 10. Default: `10`.

Example input: `{"query":"<query>"}`

### `greptilmcp_search_knowledge_base`

Search Knowledge Base · Read-only

Case-insensitive substring search across one repository's knowledge base. Returns matching documents with line numbers and surrounding snippets.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Substring to search for (2-200 characters).
- `repoNamespaceExternalId` (`string`, required): Repository handle obtained from List Knowledge Bases.
- `limit` (`number`, optional): Maximum number of results to return (1-50). Defaults to 10. Default: `10`.
- `sections` (`array`, optional): Knowledge base sections to search; defaults to 'docs' only.

Example input: `{"query":"<query>","repoNamespaceExternalId":"<repoNamespaceExternalId>"}`

### `greptilmcp_create_custom_context`

Create Custom Context · Write

Create a new custom context for an organization to guide Greptile's code review behavior.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `body` (`string`, optional): The content of the custom context instruction or pattern.
- `metadata` (`object`, optional): Additional metadata to associate with the custom context.
- `scopes` (`object`, optional): Scope configuration for where this custom context applies.
- `status` (`string`, optional): The initial status of the custom context: ACTIVE, INACTIVE, or SUGGESTED. Defaults to ACTIVE. One of: `ACTIVE`, `INACTIVE`, `SUGGESTED`. Default: `ACTIVE`.
- `type` (`string`, optional): The type of custom context: CUSTOM_INSTRUCTION or PATTERN. Defaults to CUSTOM_INSTRUCTION. One of: `CUSTOM_INSTRUCTION`, `PATTERN`. Default: `CUSTOM_INSTRUCTION`.

Example input: `{}`

### `greptilmcp_trigger_code_review`

Trigger Code Review · Write

Trigger a Greptile code review for a pull request. Supported on GitHub and GitLab only.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): The repository name (e.g. owner/repo).
- `prNumber` (`number`, required): The pull request number to trigger a code review for.
- `remote` (`string`, required): The git hosting provider. Only github and gitlab are supported. One of: `github`, `gitlab`.
- `branch` (`string`, optional): The source branch of the pull request to review.
- `defaultBranch` (`string`, optional): The default branch of the repository.
- `remoteUrl` (`string`, optional): The remote URL of the repository.

Example input: `{"name":"<name>","prNumber":1,"remote":"github"}`

## Related

Other Developer Tools connectors ([all 131](/agentkit/connectors/?category=developer-tools)):

- [GitHub](/agentkit/connectors/github/): Scalekit connector, OAuth, 217 tools
- [Microsoft Entra ID](/agentkit/connectors/microsoftentraid/): Scalekit connector, OAuth, 82 tools
- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
