You'll be redirected to authenticate with the upstream provider. Once verified, you'll be granted access to this MCP server's resources.
- + Continue to Authentication diff --git a/embedded-oauth/src/config.ts b/embedded-oauth/src/config.ts new file mode 100644 index 0000000..cfa2992 --- /dev/null +++ b/embedded-oauth/src/config.ts @@ -0,0 +1,24 @@ +import "dotenv/config"; + +/** + * Port for the MCP server to listen on + */ +export const PORT = Number(process.env.PORT) || 3232; + +/** + * Base URI for the MCP server. Used for OAuth callbacks and metadata. + * Should match the port if specified separately. + */ +export const BASE_URI = process.env.BASE_URI || `http://localhost:${PORT}`; + +// Validate PORT and BASE_URI consistency +const baseUrl = new URL(BASE_URI); +if (baseUrl.port && parseInt(baseUrl.port) !== PORT) { + console.warn(`Warning: BASE_URI port (${baseUrl.port}) doesn't match PORT (${PORT})`); +} + +/** + * Redis connection URL + */ +export const REDIS_URL = process.env.REDIS_URL || 'redis://localhost:6379'; + diff --git a/src/context.ts b/embedded-oauth/src/context.ts similarity index 78% rename from src/context.ts rename to embedded-oauth/src/context.ts index 61190b8..4785ab2 100644 --- a/src/context.ts +++ b/embedded-oauth/src/context.ts @@ -1,21 +1,21 @@ import { AsyncLocalStorage } from "async_hooks"; -import { FakeUpstreamInstallation } from "./types.js"; +import { MockUpstreamInstallation } from "./types.js"; interface RequestContext { mcpAccessToken: string; - fakeUpstreamInstallation: FakeUpstreamInstallation; + mockUpstreamInstallation: MockUpstreamInstallation; } export const asyncLocalStorage = new AsyncLocalStoragePlease verify your identity with the upstream provider
+ +
+ This client wants to connect to your MCP server
+ +You'll be redirected to authenticate with the upstream provider. Once verified, you'll be granted access to this MCP server's resources.
+
+ + A comprehensive reference implementation of the Model Context Protocol (MCP) server + demonstrating all protocol features with full authentication support and horizontal scalability. +
+ +All MCP features including tools, resources, prompts, sampling, completions, and logging with full protocol compliance.
+Streamable HTTP (SHTTP) and Server-Sent Events (SSE) transports for flexible client integration.
+Complete OAuth flow with PKCE support and a built-in fake provider for testing and development.
+Redis-backed session management enables multi-instance deployments with automatic load distribution.
+Echo, add, long-running operations, LLM sampling, image handling, annotations, and resource references.
+Example resources with pagination, templates, subscriptions, and real-time update notifications.
+
+ + A comprehensive reference implementation of the Model Context Protocol (MCP) server + demonstrating all protocol features with full authentication support and horizontal scalability. +
+ +All MCP features including tools, resources, prompts, sampling, completions, and logging with full protocol compliance.
+Streamable HTTP (SHTTP) and Server-Sent Events (SSE) transports for flexible client integration.
+Complete OAuth flow with PKCE support and a built-in fake provider for testing and development.
+Redis-backed session management enables multi-instance deployments with automatic load distribution.
+Echo, add, long-running operations, LLM sampling, image handling, annotations, and resource references.
+Example resources with pagination, templates, subscriptions, and real-time update notifications.
+