mcp-gatekeeper

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT

README

MCP Gatekeeper

The front door for self-hosted MCP servers: people sign in with passkeys, connect ChatGPT and Claude as MCP connectors through a built-in OAuth 2.1 authorization server, and the owner revokes access per person or per connection.

Extracted from Family Hub and shared with Homie.

  • Go (net/http, log/slog): passkeys and sessions (auth), the OAuth server and consent (oauth), the access check in front of an MCP endpoint (mcpguard), accounts, people and invites (people), HTTP security (httpsec), the admin unix socket (adminsock), the SPA handler (webui), Cloudflare Tunnel setup (tunnel/cloudflare).
  • Storage: interfaces in store, adapters for MongoDB (store/mongostore) and SQLite (store/sqlitestore), one conformance suite (store/storetest).
  • Admin UI: a React package in ui/, consumed by a git tag.

Status: being extracted (step 1 of docs/PLAN.md).

Development

make lint test          # Go lint and unit tests
make integration        # tests that need Docker (MongoDB)
make ui                 # the UI package: typecheck, lint, unit tests

License

MIT

Directories

Path Synopsis
Package adminsock is an application's admin socket: its operator commands (Family Hub's `hub admin …`) run inside the application process and are reached over a unix socket.
Package adminsock is an application's admin socket: its operator commands (Family Hub's `hub admin …`) run inside the application process and are reached over a unix socket.
Package auth signs people in with passkeys and keeps their browser sessions: setup links, invites, step-up and the passkey list.
Package auth signs people in with passkeys and keeps their browser sessions: setup links, invites, step-up and the passkey list.
Package core holds the identifiers, domain types, errors and cross-package interfaces of MCP Gatekeeper.
Package core holds the identifiers, domain types, errors and cross-package interfaces of MCP Gatekeeper.
Package httpsec holds the HTTP plumbing every gatekeeper package shares: the JSON error form, security headers, the request log and the client-address rules.
Package httpsec holds the HTTP plumbing every gatekeeper package shares: the JSON error form, security headers, the request log and the client-address rules.
internal
testlog
Package testlog captures slog records in tests (the gatekeeper's stand-in for zaptest/observer).
Package testlog captures slog records in tests (the gatekeeper's stand-in for zaptest/observer).
Package mcpguard is the access check in front of an MCP endpoint (Family Hub docs/PLAN.md §5.6), taken from Family Hub's internal/gateway:
Package mcpguard is the access check in front of an MCP endpoint (Family Hub docs/PLAN.md §5.6), taken from Family Hub's internal/gateway:
Package oauth is the gatekeeper's OAuth 2.1 authorization server for MCP connectors (docs/security/G4.md): the metadata documents, dynamic client registration and client ID metadata documents, authorize with its in-memory transactions, the consent API the admin SPA calls, token, revoke, and core.TokenValidator for the MCP access check.
Package oauth is the gatekeeper's OAuth 2.1 authorization server for MCP connectors (docs/security/G4.md): the metadata documents, dynamic client registration and client ID metadata documents, authorize with its in-memory transactions, the consent API the admin SPA calls, token, revoke, and core.TokenValidator for the MCP access check.
Package people keeps accounts and their members, and serves the account and superadmin JSON API: members and invites of an account, its connections and audit, accounts made by the superadmin, the system audit, and "delete everything", which lets the application erase its own data of the account before the gatekeeper deletes its rows.
Package people keeps accounts and their members, and serves the account and superadmin JSON API: members and invites of an account, its connections and audit, accounts made by the superadmin, the system audit, and "delete everything", which lets the application erase its own data of the account before the gatekeeper deletes its rows.
actorname
Package actorname keeps the name of an audit entry's actor, as it was when the entry was written.
Package actorname keeps the name of an audit entry's actor, as it was when the entry was written.
internal/memstore
Package memstore is an in-memory store.Store for the tests of package people (Family Hub's admintest store, on the gatekeeper's interfaces).
Package memstore is an in-memory store.Store for the tests of package people (Family Hub's admintest store, on the gatekeeper's interfaces).
Package store defines the gatekeeper's persistence.
Package store defines the gatekeeper's persistence.
mongostore
Package mongostore implements store.Store on MongoDB.
Package mongostore implements store.Store on MongoDB.
sqlitestore
Package sqlitestore implements store.Store on SQLite (modernc.org/sqlite, no cgo).
Package sqlitestore implements store.Store on SQLite (modernc.org/sqlite, no cgo).
storetest
Package storetest is the one conformance suite of store.Store.
Package storetest is the one conformance suite of store.Store.
tunnel
cloudflare
Package cloudflare creates an application's Cloudflare Tunnel with the cloudflared CLI, the way findmy-mcp-bridge does (src/tunnel.mjs), with no Cloudflare API token.
Package cloudflare creates an application's Cloudflare Tunnel with the cloudflared CLI, the way findmy-mcp-bridge does (src/tunnel.mjs), with no Cloudflare API token.
Package webui serves an application's built single-page app from an fs.FS (the application embeds its own build).
Package webui serves an application's built single-page app from an fs.FS (the application embeds its own build).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL