GitHub connector
The GitHub data source connects to GitHub through the GitHub MCP server. It provides search across code, repositories, issues, pull requests, and users. It also provides access to commits, branches, tags, releases, teams, and file contents. It supports two authentication methods: Bearer token (personal access token) and OAuth Authorization Code.
You can create connectors in Stack Management > Connectors.
GitHub connectors have the following configuration properties:
- MCP Server URL
- The URL of the GitHub MCP server. Defaults to
https://api.githubcopilot.com/mcp/. - Authentication
-
Choose one of the following authentication methods:
- Bearer Token: A GitHub personal access token. Refer to Get API credentials for instructions.
- OAuth Authorization Code: Connects via GitHub's OAuth flow. Requires a GitHub OAuth App with an authorization URL (
https://github.com/login/oauth/authorize) and token URL (https://github.com/login/oauth/access_token). The default scope isrepo. Refer to OAuth credentials for setup instructions.
You can test connectors when you create or edit the connector in Kibana.
The GitHub connector exposes the following actions:
getMe- Get the authenticated GitHub user's profile information.
searchCode- Search for code across GitHub repositories.
searchRepositories- Search for GitHub repositories.
searchIssues- Search for issues across GitHub repositories.
searchPullRequests- Search for pull requests across GitHub repositories.
searchUsers- Search for GitHub users.
listIssues- List issues in a repository. Uses cursor-based pagination.
listPullRequests- List pull requests in a repository. Uses cursor-based pagination.
listCommits- List commits in a repository. Uses cursor-based pagination.
listBranches- List branches in a repository. Uses cursor-based pagination.
listTags- List tags in a repository. Uses cursor-based pagination.
listReleases- List releases in a repository. Uses cursor-based pagination.
getCommit- Get details of a specific commit.
getLatestRelease- Get the latest release for a repository.
pullRequestRead- Read the details of a specific pull request.
getFileContents- Get the contents of a file or directory from a GitHub repository.
getIssue- Get details of a specific issue in a repository.
getIssueComments- Get comments for a specific issue in a repository.
createIssue- Create a new issue in a repository.
addIssueComment- Add a comment to an existing issue or pull request.
updateIssue- Update an existing issue (title, body, state, assignees, labels, or milestone). To close an issue, set state to
closed. addLabels- Add one or more labels to an issue or pull request without removing existing ones.
addAssignee- Add one or more assignees to an issue or pull request without removing existing ones.
createPullRequest- Create a new pull request. The head branch must already exist and have commits not in the base branch.
updatePullRequest- Update an open pull request (title, body, state, base branch, or maintainer permissions). To close a PR, set state to
closed. mergePullRequest- Merge an open pull request. Fails if the PR is not mergeable.
requestReviewers- Request one or more reviewers (individuals or teams) on a pull request without removing existing requests.
createBranch- Create a new branch (git ref) in a repository.
createOrUpdateFile- Create or update a single file in a repository. The content must be Base64-encoded. To update an existing file, provide the current file blob SHA (retrieved via
getFileContents). triggerWorkflow- Trigger a
workflow_dispatchevent for a GitHub Actions workflow. The workflow must have aworkflow_dispatchtrigger defined in its YAML. listTools- List all tools available on the GitHub MCP server. Use this to discover available capabilities.
callTool- Call any tool on the GitHub MCP server directly by name. Use this as an escape hatch when a specific tool is not yet exposed as a named action.
Use the Action configuration settings to customize connector networking, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use xpack.actions.customHostSettings to set per-host configurations.
To use the GitHub connector with a personal access token:
- Log in to GitHub.
- Go to Settings > Developer settings > Personal access tokens > Fine-grained tokens (or create one directly).
- Select Generate new token.
- Configure the token:
- Set a descriptive name (for example, "Kibana data source").
- Select an expiration period.
- Select the repositories you want to grant access to.
- Under Permissions, grant the access levels the connector requires:
- Read-only actions (search, list, get): grant read access to Contents, Issues, Pull requests, and Metadata.
- Write actions (createIssue, addIssueComment, updateIssue, createPullRequest, updatePullRequest, mergePullRequest, addLabels, addAssignee, requestReviewers, createBranch, createOrUpdateFile, triggerWorkflow): grant read and write access to Contents, Issues, and Pull requests. For
triggerWorkflow, also grant read and write access to Actions. - Metadata read access is always required.
- Select Generate token.
- Copy the token and store it securely. Use this value as the Bearer Token when configuring the GitHub connector in Kibana.
Classic personal access tokens also work. When using a classic token, select the repo scope for full repository access, or public_repo for public repositories only.
To use the GitHub connector with OAuth:
- Log in to GitHub.
- Go to Settings > Developer settings > OAuth Apps > New OAuth App (or create one directly).
- Configure the application:
- Set a descriptive name (for example, "Kibana GitHub Connector").
- Set the Authorization callback URL to your Kibana OAuth redirect URI.
- After creating the app, copy the Client ID and generate a Client Secret.
- In Kibana, select OAuth Authorization Code as the authentication method and enter the Client ID and Client Secret.