fentaris(...) as the application boundary. Put upstream servers, identity, policy, logging, endpoint settings, and runtime hooks in one config-driven proxy.
Quick Start
Choose a Stable Endpoint
Client integrations usually store the MCP endpoint. Keeppath stable even if ports or hosts change.
127.0.0.1; use host: "0.0.0.0" only when the service is intentionally exposed by the deployment boundary.
Configure Proxy Identity
name and version are surfaced to MCP clients during initialization. Treat them as control-plane identity for logs and client diagnostics.
Add Stable Server Metadata
Server names become tool prefixes, so they should remain stable across environments.Add Request Identity Early
Resolve user, tenant, and trace metadata at the proxy edge.Enforce Policy at the Edge
Usepolicy(...), group(...), and user(...) for durable authorization.
Register Servers After Construction
You can declare policies infentaris(...) and attach upstream MCP servers with app.mcp(...) before start(). Fentaris validates the final server visibility when the proxy starts.
If a policy references a server that is still missing at
app.start(), Fentaris fails startup with FENTARIS_CONFIG_POLICY_SERVER_NOT_VISIBLE.Compose Governance After Construction
Useapp.policy(...), app.group(...), and app.mcp(...) together when modules need to contribute to one proxy instance.
app.policy("readonly") calls return the same named policy, so modules can add permissions to a shared declaration before the proxy starts.
Harden Tool Discovery
Filter tool lists before exposing them to clients.Proxy Resources, Prompts, and Completions
Fentaris proxies MCP resources, resource templates, prompts, and argument completion when at least one upstream transport supports those methods. Prompts use the same namespace format as tools:resources/read, prompts/get, and completion/complete.
Add Local Capabilities
Useapp.local(name) when the Fentaris app itself should expose MCP tools, resources, prompts, or completions beside upstream MCP servers.
workspace__status and workspace__review_pr. Local resources and resource templates use the same Fentaris proxy URI helpers with workspace as the server name.
A local namespace name cannot match an upstream MCP server name. Fentaris reports a configuration diagnostic before serving requests.
Customize Request Logging
traceId, user.id, or tenantId so one tool call can be traced across systems.
Close Cleanly
When the proxy shuts down, close upstream transports to avoid orphaned server processes.SIGINT in local development and SIGTERM in production.
Low-Level API
new McpProxy(...), new McpServer(...), and explicit transport constructors remain available for advanced integrations and compatibility. New applications should start with fentaris(...), mcp(...), and transport helpers.
Operational Checklist
- Keep server names stable across environments.
- Keep
pathstable for client integrations. - Resolve user, tenant, and trace metadata at the edge.
- Prefer
policy(...)for durable authorization. - Use middleware for argument-aware runtime checks.
- Avoid hard-coding secrets; inject them through credential or env configuration.
- Close the proxy on process shutdown.