Skip to content

ccusage / mcp / createMcpServer

Function: createMcpServer() ​

ts
function createMcpServer(options?): McpServer;

Creates an MCP server with tools for showing usage reports. Registers tools for daily, session, monthly, and blocks usage data.

Parameters ​

ParameterTypeDescription
options?LoadOptionsConfiguration options for the MCP server

Returns ​

McpServer

Configured MCP server instance with registered tools

Released under the MIT License.