Home / Servers / GitHub API / codespaces_set_repositories_for_secret_for_authenticated_use

Set selected repositories for a user secret

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

Set selected repositories for a user secret Select the repositories that will use a user's development environment secret. The authenticated user must have Codespaces access to use this endpoint. OAuth app tokens and personal access tokens… [PUT /user/codespaces/secrets/{secret_name}/repositories]

Name on the gateway: github_api__codespaces_set_repositories_for_secret_for_authenticated_use · may change things.

Parameters

NameTypeDescription
secret_name requiredstringThe name of the secret.
selected_repository_ids requiredarrayAn array of repository ids for which a codespace can access the secret. You…

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__codespaces_set_repositories_for_secret_for_authenticated_use",
  "arguments": {
    "secret_name": "…",
    "selected_repository_ids": []
  }
}

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 set selected repositories for a user secret tool with secret_name set to ….

More from GitHub API