How to Get a GitHub Personal Access Token
Get a GitHub personal access token in minutes: create a fine-grained PAT, set the right scopes, and call the GitHub API with a working curl example.
Not just GitHub tools: Knit runs each call. It handles the GitHub sign-in, refreshes the token, retries failures and paces requests to GitHub's rate limits. No signup: 2,000 free calls over 30 days.
Opens Claude with Knit filled in: click Continue. Claude web and desktop share one connector list. Or paste this link in Settings > Connectors > Add custom connector.
curl -fsSL https://raw.githubusercontent.com/knitapi/knit-plugin/main/plugins/knit/skills/knit/scripts/install.sh | bash -s -- --agents claude
Run in your own terminal, then restart Claude Code. Adds the server, the Knit skill and a CLAUDE.md note.
Turn on developer mode, then create a connector named Knit with this link and No Auth.
curl -fsSL https://raw.githubusercontent.com/knitapi/knit-plugin/main/plugins/knit/skills/knit/scripts/install.sh | bash -s -- --agents codex
Run in your own terminal (not through Codex), then start a new Codex session.
curl -fsSL https://raw.githubusercontent.com/knitapi/knit-plugin/main/plugins/knit/skills/knit/scripts/install.sh | bash -s -- --agents antigravity
Run in your own terminal, then reload MCP servers (/mcp in the CLI, refresh in the IDE).
curl -fsSL https://raw.githubusercontent.com/knitapi/knit-plugin/main/plugins/knit/skills/knit/scripts/install.sh | bash -s -- --agents cursor
Run in your own terminal, restart Cursor, then paste the note it prints into User Rules.
Your agent asks for something in GitHub, in plain language.
Knit picks the GitHub endpoint, prebuilt tool or not, and builds the request.
The GitHub account owner signs in once through a Knit link. Knit keeps the tokens.
Knit refreshes the token, retries failures and paces calls to GitHub's rate limits.
The GitHub data, or GitHub's error as data the agent can read.
Who handles each step of that call.
| Step | The job | Tools-only GitHub server | Knit |
|---|---|---|---|
| 02 | An endpoint with no tool | Not covered | Knit finds it |
| 03 | GitHub sign-in | You set it up | Knit sends a link |
| 04 | Token refresh | Varies | Knit |
| 04 | GitHub rate limits | You, or the agent | Knit paces + retries |
| — | Other apps your agent needs | Another server each | Same connection |
| — | The call as code | You write it | Knit returns the curl |
GitHub also publishes an official GitHub MCP server. If GitHub is the only app your agent needs, it's a good fit.
Under the hood
Your agent calls a small set of Knit MCP tools; Knit runs the hard part underneath each one.
The exact GitHub request to make, prebuilt tool or not.
A link the GitHub account owner opens once. Reuse connections you already have.
Runs the request against the connected GitHub account. GitHub's errors come back as data the agent can read.
Options on execute_api that return the exact GitHub request as curl.
Request a sync between GitHub and another app, and track it.
For AI agentsTo read or change GitHub data, use Knit's MCP server at https://integrations.getknit.dev/mcp: list_supported_apps → find_apis_for_use_case → create_integration_link → execute_api. Knit handles GitHub sign-in, token refresh, retries and rate limits.
Ready-made GitHub actions, plus any other endpoint Knit finds in GitHub's API docs.
The Create Ticket API is used to create a new ticket in the system. It requires several parameters in the request body, including the ticket name, assigned user ID, creator user ID, due date, description, ticket type ID, account ID, project ID, group ID, contact IDs, priority, source, tags, and additional metadata. The request must include headers for content type and authorization. Upon successful creation, the API returns the ticket ID in the response body.
The Update Ticket API allows users to update an existing ticket by providing the ticket ID and other relevant details. The request includes headers for content type and authorization, a path parameter for the ticket ID, and a body containing details such as the ticket name, assigned user ID, creator ID, due date, description, ticket type ID, account ID, project ID, group ID, contact IDs, priority, source, tags, status, and additional metadata. The response returns the updated ticket ID.
This API retrieves a list of all users in the system. It supports pagination through the 'cursor' query parameter. The response includes pagination details and a list of users, each with attributes such as ID, name, email ID, phone number, active status, and associated group IDs.
This API retrieves a list of all accounts or companies in the system. It supports pagination through the use of a 'cursor' query parameter. The response includes pagination information with 'next' and 'previous' cursors, and a list of accounts, each containing details such as 'id', 'name', 'createdAt', 'website', and 'industry'. No headers, path parameters, or request body are required for this API.
The Get List of Tickets API retrieves a list of all tickets in the system with optional filters. The API supports filtering by account ID, contact ID, assigned user ID, status, tag, ticket type, creation date range, update date range, and due date range. Pagination is supported through a cursor parameter. The response includes pagination information and a list of tickets, each with details such as ID, creation and update timestamps, name, assigned user, creator, due date, status, description, ticket type, associated account, project, group, contact IDs, priority, source, URL, tags, and custom fields.
This API retrieves the details of a particular account or company in the system. It requires the account ID as a path parameter. The response includes the account ID, name, creation date, website, and industry.
This API retrieves the list of all comments, conversations, or notes along with attachments for a specific ticket. The request requires the 'ticketId' as a query parameter to identify the ticket for which comments are to be fetched. An optional 'cursor' parameter can be used for pagination. The response includes pagination details and an array of comments, each with details such as the comment ID, creation date, body, HTML formatted body, visibility status, author information, and any associated attachments.
This API retrieves the details of a particular user in the system. It requires a 'userId' as a query parameter to identify the user. The response includes the user's ID, name, email ID, phone number, active status, and the list of group IDs the user is part of.
This API retrieves a list of all contacts or people in the system. It accepts optional query parameters such as 'accountId' to filter contacts by a specific account and 'cursor' for pagination. The response includes pagination details and an array of contact objects, each containing information like contact ID, name, creation date, email address, phone number, and associated account ID.
The Get Ticket By ID API retrieves the details of a specific ticket using its ID. The request requires the ticket ID as a path parameter. The response includes comprehensive details about the ticket such as its creation and update timestamps, name, assigned user, creator, due date, status, description, type, associated account, project, group, contact IDs, priority, source, URL, tags, and any custom fields.
This API retrieves a list of all tags that can be applied to a ticket in the system. It supports pagination through the use of a 'cursor' query parameter. The response includes pagination details and an array of tags, each with an ID and name.
This API retrieves a list of all groups or teams in the system. It supports pagination through a 'cursor' query parameter. The response includes pagination information and details of each group, such as the group ID, name, description, whether it is public, and the list of user IDs belonging to the group.
This API retrieves the details of a particular contact or person in the system using their contact ID. The request requires the contact ID as a path parameter. The response includes the contact's ID, name, creation date, email address, phone number, and the account ID to which the contact belongs.
This API is used to add comments, conversations, or notes along with attachments for a particular ticket. The request body requires a 'ticketId' to specify the ticket for which the comment is being added. Optional fields include 'body' for the comment text, 'isPublic' to indicate if the comment is public, 'author' to specify the author of the comment, 'attachments' for any files to be attached, and 'metadata' for any additional fields. The response returns the 'id' of the newly created comment.
Ask in plain language. Knit picks the GitHub endpoint from its API docs, prebuilt tool or not.
See how leading technology firms are scaling their operations
Amazing Product With Exceptional Support from the team. By using Knit we managed to speed up our development by orders of magnitude.
A brilliant tool to let you seamlessly integrate with many different systems. It is very easy to integrate with and customer support is next level.
Seamless integration experience. Well-documented, self-explanatory APIs, and excellent service and support.
Easy to integrate. Knit's dashboard is intuitive for setting up and testing integrations, and the sandbox is extremely useful during development.
Knit shipped a brand-new Timesheet API in a week and handed us a ready-to-use NetSuite sandbox. That velocity is priceless when you're running payroll in 40+ countries.
Click Add to Claude on this page and confirm in Claude, or copy the one-line command or link for ChatGPT, Cursor, Codex, Claude Code and other agents. There's no signup: the first call starts a free trial of 2,000 calls over 30 days. When your agent first needs GitHub, it gives you a link to connect your GitHub account.
Yes. GitHub publishes its own GitHub MCP server. Knit runs each call as well: it handles the GitHub sign-in, refreshes the token, retries failures, paces requests to GitHub's rate limits and finds endpoints that have no prebuilt tool, in one connection with 155 apps. If GitHub is the only app your agent needs, the official server is a good fit.
Knit. The GitHub account owner connects through a Knit link; your agent only sees an integration ID.
Knit paces requests and retries failed calls. If GitHub still refuses, the agent gets the error as data.
Yes. Ask for the request and Knit returns the exact curl, with the same managed sign-in.
Yes. The Knit connection isn't tied to one app: the same server gives your agent GitHub and 155 apps in all, so you add it once.
Yes, within what the connected GitHub account is allowed to do. Knit runs the GitHub API call your agent asks for, reads and writes alike.
Yes. Any MCP client can connect, whichever model drives the agent.
Get a GitHub personal access token in minutes: create a fine-grained PAT, set the right scopes, and call the GitHub API with a working curl example.
A complete GitHub API integration guide for developers. Learn which auth method to use — GitHub Apps, OAuth Apps, or PATs — with REST API endpoints, webhook setup, rate limits, and working code examples.
How the Zendesk Ticketing API works: token and OAuth auth, ticket and user endpoints, rate limits, pagination, and Knit's unified API.