Skip to content

Add authenticated remote MCP connector hosting - #43

Merged
NotY215 merged 15 commits into
mainfrom
phase7-remote-mcp-host
Nov 26, 2026
Merged

NotY215 merged 15 commits into
mainfrom
phase7-remote-mcp-host

Conversation

@NotY215

@NotY215 NotY215 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a deployable, stateless MCP Streamable HTTP endpoint so AIFIAR can be connected by remote MCP clients.

Implemented

  • Add authenticated HTTP transport with per-principal host profiles and explicit tool allowlists.
  • Add high-entropy static bearer tokens and external OAuth/OIDC JWT resource-server validation through HTTPS JWKS.
  • Validate RS256 signatures, issuer, audience, expiry, subject, required AIFIAR scope, profile and tool claims.
  • Publish OAuth protected-resource metadata so OAuth-capable hosts can discover the configured external authorization server.
  • Add bounded request bodies, strict HTTPS public URL/path configuration, Host and optional Origin allowlists, global/per-principal rate limits, request IDs, minimal health checks, and graceful shutdown.
  • Add Dockerfile and hardened Compose deployment (non-root, read-only root, dropped capabilities, no-new-privileges, internal network, CPU/memory/PID limits).
  • Add deployment instructions, environment template, token generator, OIDC and HTTP transport tests, and roadmap updates.

Important boundaries

  • AIFIAR is an OAuth resource server, not an authorization server. Login, consent, OAuth client registration, authorization-code/PKCE, refresh-token rotation and user lifecycle are delegated to an external identity provider.
  • The endpoint is stateless Streamable HTTP: no SSE GET stream, resumable session, or session ID support.
  • ChatGPT/Claude web integration depends on their current connector UI and the configured identity provider accepting their exact redirect URI. This repository does not host the identity provider.
  • Grok remains compatibility-unverified.
  • The service is not a hosted SaaS. Operators must provide DNS, TLS ingress, identity-provider configuration, token distribution, external rate limiting, monitoring, and security review.
  • Existing tools remain read-only; no shell, arbitrary filesystem, repository mutation, or live model-inference tools are exposed.

Validation

TypeScript typecheck/build/tests and Python safety/Windows compatibility checks pass on the latest branch head. CodeQL is still running. Real client onboarding and deployment validation remain operator tasks.

@NotY215
NotY215 marked this pull request as ready for review November 26, 2026 09:51
@NotY215
NotY215 merged commit 7ec98d6 into main Nov 26, 2026
9 checks passed
@NotY215
NotY215 deleted the phase7-remote-mcp-host branch November 26, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant