Skip to main content

Instana MCP wrapper that fixes WatsonX Orchestrator parameter stringification

Project description

Instana Wrapper MCP Server

Wrapper MCP server that fixes WatsonX Orchestrator parameter stringification issues for Instana tools.

Problem

WatsonX Developer Edition stringifies dictionary parameters when calling MCP tools, but the official Instana MCP server expects native Python dictionaries. This wrapper parses the stringified parameters and calls the actual Instana MCP server with the correct format.

Solution

This wrapper provides 5 critical Instana tools with parameter parsing:

  1. get_host_metrics - Get CPU, memory, disk metrics for a host
  2. get_application_metrics - Get application performance metrics
  3. get_incidents - Get critical incidents/alerts
  4. get_issues - Get warnings and issues
  5. get_changes - Get deployment and configuration changes

Installation

# Install from PyPI (after publishing)
pip install instana-wrapper-mcp-server

# Or install from local directory
cd instana-wrapper-mcp-server
pip install -e .

Usage with WatsonX Orchestrator

1. Import Toolkit

orchestrate toolkits import \
  --kind mcp \
  --name instana-wrapper \
  --description "Instana monitoring wrapper with parameter parsing" \
  --package "instana-wrapper-mcp-server" \
  --command "uvx instana-wrapper-mcp-server --transport stdio" \
  --tools "*" \
  --app-id instana

2. Add to Agent

In WatsonX UI:

  1. Open your agent
  2. Go to Tools section
  3. Add instana-wrapper toolkit
  4. Select the tools you need

3. Test

Ask your agent:

"Get CPU and memory metrics for host t3992-dev1-db-node01-par01-dev"
"Show me incidents for host t3992-dev1-db-node01-par01-dev"
"Get application metrics for PDWDBT"

Environment Variables

# Required - Instana API credentials
INSTANA_API_TOKEN=your-api-token
INSTANA_BASE_URL=https://your-instana-instance.instana.io

Architecture

WatsonX Agent
    ↓ (stringified params)
Instana Wrapper MCP Server
    ↓ (parse JSON strings)
    ↓ (convert to dicts)
Official Instana MCP Server
    ↓ (call Instana API)
Instana Backend

Tools

get_host_metrics

Get infrastructure metrics for a specific host.

Parameters:

  • hostname (string): Hostname or IP address
  • metrics (string): JSON array of metrics, e.g., ["cpu.used", "memory.used"]
  • time_range (string, optional): Time range like "1h", "24h", default "1h"

Example:

{
  "hostname": "t3992-dev1-db-node01-par01-dev",
  "metrics": "[\"cpu.used\", \"memory.used\", \"disk.used\"]",
  "time_range": "1h"
}

get_application_metrics

Get application performance metrics.

Parameters:

  • application_name (string): Application name
  • metrics (string): JSON array of metrics
  • time_range (string, optional): Time range, default "1h"

Example:

{
  "application_name": "PDWDBT",
  "metrics": "[\"calls\", \"latency\", \"errors\"]",
  "time_range": "24h"
}

get_incidents

Get critical incidents for a host or application.

Parameters:

  • query (string, optional): Filter query
  • time_range (string, optional): Time range, default "24h"
  • max_results (integer, optional): Max results, default 50

Example:

{
  "query": "entity.host.name:t3992-dev1-db-node01-par01-dev",
  "time_range": "24h",
  "max_results": 10
}

get_issues

Get warnings and issues.

Parameters:

  • query (string, optional): Filter query
  • time_range (string, optional): Time range, default "24h"
  • max_results (integer, optional): Max results, default 50

get_changes

Get deployment and configuration changes.

Parameters:

  • query (string, optional): Filter query
  • time_range (string, optional): Time range, default "24h"
  • max_results (integer, optional): Max results, default 50

Development

# Clone repo
git clone <repo-url>
cd instana-wrapper-mcp-server

# Install dependencies
pip install -e .

# Test locally
INSTANA_API_TOKEN=xxx INSTANA_BASE_URL=xxx python -m instana_wrapper_mcp_server

Publishing to PyPI

# Build
python -m build

# Upload
python -m twine upload dist/*

Related Projects

License

MIT

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

instana_wrapper_mcp_server-1.0.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

instana_wrapper_mcp_server-1.0.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file instana_wrapper_mcp_server-1.0.1.tar.gz.

File metadata

File hashes

Hashes for instana_wrapper_mcp_server-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8a59a0d2c28948a0c408eef78b14558b2b0c3a6a5768e8403ae8b982821c0ee6
MD5 ac4a771662eb82ddbc0edfa3e05f73c6
BLAKE2b-256 8fab0842d8f75621af48e75147d08ee60703271b485abcd37c4db668aaf3e410

See more details on using hashes here.

File details

Details for the file instana_wrapper_mcp_server-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for instana_wrapper_mcp_server-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d212326a3bb0feb9059da5e869c2d7de62d7658b84923649efe177ea6e29f71
MD5 4dc7073f873c8f6263376d8bb0404b4a
BLAKE2b-256 db1d373f132ed38abfe901fd11ede74354153fd916a5c731faa1ef70d5f2a5fe

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