Skip to content

Unable to connect to GitHub MCP Server from within OpenCode #1396

@ThomasCode92

Description

@ThomasCode92

I'm trying to connect OpenCode to the GitHub MCP Server, but it appears the AI has no access to any GitHub-related tools.

🧱 Current Configuration

{
  "$schema": "https://opencode.ai/config.json",
  "instructions": [],
  "mcp": {
    "context7": {
      "type": "remote",
      "enabled": true,
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
      }
    },
    "github": {
      "type": "remote",
      "enabled": true,
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${env:GITHUB_MCP_PATH}"
      }
    }
  }
}

✅ What Works

  • The Context7 MCP connection works correctly.
    • Confirmed that environment variable injection ({env:CONTEXT7_API_KEY}) is functioning.

❌ What Doesn’t Work

  • The GitHub MCP connection doesn’t seem to initialize.
  • The AI has no access to any GitHub-related tools.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions