Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jww3 merged 10 commits intomainfromjww3-patch-1
Jun 13, 2025

Conversation

jww3
Copy link
Contributor

No description provided.

@CopilotCopilotAI review requested due to automatic review settingsJune 13, 2025 14:16
@jww3jww3 requested a review froma team as acode ownerJune 13, 2025 14:16
Copy link
Contributor

@CopilotCopilotAI left a 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 aninputs 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>"
Copy link
ContributorAuthor

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!

SamMorrowDrums and LuluBeatson reacted with thumbs up emoji
Copy link
Collaborator

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

jww3 reacted with thumbs up emoji
README.md Outdated
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"authorization_token": "<your GitHub PAT>"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
"authorization_token": "<your GitHub PAT>"
"authorization_token": "bearer<your GitHub PAT>"

Technically it needs that. Claude code adds it automatically apparently.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hmmm ... none oftheir examples includeBearer and this wasn't even meant to be Claude-specific.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(see disclaimer below)

Copy link
Collaborator

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.

@jww3jww3 merged commite9926b9 intomainJun 13, 2025
16 checks passed
@jww3jww3 deleted the jww3-patch-1 branchJune 13, 2025 18:47
@jaril
Copy link
Contributor

jaril commentedJun 13, 2025
edited
Loading

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 thanCursor where they don't even mention it.

But FWIW in case anybody else asks, this is how to set it up for Cursor.

{  "mcpServers": {    "github-remote": {      "url": "https://api.githubcopilot.com/mcp/",      "headers": {        "Authorization": "Bearer YOUR_GITHUB_TOKEN_HERE"      }    },  }}

@nehalecky
Copy link

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! :)
https://huggingface.co/settings/mcp

@jaril
Copy link
Contributor

jaril commentedJun 17, 2025
edited
Loading

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! :)https://huggingface.co/settings/mcp

Either of these should work:

claude mcp add --t http github https://api.githubcopilot.com/mcp/ --H "Authorization: Bearer YOUR_GITHUB_TOKEN"
claude mcp add-json github '{"type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": {"Authorization": "Bearer YOUR_GITHUB_TOKEN"

(fwiw it works even if you drop theBearer part)

nehalecky reacted with eyes emoji

@nehalecky
Copy link

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$(opread"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):

  • ✅ Write, review, and manage code
  • ✅ Create/manage issues and PRs
  • ✅ Automate workflows
  • ✅ Coordinate team activities
  • ❌ Destructive operations
  • ❌ Security compromises
  • ❌ Unnecessary access to sensitive data

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@omgitsadsomgitsadsomgitsads left review comments

Copilot code reviewCopilotCopilot left review comments

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@jww3@jaril@nehalecky@omgitsads@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp