fentaris.json and declares upstream servers with app.mcp(...).
Quick Start
Use the optional agent skills when you want an agent to ask setup questions, choose upstream MCP servers, and validate the project after edits:Step 1: Configure the Runtime Endpoint
fentaris init writes fentaris.json. Keep endpoint settings there instead of hardcoding them in src/index.ts:
app.start() runs without explicit options, @fentaris/core searches upward from the current working directory and reads the nearest fentaris.json. With the config above, the local endpoint is http://localhost:4000/mcp.
Step 2: Create the App Boundary
Opensrc/index.ts and start with an empty Fentaris app:
fentaris() creates the proxy application boundary. Project discovery, host, port, and path come from fentaris.json, while upstream MCP servers are attached with app.mcp(...). Policy.allowAll() keeps this local tutorial focused on routing; replace it with an allow-list policy before sharing the endpoint.
Step 3: Attach the Filesystem Server
Create a local directory that the filesystem MCP server can expose:app.mcp("filesystem", ...) gives the upstream server a stable Fentaris name. Fentaris uses that name when routing tool calls, applying middleware, logging events, and exposing proxied tool names such as filesystem__read_file.
Step 4: Attach a Remote Server
Add the public MCP specification server as a second upstream:The specification server requires network access. The filesystem server remains local, so you can still start the proxy and test local routing if the remote server is unavailable.
Step 5: Add Global Middleware
Middleware runs after Fentaris builds request context and before the matching upstream MCP server receives the call:Step 6: Add a Server Hook
Server-scoped handles keep observability close to the upstream MCP server they describe:specification upstream MCP server. It does not affect filesystem calls and does not replace middleware or policy decisions.
Step 7: Start the Proxy
Finishsrc/index.ts with app.start():
Step 8: Connect a Client
Point your MCP client to the endpoint fromfentaris.json:
Validate the Project
Run static project checks before sharing the endpoint:What You Built
You now have:- one Fentaris endpoint configured by
fentaris.json - two upstream MCP servers declared with
app.mcp(...) - global middleware for logging and request-time denial
- a server-scoped hook for remote upstream observability