Skip to content

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

FunctionDescription
createMcpServerCreates an MCP server with tools for showing usage reports. Registers tools for daily, session, monthly, and blocks usage data.
startMcpServerStdioStart the MCP server with stdio transport. Used for traditional MCP client connections via standard input/output.
createMcpHttpAppCreate 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.

Released under the MIT License.