Home / Servers / GitHub API / codespaces_create_for_authenticated_user
Create a codespace for the authenticated user
An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.
Create a codespace for the authenticated user Creates a new codespace, owned by the authenticated user. This endpoint requires either a repository_id OR a pull_request but not both. OAuth app tokens and personal access tokens (classic) need the… [POST /user/codespaces]
Name on the gateway: github_api__codespaces_create_for_authenticated_user · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
repository_id required | integer | Repository id for this codespace |
ref | string | Git ref (typically a branch name) for this codespace |
location | string | The requested location for a new codespace. Best efforts are made to respect… |
geo | EuropeWest | SoutheastAsia | UsEast | UsWest | The geographic area for this codespace. If not specified, the value is… |
client_ip | string | IP for location auto-detection when proxying a request |
machine | string | Machine type to use for this codespace |
devcontainer_path | string | Path to devcontainer.json config to use for this codespace |
multi_repo_permissions_opt_out | boolean | Whether to authorize requested permissions from devcontainer.json |
working_directory | string | Working directory for this codespace |
idle_timeout_minutes | integer | Time in minutes before codespace stops from inactivity |
display_name | string | Display name for this codespace |
retention_period_minutes | integer | Duration in minutes after codespace has gone idle in which it will be deleted.… |
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:
{
"name": "github_api__codespaces_create_for_authenticated_user",
"arguments": {
"repository_id": 0
}
}Or connect the GitHub API server directly, which lists 1,221 tools including this one:
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 codespace for the authenticated user tool with repository_id set to ….