Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Serverless

    Serverless implementation of the Model Context Protocol (MCP)

    1 stars
    TypeScript
    Updated Jul 11, 2025

    Table of Contents

    • Overview
    • Installation
    • Usage
    • Tool Registration and create a client for service implements
    • API Reference
    • ToolManager class
    • Tool Interface
    • createServer(serverInfo, toolManager)
    • createService(toolManager)
    • Examples
    • Standard I/O Transport

    Table of Contents

    • Overview
    • Installation
    • Usage
    • Tool Registration and create a client for service implements
    • API Reference
    • ToolManager class
    • Tool Interface
    • createServer(serverInfo, toolManager)
    • createService(toolManager)
    • Examples
    • Standard I/O Transport

    Documentation

    MCP Serverless

    A serverless implementation for the Model Context Protocol (MCP) architecture that enables tool management through a clean interface.

    Overview

    This package provides a serverless implementation of the MCP server that allows you to:

    • Register and manage tools
    • Handle tool-related requests
    • Create in-memory client-server connections
    • Extend request with context to enable credential transmission from clients

    Installation

    bash
    npm install @tilfin/mcp-serverless

    Usage

    Tool Registration and create a client for service implements

    typescript
    import { createService, ToolManager } from '@tilfin/mcp-serverless';
    
    // Create a tool manager
    const toolManager = new ToolManager();
    
    // Register tools
    toolManager.registerTools([
      {
        name: 'calculator',
        description: 'Performs basic arithmetic operations',
        inputSchema: {
          type: 'object',
          properties: {
            operation: { type: 'string' },
            numbers: { type: 'array', items: { type: 'number' } }
          },
          required: ['operation', 'numbers']
        },
        toolFunction: async (params, ctx) => {
          if (ctx.apiKey !== 'xyz') throw new Error('Invalid API Key');
    
          let result;
          if (params.operation === 'add') {
            result = params.numbers.reduce((sum, n) => sum + n, 0);
          }
          return { result };
        }
      }
    ]);
    
    // Create a serverless client
    const client = createService(toolManager);
    
    // List available tools
    const toolsList = await client.listTools();
    
    // Call a tool
    try {
      const result = await client.callTool({
        name: 'calculator',
        arguments: {
          operation: 'add',
          numbers: [1, 2, 3]
        }
      });
    } catch (err) {
      // raise Invalid API Key error
    }
    
    // Call a tool with context
    const result = await client.callTool({
      name: 'calculator',
      arguments: {
        operation: 'add',
        numbers: [1, 2, 3]
      },
      ctx: { apiKey: 'xyz' }
    });

    API Reference

    ToolManager class

    Manages the registration and handling of tools.

    Tool Interface

    Tools must implement the following interface:

    typescript
    interface Tool {
      name: string;
      description: string;
      inputSchema: ToolInput;
      toolFunction: (args: CallToolRequestArguments, ctx: CallToolRequestContext) => Promise;
    }

    createServer(serverInfo, toolManager)

    Creates an MCP server with the given tool manager.

    createService(toolManager)

    Creates an in-memory client-server setup for serverless operation.

    Examples

    Standard I/O Transport

    The package includes examples for using the stdio transports for both client and server communication:

    • StdioClientTransport: Allows clients to communicate with servers over standard input/output
    • StdioServerTransport: Enables servers to handle requests through standard input/output

    Check out the example implementation:

    • Client: stdio_client.mjs
    • Server: stdio_server.mjs

    Similar MCP

    Based on tags & features

    • 4E

      4everland Hosting Mcp

      TypeScript·
      1
    • MC

      Mcp Wave

      TypeScript00
    • GL

      Glm Mcp Server

      TypeScript·
      3
    • OP

      Openai Gpt Image Mcp

      TypeScript·
      75

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • 4E

      4everland Hosting Mcp

      TypeScript·
      1
    • MC

      Mcp Wave

      TypeScript00
    • GL

      Glm Mcp Server

      TypeScript·
      3
    • OP

      Openai Gpt Image Mcp

      TypeScript·
      75

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k