Skip to main content
Glama
ajragusa

perfsonar-mcp

by ajragusa

perfsonar-mcp

MCP (Model Context Protocol) server for perfSONAR - Query measurements, discover testpoints, and schedule network tests.

πŸš€ Features

Measurement Archive Queries

  • Query historical measurements with filters

  • Get throughput, latency, and packet loss data

  • Access raw time-series data with summaries

  • Discover available measurement types

Lookup Service Integration

  • Find perfSONAR testpoints globally

  • Search by location (city, country)

  • Locate pScheduler services for testing

Test Scheduling (pScheduler)

  • Schedule throughput tests (iperf3)

  • Schedule latency tests (owping)

  • Schedule RTT tests (ping)

  • Monitor test status and retrieve results

πŸ“¦ Installation

pip install -e .

For development with additional tools:

pip install -e '.[dev]'

βš™οΈ Configuration

Required environment variable:

export PERFSONAR_HOST=perfsonar.example.com

Optional:

export LOOKUP_SERVICE_URL=https://lookup.perfsonar.net/lookup export PSCHEDULER_URL=https://perfsonar.example.com/pscheduler

πŸƒ Usage

Local

python -m perfsonar_mcp # or perfsonar-mcp

Docker

docker-compose up -d

Kubernetes

helm install perfsonar-mcp ./helm/perfsonar-mcp \ --set config.perfsonarHost=perfsonar.example.com

πŸ€– Claude Desktop Integration

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{ "mcpServers": { "perfsonar": { "command": "python", "args": ["-m", "perfsonar_mcp"], "env": { "PERFSONAR_HOST": "your-perfsonar-host.example.com" } } } }

πŸ”§ Available Tools (13)

Measurement Archive (6)

  • query_measurements - Search measurements

  • get_throughput - Throughput data

  • get_latency - Latency data

  • get_packet_loss - Packet loss data

  • get_measurement_data - Raw time-series

  • get_available_event_types - List types

Lookup Service (2)

  • lookup_testpoints - Find testpoints

  • find_pscheduler_services - Find pScheduler

pScheduler (5)

  • schedule_throughput_test - Run throughput test

  • schedule_latency_test - Run latency test

  • schedule_rtt_test - Run RTT test

  • get_test_status - Check status

  • get_test_result - Get results

πŸ’‘ Example Queries

Ask Claude:

"Find perfSONAR testpoints in Europe"

"Schedule a 30-second throughput test to host.example.com"

"Get hourly throughput averages between host1 and host2 for the last week"

πŸ—οΈ Architecture

AI Agent (Claude) ↓ MCP Protocol (stdio) perfSONAR MCP Server (Python) β”œβ”€β”€ Measurement Archive Client β”œβ”€β”€ Lookup Service Client └── pScheduler Client ↓ perfSONAR Services

πŸ› οΈ Development

Logging

The server includes comprehensive logging for development and debugging. By default, logs are written to stderr at INFO level.

To enable DEBUG logging for more detailed output:

import logging logging.basicConfig(level=logging.DEBUG)

Or set the log level via environment variable:

export PYTHONLOGLEVEL=DEBUG python -m perfsonar_mcp

Log output includes:

  • Server initialization and configuration

  • API requests and responses

  • Tool invocations with arguments

  • Error details with stack traces

DevContainer

Open in VS Code β†’ Reopen in Container

Local Development

# Install with dev dependencies pip install -e '.[dev]' # Format code black src/perfsonar_mcp/ # Lint code ruff check src/perfsonar_mcp/ # Type check mypy src/perfsonar_mcp/ # Run tests pytest tests/

πŸ“š Documentation

🌐 Resources

πŸ“„ License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajragusa/perfsonar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server