Home / Servers / GitHub API / codespaces_publish_for_authenticated_user

Create a repository from an unpublished codespace

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

Create a repository from an unpublished codespace Publishes an unpublished codespace, creating a new repository and assigning it to the codespace. The codespace's token is granted write permissions to the repository, allowing the user to push their… [POST /user/codespaces/{codespace_name}/publish]

Name on the gateway: github_api__codespaces_publish_for_authenticated_user · may change things.

Parameters

NameTypeDescription
codespace_name requiredstringThe name of the codespace.
namestringA name for the new repository.
privatebooleanWhether the new repository should be private.

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_publish_for_authenticated_user",
  "arguments": {
    "codespace_name": "…"
  }
}

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 repository from an unpublished codespace tool with codespace_name set to ….

More from GitHub API