Home / Servers / GitHub API / apps_scope_token

Create a scoped access token

An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.

Create a scoped access token Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify which repositories the token can access and which permissions are granted… [POST /applications/{client_id}/token/scoped]

Name on the gateway: github_api__apps_scope_token · may change things.

Parameters

NameTypeDescription
client_id requiredstringThe client ID of the GitHub app.
access_token requiredstringThe access token used to authenticate to the GitHub API.
targetstringThe name of the user or organization to scope the user access token to.…
target_idintegerThe ID of the user or organization to scope the user access token to.…
repositoriesarrayThe list of repository names to scope the user access token to. repositories…
repository_idsarrayThe list of repository IDs to scope the user access token to. repository_ids…
permissionsobjectThe permissions granted to the fine-grained access token.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "github_api__apps_scope_token",
  "arguments": {
    "client_id": "…",
    "access_token": "…"
  }
}

Or connect the GitHub API server directly, which lists 1,221 tools including this one:

Run in your terminal
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create a scoped access token tool with client_id set to ….

More from GitHub API