Skip to main content
Connect upstream MCP servers with high-level transport helpers
This page is kept for older links. The current concepts entrypoint is Servers and transports.

Quick Start

Use stdio(...) for local upstream MCP servers:
Use streamableHttp(...) for native remote MCP HTTP endpoints:

Transport Matrix

Stdio Options

command

Executable to spawn.

args

Arguments passed to the upstream process.

env

Environment variables passed to the upstream process.

stderr

How to handle stderr from the upstream process. Use inherit during local development to see upstream logs.

HTTP-Family Auth

streamableHttp(...) supports static headers, bearer tokens, API keys, and per-user header resolvers.

OAuth 2.1 Upstreams

Declare auth: oauth() on the server when the upstream runs an OAuth 2.1 flow. Fentaris then discovers the authorization server, registers a client, runs PKCE, refreshes tokens, and keeps one authorization per user.
A caller-supplied access token still works: pass it through a resolver and Fentaris forwards it unchanged. Use oauth() when nobody holds a token yet. See Upstream OAuth 2.1.

Close Cleanly

Close the proxy on shutdown so upstream transports can release processes, sockets, and sessions.

Low-Level API

Transport classes such as StdioTransport, StreamableHttpMcpTransport, SseMcpTransport, and exposure transports remain available for advanced integrations. New application docs should prefer stdio(...), streamableHttp(...), and proxy.start().