https://github.com/jeffdyke/hydra-headless-ts
ExpressJS EffectTS OAuth2 Middleware for MCP Servers
https://github.com/jeffdyke/hydra-headless-ts
Last synced: 5 months ago
JSON representation
ExpressJS EffectTS OAuth2 Middleware for MCP Servers
- Host: GitHub
- URL: https://github.com/jeffdyke/hydra-headless-ts
- Owner: jeffdyke
- License: apache-2.0
- Created: 2025-10-08T16:28:09.000Z (8 months ago)
- Default Branch: RC
- Last Pushed: 2025-12-02T15:13:28.000Z (6 months ago)
- Last Synced: 2025-12-03T08:42:06.828Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.68 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ory - Ory Hydra ExpressJS OAuth2 Middleware for MCP Servers
README
# Overview
This service implements a **headless OAuth2 login/consent provider** that bridges Ory Hydra (OAuth2 server with DCR) and Google OAuth (identity provider without DCR support).
## TLDR
This can be used as a connector in an AI Agent like Claude.ai that requires DCR, which Google doesn't support. The code uses Ory Hydra as
a OpenID Connect provider and Google as the OAuth Provider, routing a single client_id to your Google endpoint and keeping all of the client information
local in a PostGres DB, and using Redis for caching and sessions.
The underlying code originated from https://github.com/ory/hydra-login-consent-node, yet was completely modified to be written in typescript and only
the API calls.
### TODO
Installation/documentation still depends on salt, which is fine if it can be dockerized
Assumption that OAuth provider is google needs to be removed
Likely More
In words, I could not write myself:
[Detailed breakdown of this OAuth2 flow](OAUTH2_ARCHITECTURE.md)
## Localhost vs Proxy
The code is written to run behind a proxy, or directly. It was developed behind HAProxy -> Nginx -> App.
Local development does not enable https
## Development Helpers
- [Dev Overview of Repository](./DEVELOPMENT.md)
- [Linting](./LINTING.md)
- [Quality Baseline](./QUALITY_BASELINE.mc)
- [Unit Tests](./README.test.md)
### Running Locally
To run this locally,
Simply change into the root of the repository:
- Update LocalDev settings, see [local.env](src/env/local.env)
- Run only watching compile errors `npm run tswatch`
- Launch the application `npm run build && npm run serve:local`
## Installing Docker Environment
- TODO
### Nginx Configuration
[Virtual Host configuration](build/support_files/nginx/hydra.conf), for Nginx.
- A single variable `private_ip` is required to speak to the upstream docker containers