github-org-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@github-org-mcplist all members in the organization"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
github-org-mcp
A stateless HTTP MCP service that exposes GitHub organization member management (list / view / add / update role / remove members, and manage invitations) as Model Context Protocol (MCP) tools consumable by Claude and other MCP clients.
The OAuth flow is handled upstream — this service does not perform OAuth. The caller passes a GitHub OAuth access token and the org slug on each request via HTTP headers; the service maps the token to Authorization: Bearer <token> when calling the GitHub REST API.
Architecture
Stateless — no user state, no credential storage, no session data persisted between requests.
Concurrent-safe — per-request credential isolation via Python
contextvars; concurrent requests never bleed token/org.Dual auth modes — per-request credentials via HTTP headers (
gatewaymode, default, SOP-compliant) or single shared credentials (envmode, local dev only).Two transports — HTTP server (
MCP_TRANSPORT=http) for production, stdio (MCP_TRANSPORT=stdio) for local development.
Endpoints
Method | Path | Description |
POST |
| MCP protocol entry point |
GET |
| Health check |
Default port: 8080 (configurable via MCP_HTTP_PORT).
Authentication — HEADER Parameters
In gateway mode (default), every POST /mcp request must carry both headers below. Requests missing either header receive 401. Credentials are never stored globally or persisted; each request's token and org live only in a contextvars.ContextVar and are reset when the request completes.
Client → this service | this service → GitHub upstream |
|
|
| URL path segment |
Header | 类型 (Type) | 是否必填 (Required) | 默认值 (Default) | 枚举值 (Enum) | 字段描述 (Description) | Example |
| string | 必填 (Yes) | 无 (none) | 无 (none) | GitHub OAuth access token; mapped to |
|
| string | 必填 (Yes) | 无 (none) | 无 (none) | GitHub organization login/slug the tools operate on. |
|
The header names are configurable via
GITHUB_TOKEN_HEADER/GITHUB_ORG_HEADER.
Service Parameters
Variable | Required | Default | Description |
| No |
|
|
| No |
| HTTP header carrying the OAuth token in |
| No |
| HTTP header carrying the org slug in |
| env mode only | — | OAuth access token used in |
| env mode only | — | Org slug used in |
| No |
| GitHub REST API base URL (change for GitHub Enterprise Server) |
| No |
| Transport: |
| No |
| HTTP listen port |
| No |
| HTTP listen host |
Auth Modes
gateway mode (default, production, SOP-compliant):
Each request must include the
X-GitHub-TokenandX-GitHub-Orgheaders.No credentials are stored globally — isolated per request via Python
contextvars.Returns
401if either header is missing.
envmode (local dev only — not SOP-compliant for production):
Set
AUTH_MODE=env,GITHUB_TOKEN, andGITHUB_ORGin the environment or.env.All requests share the same credentials loaded at startup — violates per-request credential isolation.
Do not use in production or multi-tenant deployments.
Tool List
All tools follow the naming convention github_<action>_<resource> and operate on the org resolved from the request context (X-GitHub-Org).
Tool | Description | Parameters |
| List members of the organization |
|
| Get a user's membership role and state |
|
| Add a user to the org or update their role (invites if not a member) |
|
| Remove a user from the org (also removes from all teams) |
|
| List pending member invitations |
|
| Invite a user by user ID or email |
|
| Cancel a pending invitation |
|
The token's OAuth scopes / org permissions determine which operations succeed. Write operations (
set/remove/create/cancel) require the token to belong to an org owner or an app with the appropriate org-members permission.
Quick Start
Local development (stdio)
cp .env.example .env
# Edit .env: set GITHUB_TOKEN, GITHUB_ORG, AUTH_MODE=env, MCP_TRANSPORT=stdio
uv sync
python -m github_org_mcpHTTP server (gateway mode — default, SOP-compliant)
MCP_TRANSPORT=http python -m github_org_mcp
# Pass credentials per-request via X-GitHub-Token and X-GitHub-Org headersDocker
docker compose up --buildTest Examples
Health check
curl http://localhost:8080/healthExpected response:
{"status": "ok", "transport": "http", "auth_mode": "gateway"}Missing headers → 401 (gateway mode)
curl -i -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# → HTTP/1.1 401, body includes "required_headers": ["X-GitHub-Token", "X-GitHub-Org"]List MCP tools
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-GitHub-Token: your_oauth_access_token" \
-H "X-GitHub-Org: my-company" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Call a tool — list org members
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-GitHub-Token: your_oauth_access_token" \
-H "X-GitHub-Org: my-company" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "github_list_org_members",
"arguments": {"role": "all", "per_page": 30, "page": 1}
}
}'Call a tool — invite a user by email
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-GitHub-Token: your_oauth_access_token" \
-H "X-GitHub-Org: my-company" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "github_create_org_invitation",
"arguments": {"email": "newhire@example.com", "role": "direct_member"}
}
}'Security
Credentials are never stored globally or persisted between requests.
Each request's token and org are isolated in
contextvars.ContextVarand reset after the request completes.The service runs as a non-root user (
github, uid 1001) inside the container.Never commit real tokens or org secrets —
.gitignoreexcludes.env.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MSPbotsAI/github-org-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server