MCP ExplorerExplorer

Mcp Tracker

@agg111on 10 months ago
2 MIT
FreeCommunity
AI Systems
MCP Tracker

Overview

What is Mcp Tracker

MCP Tracker is a monitoring server designed to pull metrics and logs, providing debugging suggestions for users of the MCP system.

Use cases

Use cases for MCP Tracker include monitoring server performance metrics, analyzing application behavior over time, and providing insights for debugging and optimization.

How to use

To use MCP Tracker, implement the ‘record_metric’ function to log metrics related to your server. You can also run the Streamlit dashboard using the command ‘streamlit run dashboard.py’ and access it via ‘http://localhost:8501’.

Key features

Key features of MCP Tracker include the ability to record various metrics with associated metadata, a user-friendly Streamlit dashboard for visualizing metrics, and debugging suggestions to enhance server performance.

Where to use

MCP Tracker can be used in various fields such as software development, system monitoring, and data analysis where tracking performance metrics is essential.

Content

MCP Tracker

MCP server

MCP tracker server - monitor.py

Supposed to pull metrics, logs, provide debugging suggestions

In user MCP, add function to record metric -

def record_metric(server_name: str, metric_name: str, value: float, unit: str = "", tags: dict[str, Any] = {}) -> str:
    supabase.table("mcp_metrics").insert({
        "server_name": server_name,
        "metric_name": metric_name,
        "value": value,
        "unit": unit,
        "tags": tags
    }).execute()

Record metric from mcp.tool function as -

# Send temperature as metric
    record_metric(
        server_name="weather-mcp",
        metric_name=f"forecast_temp_{name}",
        value=temp,
        unit=unit,
        tags={"wind": wind, "description": desc}
    }

Streamlit dashboard for metrics

To run -

streamlit run dashboard.py    

Open http://localhost:8501 to view metrics dashboard

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers