https://github.com/dend/github-oauth-mcp
Quick demo MCP server that uses GitHub OAuth to authenticate users.
https://github.com/dend/github-oauth-mcp
Last synced: about 1 year ago
JSON representation
Quick demo MCP server that uses GitHub OAuth to authenticate users.
- Host: GitHub
- URL: https://github.com/dend/github-oauth-mcp
- Owner: dend
- License: mit
- Created: 2025-03-27T18:54:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T19:17:40.000Z (about 1 year ago)
- Last Synced: 2025-03-27T19:42:06.051Z (about 1 year ago)
- Language: TypeScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔒 Minimal GitHub OAuth-enabled MCP Server
Minimal MCP server showing how to potentially implement GitHub OAuth with an MCP server.
>[!WARNING]
>This is **not intended for production use**. If you are to adopt any of the practices in this implementation, ensure that you are implementing proper caching and secure token/credential handling practices.
## GitHub application registration
Prior to using this MCP server, make sure that you have a **GitHub App** you can use for testing. You can register one [in your GitHub settings](https://github.com/settings/apps).

Once the app is registered, make sure to generate a new secret.

With the client ID and secret handy, create a new `.env` file in the root of this project, and add:
```env
GITHUB_CLIENT_ID=YOUR_CLIENT_ID
GITHUB_CLIENT_SECRET=YOUR_SECRET
```
## Run server
```bash
npm install
npm run build
npm run start
```
## Testing
You will need to use [**MCP Inspector**](https://github.com/modelcontextprotocol/inspector) or a tool that supports HTTP+SSE transport for MCP servers _and_ authentication.