Skip to content

Commit 5384e23

Browse files
committed
Add Streamable HTTP documentation
1 parent aa30220 commit 5384e23

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

docs/streamable-http.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Streamable HTTP Server
2+
3+
The Streamable HTTP mode enables the GitHub MCP Server to run as an HTTP service, allowing clients to connect via standard HTTP protocols. This mode is ideal for deployment scenarios where stdio transport isn't suitable, such as reverse proxy setups, containerized environments, or distributed architectures.
4+
5+
## Features
6+
7+
- **Streamable HTTP Transport** — Full HTTP server with streaming support for real-time tool responses
8+
- **OAuth Metadata Endpoints** — Standard `.well-known/oauth-protected-resource` discovery for OAuth clients
9+
- **Scope Challenge Support** — Automatic scope validation with proper HTTP 403 responses and `WWW-Authenticate` headers
10+
- **Scope Filtering** — Restrict available tools based on authenticated credentials and permissions
11+
- **Custom Base Paths** — Support for reverse proxy deployments with customizable base URLs
12+
13+
## Running the Server
14+
15+
### Basic HTTP Server
16+
17+
Start the server on the default port (8082):
18+
19+
```bash
20+
github-mcp-server http
21+
```
22+
23+
The server will be available at `http://localhost:8082`.
24+
25+
### With Scope Challenge
26+
27+
Enable scope validation to enforce GitHub permission checks:
28+
29+
```bash
30+
github-mcp-server http --port 80 --scope-challenge
31+
```
32+
33+
When `--scope-challenge` is enabled, requests with insufficient scopes receive a `403 Forbidden` response with a `WWW-Authenticate` header indicating the required scopes.
34+
35+
### With OAuth Metadata Discovery
36+
37+
For use behind reverse proxies or with custom domains, expose OAuth metadata endpoints:
38+
39+
```bash
40+
github-mcp-server http --port 80 --scope-challenge --base-url https://myserver.com --base-path /mcp
41+
```
42+
43+
The OAuth protected resource metadata's `resource` attribute will be populated with the full URL to the server's protected resource endpoint:
44+
45+
```json
46+
{
47+
"resource_name": "GitHub MCP Server",
48+
"resource": "https://myserver.com/mcp",
49+
"authorization_servers": [
50+
"https://github.com/login/oauth"
51+
],
52+
"scopes_supported": [
53+
"repo",
54+
...
55+
],
56+
...
57+
}
58+
```
59+
60+
This allows OAuth clients to discover authentication requirements and endpoint information automatically.
61+
62+
## Client Configuration
63+
64+
### Using OAuth Authentication
65+
66+
If your IDE or client has GitHub credentials configured (i.e. VSCode), simply reference the HTTP server:
67+
68+
```json
69+
{
70+
"type": "http",
71+
"url": "https://localhost:8082"
72+
}
73+
```
74+
75+
The server will use the client's existing GitHub authentication.
76+
77+
### Using Bearer Tokens or Custom Headers
78+
79+
To provide PAT credentials, or to customize server behavior preferences, you can include additional headers in the client configuration:
80+
81+
```json
82+
{
83+
"type": "http",
84+
"url": "https://localhost:8082",
85+
"headers": {
86+
"Authorization": "Bearer ghp_yourtokenhere",
87+
"X-MCP-Toolsets": "default",
88+
"X-MCP-Readonly": "true"
89+
}
90+
}
91+
```
92+
93+
See [Remote Server](./remote-server.md) documentation for more details on client configuration options.

0 commit comments

Comments
 (0)