You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more information on mounting applications in Starlette, see the [Starlette documentation](https://www.starlette.io/routing/#submounting-routes).
414
-
415
-
#### Message Dispatch Options
416
-
417
-
By default, the SSE server uses an in-memory message dispatch system for incoming POST messages. For production deployments or distributed scenarios, you can use Redis or implement your own message dispatch system that conforms to the `MessageDispatch` protocol:
413
+
When mounting multiple MCP servers under different paths, you can configure the mount path in several ways:
418
414
419
415
```python
420
-
# Using the built-in Redis message dispatch
416
+
from starlette.applications import Starlette
417
+
from starlette.routing import Mount
421
418
from mcp.server.fastmcp import FastMCP
422
-
from mcp.server.message_queue import RedisMessageDispatch
# Simple MCP Server with GitHub OAuth Authentication
2
+
3
+
This is a simple example of an MCP server with GitHub OAuth authentication. It demonstrates the essential components needed for OAuth integration with just a single tool.
4
+
5
+
This is just an example of a server that uses auth, an official GitHub mcp server is [here](https://github.com/github/github-mcp-server)
6
+
7
+
## Overview
8
+
9
+
This simple demo to show to set up a server with:
10
+
- GitHub OAuth2 authorization flow
11
+
- Single tool: `get_user_profile` to retrieve GitHub user information
12
+
13
+
14
+
## Prerequisites
15
+
16
+
1. Create a GitHub OAuth App:
17
+
- Go to GitHub Settings > Developer settings > OAuth Apps > New OAuth App
18
+
- Application name: Any name (e.g., "Simple MCP Auth Demo")
0 commit comments