Skip to main content

Analytics SDK for Model Context Protocol Servers

Project description

Agnost Analytics SDK

PyPI version Python

Analytics SDK for tracking and analyzing Model Context Protocol (MCP) server interactions. Get insights into how your MCP servers are being used, monitor performance, and optimize user experiences.

Installation

pip install agnost_mcp

Basic Usage

import agnost_mcp
from fastmcp import FastMCP

# Create FastMCP server
mcp = FastMCP("My Server")

@mcp.tool()
def calculate(operation: str, a: float, b: float) -> float:
    """Perform mathematical operations."""
    if operation == "add":
        return a + b
    elif operation == "multiply":
        return a * b
    return 0

# Enable analytics tracking
agnost_mcp.track(mcp, org_id="your-organization-id")

Configuration

You can customize the SDK behavior using the configuration object:

import agnost_mcp

# Create a custom configuration
config = agnost_mcp.config(
    endpoint="https://api.agnost.ai/api/v1",
    disable_input=False,    # Set to True to disable input tracking
    disable_output=False    # Set to True to disable output tracking
)

# Apply the configuration
agnost_mcp.track(
    server=server,
    org_id="your-organization-id",
    config=config
)

Configuration Options

Option Type Default Description
endpoint str "https://api.agnost.ai/api/v1" API endpoint URL
disable_input bool False Disable tracking of input arguments
disable_output bool False Disable tracking of output results

Contact

For support or questions, contact the founders: founders@agnost.ai

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agnost_mcp-0.1.12.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agnost_mcp-0.1.12-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file agnost_mcp-0.1.12.tar.gz.

File metadata

  • Download URL: agnost_mcp-0.1.12.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for agnost_mcp-0.1.12.tar.gz
Algorithm Hash digest
SHA256 2cb20224cbb81acb694d581d6600b46e61b6acd6a3ecff51f9e1819032a007da
MD5 ba15cc7ff7e71e6840ef0f7553d3f55f
BLAKE2b-256 bf4adce566155677755782eb27fec48076cbf0397785c5d44ac4550706cacab4

See more details on using hashes here.

File details

Details for the file agnost_mcp-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: agnost_mcp-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for agnost_mcp-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9d6d919987fcf0c1f9a7508305b4a68d44aa17cbd198c1fd8e95be3bd3c37115
MD5 e15a035e48da15bc6e64521c76fedcec
BLAKE2b-256 6df81e648fa70482332a3a747e18c9564cd03616d08c1f3650c0ba22c5d5437a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page