MCP Serverless
by tilfin
MCP Serverless is a serverless implementation for the Model Context Protocol (MCP) architecture. It enables tool management through a clean interface, allowing you to register, manage, and call tools in a serverless environment.
Last updated: N/A
What is MCP Serverless?
MCP Serverless is a serverless implementation of the Model Context Protocol (MCP) server. It provides a framework for registering, managing, and invoking tools, creating in-memory client-server connections, and extending requests with context for credential transmission.
How to use MCP Serverless?
To use MCP Serverless, install the package using npm (npm install @tilfin/mcp-serverless
). Then, use the ToolManager
class to register your tools, defining their input schemas and function implementations. Finally, create a serverless client using createService(toolManager)
and use it to list available tools and call them with appropriate arguments and context.
Key features of MCP Serverless
Tool registration and management
In-memory client-server connections
Context extension for requests (e.g., credential transmission)
Standard I/O transport support (stdio)
Clear API for tool invocation
Use cases of MCP Serverless
Building serverless tool orchestration platforms
Creating APIs for accessing various tools and services
Implementing secure tool invocation with context-based authorization
Developing command-line tools with serverless backends
FAQ from MCP Serverless
What is MCP?
What is MCP?
Model Context Protocol is an architecture for tool management.
How do I register a tool?
How do I register a tool?
Use the ToolManager
class and its registerTools
method.
How do I call a tool?
How do I call a tool?
Use the client.callTool
method with the tool name and arguments.
How do I pass context to a tool?
How do I pass context to a tool?
Include the ctx
property in the client.callTool
method.
What transport options are available?
What transport options are available?
The package includes examples for using the stdio transports for both client and server communication.