ccusage / mcp
mcp
Fileoverview
MCP (Model Context Protocol) server implementation
This module provides MCP server functionality for exposing ccusage data through the Model Context Protocol. It includes both stdio and HTTP transport options for integration with various MCP clients.
Functions
Function | Description |
---|---|
createMcpServer | Creates an MCP server with tools for showing usage reports. Registers tools for daily, session, monthly, and blocks usage data. |
startMcpServerStdio | Start the MCP server with stdio transport. Used for traditional MCP client connections via standard input/output. |
createMcpHttpApp | Create Hono app for MCP HTTP server. Provides HTTP transport support for MCP protocol using Hono framework. Handles POST requests for MCP communication and returns appropriate errors for other methods. |