-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add a Remote MCP configuration example that employs a PAT #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a configuration example for using a GitHub Personal Access Token when connecting to a remote MCP server.
- Adjusted heading levels for the Remote and Local GitHub MCP Server sections.
- Introduced an HTML table comparing OAuth and PAT-based JSON configs.
- Added an
inputs
prompt block for capturing the PAT in the PAT example.
Comments suppressed due to low confidence (4)
README.md:15
- [nitpick] Heading level was bumped to H1 here, which is inconsistent with other sections using
##
. Consider reverting to## Remote GitHub MCP Server
.
# Remote GitHub MCP Server
README.md:92
- [nitpick] Similarly, this heading is H1 but other sections use H2. For consistency, use
## Local GitHub MCP Server
.
# Local GitHub MCP Server
README.md:46
- Missing comma after the "url" property, causing invalid JSON.
"url": "https://api.githubcopilot.com/mcp/"
README.md:64
- Remove the trailing comma in the "headers" object to ensure valid JSON.
"Authorization": "Bearer ${input:github_mcp_pat}",
README.md
Outdated
"mcpServers": { | ||
"github": { | ||
"url": "https://api.githubcopilot.com/mcp/", | ||
"authorization_token": "<your GitHub PAT>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Claude docs, I don't see a way to prompt or otherwise read the PAT dynamically (e.g. from an environment variable). As far as I can tell, it has to be pasted into the JSON as plain text.
Please correct me if I'm wrong!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you are correct
README.md
Outdated
"mcpServers": { | ||
"github": { | ||
"url": "https://api.githubcopilot.com/mcp/", | ||
"authorization_token": "<your GitHub PAT>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"authorization_token": "<your GitHub PAT>" | |
"authorization_token": "bearer <your GitHub PAT>" |
Technically it needs that. Claude code adds it automatically apparently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm ... none of their examples include Bearer
and this wasn't even meant to be Claude-specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see disclaimer below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Their tools add it automatically but it still works with it included and I'm worried about other clients doing it wrong. I confirmed that with Anthropic yesterday.
Claude may not yet support GitHub OAuth fully.
Finally got this working with Cursor, though it took more guesswork than I'd like to admit. Initially thought about filing an issue for adding host-specific setup instructions, but you're right—the responsibility should be on each client to properly document their configuration requirements. Anthropic does it a bit better than Cursor where they don't even mention it. But FWIW in case anybody else asks, this is how to set it up for Cursor.
|
Hi @jww3, thanks for this! Any tips for setting up with claude code, using the cli? I like how HF gives all flavors of clients. Happy to submit a PR, with guidance. Thanks! :) |
Either of these should work:
(fwiw it works even if you drop the |
Hi @jaril , thank you! I had tried before, but my PAT wasn't setup correctly previously. 🫠 With minor changes to the flags in your command (single dash for abbreviations), I got it to work, like this: claude mcp add -t http github https://api.githubcopilot.com/mcp/ -H "Authorization: Bearer YOUR_GITHUB_TOKEN" Or, if you use 1password for secrets management (there are dozens!) claude mcp add -t http github https://api.githubcopilot.com/mcp/ -H "Authorization: Bearer $(op read "op://Private/<YOUR-SECRET-REFERENCE>")" which felt nice. :) Also, for a starting working model for auth perms for claude code for those just getting started, I went with this (✅ granted, and ❌ no):
|
No description provided.