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

Basic Usage

import agnost
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.track(mcp, org_id="your-organization-id")

Configuration

You can customize the SDK behavior using the configuration object:

import agnost

# Create a custom configuration
config = agnost.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.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-0.1.8.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

agnost-0.1.8-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file agnost-0.1.8.tar.gz.

File metadata

  • Download URL: agnost-0.1.8.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agnost-0.1.8.tar.gz
Algorithm Hash digest
SHA256 f3b784a766c0afd83eea3e13256a6c3928c02506aed8aa18c6daeb280de864e2
MD5 a213dd8b25cf89f0e1cbbf843f2b9a3f
BLAKE2b-256 6a9b06311f487b0a974d4a2b39f4823f3995b0be3c7c6b8edffad33098e09364

See more details on using hashes here.

File details

Details for the file agnost-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: agnost-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agnost-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c87dfb43708b0d4075a97035efb71178f5c20bf9a1b7c9c63c79a345d268380f
MD5 baf48dc3bbf46b842f7272029979be6d
BLAKE2b-256 57ba4b6b0e2f2795e516fcca83c6d5e9b31fc789d05746ea8e0253b8c1defbd4

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