sebastianbartmann/mcp-oauth-server
If you are the rightful owner of mcp-oauth-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project is a learning initiative focused on building remote MCP servers with GitHub OAuth authentication using FastMCP 2.x.
MCP Remote Server with OAuth
A learning project for building remote MCP (Model Context Protocol) servers with GitHub OAuth authentication using FastMCP 2.x.
Project Status
Current Stage: GitHub OAuth authentication implemented ✅ Next: Production deployment to Hetzner VPS via Coolify 🚧
What is MCP?
The Model Context Protocol (MCP) is a standardized way for AI applications (like Claude) to interact with external tools and data sources. Think of it as "USB-C for AI" - a universal protocol for connecting AI to your systems.
Project Goals
- Learn how to build remote MCP servers
- Understand OAuth integration in MCP context
- Practice modern Python development with
uvand FastMCP - Prepare for production deployment (Hetzner VPS → Google Cloud)
Tech Stack
- Python: 3.13+
- Package Manager: uv
- Framework: FastMCP 2.12.4
- Auth: GitHub OAuth (OAuthProxy pattern)
- Transport: HTTP/SSE (Server-Sent Events)
Setup
Prerequisites
- Python 3.13+
- uv package manager
- GitHub account (for OAuth)
Installation
# Clone the repository
git clone <repo-url>
cd mcptest
# Install dependencies
uv sync
Local Development
Option 1: Basic Server (No Authentication)
uv run python server.py
uv run python client_test.py
Option 2: OAuth-Protected Server
# 1. Register GitHub OAuth App (see OAUTH_SETUP.md)
# 2. Create .env file
cp .env.example .env
# 3. Add your GitHub OAuth credentials to .env
# 4. Run server and client
uv run python server_oauth.py
uv run python client_oauth_test.py # Requires GUI for browser auth
The server will start at http://localhost:8000/mcp
Current Features
Tools (Functions the AI can call)
greet(name)- Simple greeting tooladd_numbers(a, b)- Add two numbersget_server_info()- Get server information
Resources (Data the AI can read)
info://welcome- Welcome message with learning notes
Production Deployment
See for instructions on deploying to Hetzner VPS via Coolify with Docker.
Learning Resources
Project Context
See claude.md for detailed project context, decisions, and learning notes.
License
MIT License - Learning project