Skip to content

Commit 0ee3804

Browse files
authored
Merge pull request #21 from StrongMonkey/docs
Chore: First pass of docs
2 parents 394e51e + 6603fab commit 0ee3804

File tree

15 files changed

+16895
-2
lines changed

15 files changed

+16895
-2
lines changed

.github/workflows/docs.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- ".github/workflows/docs.yml"
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- "docs/**"
15+
- ".github/workflows/docs.yml"
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
build:
31+
runs-on: ubuntu-latest
32+
defaults:
33+
run:
34+
working-directory: docs
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
41+
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: 20
46+
cache: npm
47+
cache-dependency-path: docs/package-lock.json
48+
49+
- name: Setup Pages
50+
id: pages
51+
uses: actions/configure-pages@v5
52+
53+
- name: Install dependencies
54+
run: npm ci
55+
56+
- name: Build website
57+
run: npm run build
58+
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: docs/build
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
if: github.ref == 'refs/heads/main'
71+
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ jobs:
241241
tags: |
242242
type=ref,event=tag
243243
type=semver,pattern={{version}}
244-
type=semver,pattern={{major}}.{{minor}}
245-
type=semver,pattern={{major}}
246244
type=raw,value=latest,enable={{is_default_branch}}
247245
248246
- name: Build and push Docker image

docs/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```bash
8+
yarn
9+
```
10+
11+
## Local Development
12+
13+
```bash
14+
yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```bash
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
Using SSH:
30+
31+
```bash
32+
USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```bash
38+
GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docs/docs/01-overview.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Overview
3+
slug: /
4+
---
5+
6+
MCP OAuth Proxy is an open-source OAuth 2.1 proxy server that adds authentication and authorization to MCP (Model Context Protocol) servers.
7+
8+
## What is MCP OAuth Proxy?
9+
10+
MCP OAuth Proxy acts as a bridge between OAuth providers (Google, Microsoft, GitHub) and MCP servers, providing:
11+
12+
- **OAuth 2.1 Compliance** - Full OAuth 2.1 authorization server with PKCE support
13+
- **MCP Integration** - Seamless proxy to MCP servers with user context injection
14+
- **Multi-Provider Support** - Works with any OAuth 2.0 provider via auto-discovery
15+
- **Database Flexibility** - PostgreSQL for production, SQLite for development
16+
17+
## Architecture
18+
19+
The proxy sits in front of your MCP server to handle OAuth 2.1 authentication and validate user identity from external providers.
20+
21+
Here's how it works:
22+
23+
1. **OAuth 2.1 Flow** - When a client needs access, the proxy redirects to an external auth provider (Google, Microsoft, GitHub) to verify user identity
24+
2. **Token Issuance** - Once authentication is complete, the proxy issues an access token back to the client
25+
3. **MCP Auth Compliance** - Follows the MCP authentication specification and works with any compatible MCP client
26+
4. **Request Proxying** - Validates the access token and forwards authenticated requests to your MCP server
27+
5. **User Context** - Sends necessary headers to the MCP server about user identity and access to external services based on the OAuth scopes you configured
28+
29+
![Architecture Diagram](/img/architect.png)
30+
31+
The proxy supports PostgreSQL for production deployments and SQLite for development, with automatic schema creation and encrypted storage for sensitive data.
32+
33+
## Headers Sent to MCP Server
34+
35+
When proxying requests to your MCP server, the OAuth proxy automatically injects the following headers with user information:
36+
37+
| Header | Description | Example |
38+
| -------------------------- | ----------------------------------------- | ---------------------- |
39+
| `X-Forwarded-User` | User ID from the OAuth provider | `12345678901234567890` |
40+
| `X-Forwarded-Email` | User's email address | `[email protected]` |
41+
| `X-Forwarded-Name` | User's display name | `John Doe` |
42+
| `X-Forwarded-Access-Token` | OAuth access token for external API calls | `ya29.a0ARrdaM...` |
43+
44+
These headers allow your MCP server to:
45+
46+
- **Identify the user** making the request
47+
- **Personalize responses** based on user information
48+
- **Make authenticated API calls** to external services using the access token
49+
- **Implement user-specific logic** and access controls
50+
51+
:::note
52+
Headers are only set if the corresponding user information is available from the OAuth provider. If a property is not available, the header is removed to avoid stale data.
53+
:::
54+
55+
## Next Steps
56+
57+
- [Getting Started](/getting-started) - Quick setup guide

0 commit comments

Comments
 (0)