FUNCTIONS / @SPFN/MCP — MODEL CONTEXT PROTOCOL

Your app,
callable.

The second gate between a working prototype and a product: the day after you deploy, someone has to refund an order or retry a failed job. @spfn/mcp answers it without an admin dashboard — one application-defined set of tools, resources, and prompts served over authenticated Streamable HTTP or local stdio. The official SDK owns the protocol; your application supplies identity and owns policy, context, and business logic.

Read the reference Get started $ pnpm add @spfn/mcp
01
The boundary

Protocol below.
Your policy above.

MCP negotiation, JSON-RPC, schema validation, and legacy compatibility belong to the official SDK. A transport-neutral dispatcher keeps tool behavior identical across network and process transports while authentication and domain policy stay at the application boundary.

MCP client
HTTP / stdio
dispatcher
application tools
FIG 01 — ONE CONTRACT · TRANSPORT-SPECIFIC TRUST BOUNDARIES
02
Choose the boundary

Network trust.
Local trust.

Use HTTP when clients connect over a network and need OAuth plus Host and Origin validation. Use stdio when an Agent host starts a local child process; the executable, arguments, and process configuration become the capability boundary.

REMOTE
network client
application auth
Streamable HTTP
dispatcher
LOCAL
Agent host
spawn authority
stdio bridge
dispatcher
FIG 02 — HTTP AUTHENTICATES REQUESTS · STDIO TRUSTS THE SPAWNING HOST
03
What's inside

Two adapters,
one contract.

Choose the transport.