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.0.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.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for instana_wrapper_mcp_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3f2342e9eaff12d458bfe6083929ba2bc70ffa198aad92292f53e6beac866f5a
MD5 2fd46197dcc9376a75ea2ea072036d5a
BLAKE2b-256 d1b091d1c77bca326a6d5ba800a24ab86115f755f8748a95f8d4ce6ed3883b9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for instana_wrapper_mcp_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a5c25ed3e15d420c671ae5595b4e9c476bef7c08348041489d65c7d1db800f2
MD5 28ee15d0bae8c9e9d9088e930387680c
BLAKE2b-256 1dffe2e9a63f9468b75ec75b76276e5f4117e133692166a7c5f3b5f11dde6897

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