Home / Servers / GitHub API / users_create_public_ssh_key_for_authenticated_user

Create a public SSH key for the authenticated user

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

Create a public SSH key for the authenticated user Adds a public SSH key to the authenticated user's GitHub account. OAuth app tokens and personal access tokens (classic) need the write:public_key scope to use this endpoint. [POST /user/keys]

Name on the gateway: github_api__users_create_public_ssh_key_for_authenticated_user · may change things.

Parameters

NameTypeDescription
titlestringA descriptive name for the new key.
key requiredstringThe public SSH key to add to your GitHub account.

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__users_create_public_ssh_key_for_authenticated_user",
  "arguments": {
    "key": "…"
  }
}

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 public ssh key for the authenticated user tool with title set to ….

More from GitHub API