litemcp

LiteMCP is a TypeScript framework for building Model Context Protocol (MCP) servers, offering features like simple tool and resource definition, built-in logging, error handling, and a CLI for debugging.

171
7

LiteMCP

LiteMCP is a TypeScript framework designed to simplify the creation of MCP (Model Context Protocol) servers. It offers features such as simple Tool, Resource, and Prompt definitions, full TypeScript support, built-in logging and error handling, a CLI for debugging, and SSE transport support.

Key concepts include: Tools, which are executable functions; Resources, representing data like files or logs identified by URIs; and Prompts, reusable prompt templates.

Installation is straightforward using npm install litemcp zod. The framework allows defining tools with addTool, resources with addResource (supporting text or binary data), and prompts with addPrompt. Logging is facilitated through server.logger with methods like info, warn, etc.

Debugging can be done via mcp-cli or the MCP Inspector. The server can run with stdio by default or with SSE transport.

Showcase examples include mcp-jina-reader and paperless-mcp. The roadmap includes Resource Templates. Related projects are mcp-cli, mcpservers.org, and FastMCP.

Repository

WO
wong2

wong2/litemcp

Created

December 9, 2024

Updated

March 28, 2025

Language

TypeScript

Category

Developer Tools