MCP.so
Sign In
Servers

MCP Serverless

@tilfin

Serverless implementation of the Model Context Protocol (MCP)

Overview

What is MCP Serverless?

MCP Serverless is a serverless implementation of the Model Context Protocol (MCP) architecture that enables tool management through a clean interface. It is designed for developers who need to register and manage tools, handle tool-related requests, and create in‑memory client‑server connections. The package extends requests with context to allow credential transmission from clients.

How to use MCP Serverless?

Install the package with npm (npm install @tilfin/mcp-serverless). Import ToolManager and createService from the package, create a tool manager, register tools (each with name, description, input schema, and a tool function), then create a service client and call client.listTools() or client.callTool(). Context (e.g., an API key) can be passed in the ctx property of the tool call arguments.

Key features of MCP Serverless

  • Register and manage multiple tools with a single manager
  • Call tools with or without a request context object
  • Create in‑memory client‑server connections (no network needed)
  • Extend tool calls with context for credential transmission
  • Works with standard I/O transports (stdio client/server)

Use cases of MCP Serverless

  • Building serverless MCP tool endpoints that run in edge functions or AWS Lambda
  • Testing tool workflows locally without a full MCP server deployment
  • Securely passing API keys or user tokens to tool implementations via context
  • Creating lightweight, transport‑agnostic tool registries for AI assistants

FAQ from MCP Serverless

What dependencies does MCP Serverless require?

The package has no runtime dependencies beyond Node.js and the npm package itself; it is self‑contained.

Where does tool data live when using MCP Serverless?

All tool registrations and in‑memory client‑server connections exist only in the current process’s memory. The system does not persist data to disk or a database.

What transports are supported by MCP Serverless?

The package includes examples for standard I/O transport (StdioClientTransport and StdioServerTransport). The core API (createService) creates an in‑memory connection that does not require any network or I/O transport.

How can I authenticate tool calls with MCP Serverless?

Authentication is handled by passing a ctx object (containing credentials such as an API key) when calling a tool. The tool function receives the context and can validate it before processing the request.

Tags

More from Cloud & Infrastructure