MCP Analytics Middleware logo

MCP Analytics Middleware

by Phillip-Kemper

A simple way to track and visualize how your MCP server is being used. See which tools are most popular, catch errors early, and understand your server's performance.

View on GitHub

Last updated: N/A

What is MCP Analytics Middleware?

MCP Analytics Middleware is a tool to track and visualize the usage of your MCP server. It provides insights into tool popularity, error rates, and server performance.

How to use MCP Analytics Middleware?

Install the package using yarn add mcp-analytics-middleware. Then, import the McpAnalytics class and enhance your MCP server instance with it, providing a database path for persistent storage. You can view live analytics using the web-viewer command.

Key features of MCP Analytics Middleware

  • Track all tool calls and resource requests

  • See performance metrics and error rates

  • Web dashboard for live analytics

  • SQLite database for persistent storage

Use cases of MCP Analytics Middleware

  • Monitoring tool usage in an MCP server

  • Identifying performance bottlenecks

  • Detecting and diagnosing errors early

  • Understanding user behavior and popular tools

FAQ from MCP Analytics Middleware

How do I install the middleware?

Use the command yarn add mcp-analytics-middleware.

How do I view the live analytics dashboard?

Run npx -p mcp-analytics-middleware web-viewer --db-path analytics.db.

What kind of data is tracked?

The middleware tracks tool calls, resource requests, performance metrics, and error rates.

Where is the data stored?

The data is stored in an SQLite database.

Is there a license for the middleware?

Yes, the middleware is licensed under the MIT license.