mcp-instana 0.3.1__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_instana-0.7.0/.bob/mcp.json +13 -0
- mcp_instana-0.7.0/CHANGELOG.md +60 -0
- mcp_instana-0.7.0/DOCKER.md +187 -0
- mcp_instana-0.7.0/Dockerfile +60 -0
- mcp_instana-0.7.0/OBSERVABILITY.md +344 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/PKG-INFO +186 -311
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/README.md +181 -308
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/build_multiplatform.sh +26 -5
- mcp_instana-0.7.0/images/edir-kiro-config.png +0 -0
- mcp_instana-0.7.0/images/enable-kiro-mcp.png +0 -0
- mcp_instana-0.7.0/images/kiro-features.png +0 -0
- mcp_instana-0.7.0/images/kiro-prompt.png +0 -0
- mcp_instana-0.7.0/images/open-kiro.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/pyproject-runtime.toml +6 -6
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/pyproject.toml +8 -4
- mcp_instana-0.7.0/schema/db2Database_schema.json +206 -0
- mcp_instana-0.7.0/schema/host_schema.json +387 -0
- mcp_instana-0.7.0/schema/ibmMqQueue_schema.json +93 -0
- mcp_instana-0.7.0/schema/jvmRuntimePlatform_schema.json +445 -0
- mcp_instana-0.7.0/schema/kubernetesDeployment_schema.json +198 -0
- mcp_instana-0.7.0/schema/kubernetesPod_schema.json +441 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/application/application_alert_config.py +393 -136
- mcp_instana-0.7.0/src/application/application_analyze.py +653 -0
- mcp_instana-0.7.0/src/application/application_call_group.py +528 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/application/application_catalog.py +0 -8
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/application/application_global_alert_config.py +275 -57
- mcp_instana-0.7.0/src/application/application_metrics.py +515 -0
- mcp_instana-0.7.0/src/application/application_resources.py +476 -0
- mcp_instana-0.7.0/src/application/application_settings.py +885 -0
- mcp_instana-0.7.0/src/application/application_topology.py +119 -0
- mcp_instana-0.7.0/src/core/custom_dashboard_smart_router_tool.py +135 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/core/server.py +95 -119
- mcp_instana-0.7.0/src/core/smart_router_tool.py +574 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/core/utils.py +17 -8
- mcp_instana-0.7.0/src/custom_dashboard/custom_dashboard_tools.py +422 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/event/events_tools.py +57 -9
- mcp_instana-0.7.0/src/infrastructure/elicitation_handler.py +338 -0
- mcp_instana-0.7.0/src/infrastructure/entity_registry.py +329 -0
- mcp_instana-0.7.0/src/infrastructure/infrastructure_analyze_new.py +600 -0
- mcp_instana-0.3.1/src/infrastructure/infrastructure_analyze.py → mcp_instana-0.7.0/src/infrastructure/infrastructure_analyze_old.py +1 -16
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/infrastructure/infrastructure_catalog.py +37 -32
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/infrastructure/infrastructure_metrics.py +93 -16
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/infrastructure/infrastructure_resources.py +6 -24
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/infrastructure/infrastructure_topology.py +29 -23
- mcp_instana-0.7.0/src/observability.py +29 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/application_settings.py +58 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_alert_config.py +137 -28
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_analyze.py +25 -1
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_global_alert_config.py +72 -19
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_metrics.py +6 -6
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_resources.py +73 -4
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/core/test_utils.py +66 -2
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/application/test_application_alert_config.py +0 -190
- mcp_instana-0.7.0/tests/e2e/application/test_application_metrics.py +250 -0
- mcp_instana-0.7.0/tests/e2e/application/test_application_topology.py +80 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/event/test_events_tools.py +0 -167
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/infrastructure/test_infrastructure_metrics.py +0 -291
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/infrastructure/test_infrastructure_resources.py +0 -44
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/infrastructure/test_infrastructure_topology.py +66 -56
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/server/test_server_integration.py +0 -295
- mcp_instana-0.7.0/tests/infrastructure/test_entity_registry.py +322 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/infrastructure/test_infrastructure_topology.py +7 -3
- mcp_instana-0.7.0/tests/infrastructure/test_two_pass_elicitation.py +392 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/test_application_settings.py +7 -6
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/events/test_events_tools.py +5 -5
- mcp_instana-0.7.0/uv.lock +3814 -0
- mcp_instana-0.3.1/.github/workflows/build-multiplatform.yml +0 -37
- mcp_instana-0.3.1/.github/workflows/build-windows-container.yml +0 -52
- mcp_instana-0.3.1/Dockerfile +0 -119
- mcp_instana-0.3.1/src/application/application_analyze.py +0 -650
- mcp_instana-0.3.1/src/application/application_metrics.py +0 -375
- mcp_instana-0.3.1/src/application/application_resources.py +0 -387
- mcp_instana-0.3.1/src/application/application_settings.py +0 -1807
- mcp_instana-0.3.1/src/application/application_topology.py +0 -119
- mcp_instana-0.3.1/tests/e2e/application/test_application_analyze.py +0 -935
- mcp_instana-0.3.1/tests/e2e/application/test_application_catalog.py +0 -832
- mcp_instana-0.3.1/tests/e2e/application/test_application_metrics.py +0 -1086
- mcp_instana-0.3.1/tests/e2e/application/test_application_resources.py +0 -697
- mcp_instana-0.3.1/tests/e2e/application/test_application_settings.py +0 -1232
- mcp_instana-0.3.1/tests/e2e/application/test_application_topology.py +0 -430
- mcp_instana-0.3.1/tests/e2e/infrastructure/test_infrastructure_analyze.py +0 -1999
- mcp_instana-0.3.1/uv.lock +0 -1332
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/.github/dco.yml +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/.github/workflows/ci.yml +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/.gitignore +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/CONTRIBUTING.md +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/LICENSE.md +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/conftest.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/docs/PRIVACY.md +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/docs/assets/.gitattributes +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/docs/assets/instana.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/architecture.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/call_tools.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/claudeResponse.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/claudeTools.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/copilot.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/copilotResponse.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/kubernetesEvents.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/mcpInstanaFlow.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/images/query_events.png +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/mcpb/.mcpbignore +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/mcpb/manifest.json +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/mcpb/pack.sh +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/pyrightconfig.json +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/run_ruff_check.sh +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/application/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/automation/action_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/automation/action_history.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/core/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/event/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/infrastructure/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/log/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/log/log_alert_configuration.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/application_alerts.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/application_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/application_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/application_resources.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/application/application_topology.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/events/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/events/events_tools.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/infrastructure/infrastructure_analyze.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/infrastructure/infrastructure_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/infrastructure/infrastructure_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/infrastructure/infrastructure_resources.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/infrastructure/infrastructure_topology.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/settings/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/settings/custom_dashboard.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/website/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/website/website_analyze.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/website/website_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/website/website_configuration.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/prompts/website/website_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/settings/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/settings/custom_dashboard_tools.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/website/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/website/website_analyze.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/website/website_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/website/website_configuration.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/src/website/website_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/README.md +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_settings.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/application/test_application_topology.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/automation/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/automation/test_action_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/core/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/core/test_server.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/README.md +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/conftest.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/infrastructure/test_infrastructure_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/pytest.ini +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/run_e2e_tests.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/e2e/utils/test_base_instana_client.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/event/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/event/test_events_tools.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/infrastructure/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/infrastructure/test_infrastructure_analyze.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/infrastructure/test_infrastructure_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/infrastructure/test_infrastructure_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/infrastructure/test_infrastructure_resources.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/log/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/log/test_log_alert_configuration.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/test_application_alerts.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/test_application_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/test_application_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/test_application_resources.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/application/test_application_topology.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/infrastructure/__init__.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/infrastructure/test_infrastructure_analyze.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/infrastructure/test_infrastructure_catalog.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/infrastructure/test_infrastructure_metrics.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/infrastructure/test_infrastructure_resources.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/prompts/infrastructure/test_infrastructure_topology.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/run_all_tests.py +0 -0
- {mcp_instana-0.3.1 → mcp_instana-0.7.0}/tests/run_all_tests_with_coverage.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"Instana MCP Server": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": [
|
|
6
|
+
"mcp-remote", "http://0.0.0.0:8080/mcp",
|
|
7
|
+
"--allow-http",
|
|
8
|
+
"--header", "instana-base-url: https://release-instana.instana.rocks",
|
|
9
|
+
"--header", "instana-api-token: Rc6FxDDGTZmsFWPOTWNQsA"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
### 0.7.0
|
|
3
|
+
|
|
4
|
+
- **Dependency Update:** Refactored Applications and Infrastructure tools for optimized performance.
|
|
5
|
+
|
|
6
|
+
### 0.6.2
|
|
7
|
+
|
|
8
|
+
- **New Feature:** Added header for the User-agent for version tracking of mcp instana.
|
|
9
|
+
|
|
10
|
+
### 0.6.1
|
|
11
|
+
|
|
12
|
+
- **Chore:** Updated README with Website Tools documentation.
|
|
13
|
+
- **Chore:** Added KIRO setup instructions to README.
|
|
14
|
+
|
|
15
|
+
### 0.6.1
|
|
16
|
+
|
|
17
|
+
- **Chore:** Updated README with Website Tools documentation.
|
|
18
|
+
- **Chore:** Added KIRO setup instructions to README.
|
|
19
|
+
|
|
20
|
+
### 0.6.0
|
|
21
|
+
|
|
22
|
+
- **Fix:** Improved accuracy across Application, Infrastructure, and
|
|
23
|
+
Event tools by fixing broken functionality.
|
|
24
|
+
- **Enhancement:** Added multi-architecture Docker image support.
|
|
25
|
+
|
|
26
|
+
### 0.5.0
|
|
27
|
+
|
|
28
|
+
- **New Feature:** Added support for using MCP Instana as an extension
|
|
29
|
+
within AI MCP clients.
|
|
30
|
+
|
|
31
|
+
### 0.4.0
|
|
32
|
+
|
|
33
|
+
- **New Feature:** Added Website Monitoring tools.
|
|
34
|
+
- **Enhancement:** Enhanced Event capabilities with new issue,
|
|
35
|
+
incident, and change retrieval tools.
|
|
36
|
+
|
|
37
|
+
### 0.3.1
|
|
38
|
+
|
|
39
|
+
- **Enhancement:** Optimized Docker image to reduce storage footprint.
|
|
40
|
+
|
|
41
|
+
### 0.3.0
|
|
42
|
+
|
|
43
|
+
- **Enhancement:** Added prompt enable/disable functionality.
|
|
44
|
+
- **New Feature:** Introduced Application Alert Global tools.
|
|
45
|
+
- **New Feature:** Added automation tools.
|
|
46
|
+
- **Fix:** Resolved application analyze tools for better handling of
|
|
47
|
+
payloads.
|
|
48
|
+
- **Enhancement:** Added Docker support.
|
|
49
|
+
|
|
50
|
+
### 0.2.0
|
|
51
|
+
|
|
52
|
+
- **New Feature:** Added comprehensive Application Settings tools.
|
|
53
|
+
- **New Feature:** Introduced the MCP Instana CLI.
|
|
54
|
+
|
|
55
|
+
### 0.1.0
|
|
56
|
+
|
|
57
|
+
- Initial public release of the MCP Server for IBM
|
|
58
|
+
Instana.
|
|
59
|
+
- **New Feature:** Introduced core Monitoring Capabilities
|
|
60
|
+
(Application, Infrastructure, and Event Monitoring).
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Docker Guide for MCP Instana
|
|
2
|
+
|
|
3
|
+
This guide documents everything Docker-related for MCP Instana. Use it when you need more than the quick blurb in `README.md`.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
- Two-stage image defined in `Dockerfile`: a builder installs only runtime dependencies (via `pyproject-runtime.toml` + `uv`), and the runtime stage copies the installed packages plus `src/`.
|
|
8
|
+
- Runtime image is `python:3.11-slim`, runs as non-root `mcpuser`, exposes `8080`, and ships with a health check that curls `http://127.0.0.1:8080/health`.
|
|
9
|
+
- Entry point runs `python -m src.core.server --transport streamable-http`, so clients provide Instana credentials over HTTP headers rather than baking them into the container.
|
|
10
|
+
- `build_multiplatform.sh` automates multi-architecture builds (amd64 + arm64) with Docker Buildx, QEMU, and optional pushes.
|
|
11
|
+
|
|
12
|
+
## Quickstart
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Build a local image (single architecture)
|
|
16
|
+
docker build -t mcp-instana .
|
|
17
|
+
|
|
18
|
+
# Run it (streamable HTTP transport on port 8080)
|
|
19
|
+
docker run --rm -p 8080:8080 mcp-instana
|
|
20
|
+
|
|
21
|
+
# Override the HTTP port exposed by the container
|
|
22
|
+
docker run --rm -e PORT=9090 -p 9090:9090 mcp-instana
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Docker Compose snippet
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
version: '3.8'
|
|
29
|
+
services:
|
|
30
|
+
mcp-instana:
|
|
31
|
+
build: .
|
|
32
|
+
ports:
|
|
33
|
+
- "8080:8080"
|
|
34
|
+
restart: unless-stopped
|
|
35
|
+
healthcheck:
|
|
36
|
+
test: ["CMD", "python", "-c", "import requests; requests.get('http://127.0.0.1:8080/health', timeout=5)"]
|
|
37
|
+
interval: 30s
|
|
38
|
+
timeout: 10s
|
|
39
|
+
retries: 3
|
|
40
|
+
start_period: 40s
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Image anatomy (`Dockerfile`)
|
|
44
|
+
|
|
45
|
+
| Component | Details |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Builder stage | Based on `python:3.11-slim`, installs `uv`, copies `pyproject-runtime.toml`, `pyproject.toml`, `src/`, `README.md`, then runs `pip install .` (runtime deps only). |
|
|
48
|
+
| Runtime stage | Reuses `python:3.11-slim`, copies site-packages and binaries from builder, then copies `src/` only. |
|
|
49
|
+
| User | Non-root `mcpuser` owns `/app`. |
|
|
50
|
+
| Entry point | `python -m src.core.server --transport streamable-http`. Override with `docker run ... -- entrypoint` or `CMD`. |
|
|
51
|
+
| Health check | `python -c "import requests; requests.get('http://127.0.0.1:8080/health', timeout=5)"` every 30s with retries. |
|
|
52
|
+
| Exposed port | `8080` (override with `PORT`). |
|
|
53
|
+
|
|
54
|
+
### Configuration reference
|
|
55
|
+
|
|
56
|
+
| Variable / flag | Default | Notes |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `PORT` | `8080` | Align host port mapping when overriding. |
|
|
59
|
+
| `PYTHONUNBUFFERED` | `1` | Keeps logs unbuffered. Usually leave as-is. |
|
|
60
|
+
| `PYTHONPATH` | `/app` | Ensures `src/` is importable. |
|
|
61
|
+
| `--transport` (CMD arg) | `streamable-http` | Change via `docker run ... -- --transport <mode>`. |
|
|
62
|
+
|
|
63
|
+
## Building images
|
|
64
|
+
|
|
65
|
+
### Single-architecture build (default Docker)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
docker build -t mcp-instana .
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Manual multi-architecture build with Buildx
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# One-time builder setup
|
|
75
|
+
docker buildx create --name multiarch --driver docker-container --use
|
|
76
|
+
docker buildx inspect --bootstrap
|
|
77
|
+
|
|
78
|
+
# Build & push (amd64 + arm64)
|
|
79
|
+
docker buildx build \
|
|
80
|
+
--platform linux/amd64,linux/arm64 \
|
|
81
|
+
-t username/mcp-instana:latest \
|
|
82
|
+
--push .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Using `build_multiplatform.sh`
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
chmod +x build_multiplatform.sh
|
|
89
|
+
# Build local arch (loads result when host is linux/*)
|
|
90
|
+
./build_multiplatform.sh
|
|
91
|
+
|
|
92
|
+
# Build and push multi-arch manifest
|
|
93
|
+
./build_multiplatform.sh --registry username/ --tag v1.0 --push
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The script:
|
|
97
|
+
|
|
98
|
+
1. Installs QEMU emulation via `tonistiigi/binfmt` (required on macOS/Windows for cross-builds).
|
|
99
|
+
2. Creates/bootstraps a Buildx builder named `multiplatform`.
|
|
100
|
+
3. Disables SBOM/attestation for faster builds (can be re-enabled if needed).
|
|
101
|
+
4. Builds the requested platforms; if `--push` is omitted on non-Linux hosts, it falls back to building only the current platform and warns accordingly.
|
|
102
|
+
5. When `--push` is set, it verifies the manifest and performs `docker pull` for both amd64/arm64.
|
|
103
|
+
|
|
104
|
+
#### Script options
|
|
105
|
+
|
|
106
|
+
| Flag | Description | Default |
|
|
107
|
+
| --- | --- | --- |
|
|
108
|
+
| `-n, --name` | Image name | `mcp-instana` |
|
|
109
|
+
| `-t, --tag` | Image tag | `latest` |
|
|
110
|
+
| `-r, --registry` | Registry prefix (e.g., `username/` or `registry.example.com/`) | empty |
|
|
111
|
+
| `-p, --platforms` | Comma-separated platforms | `linux/amd64,linux/arm64` |
|
|
112
|
+
| `--push` | Push manifest to the registry | disabled |
|
|
113
|
+
| `-h, --help` | Show usage and exit | — |
|
|
114
|
+
|
|
115
|
+
## Security posture
|
|
116
|
+
|
|
117
|
+
- Non-root runtime user (`mcpuser`) limits container privileges.
|
|
118
|
+
- Health check ensures orchestration platforms can restart unhealthy pods.
|
|
119
|
+
- No credentials or secrets inside the image; MCP clients supply Instana headers at request time.
|
|
120
|
+
- Runtime dependency set trimmed to ~20 packages, yielding ~266 MB images vs >1 GB for dev installs.
|
|
121
|
+
- Multi-stage build keeps compilers and build artifacts out of the final layer.
|
|
122
|
+
|
|
123
|
+
## Testing & troubleshooting
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Inspect container status (health column)
|
|
127
|
+
docker ps
|
|
128
|
+
|
|
129
|
+
# Hit MCP endpoint directly
|
|
130
|
+
curl http://localhost:8080/mcp/
|
|
131
|
+
|
|
132
|
+
# Test using MCP Inspector
|
|
133
|
+
npx @modelcontextprotocol/inspector http://localhost:8080/mcp/
|
|
134
|
+
|
|
135
|
+
# Logs
|
|
136
|
+
docker logs -f <container_id>
|
|
137
|
+
|
|
138
|
+
# Debug shell (container already has /bin/bash from python:slim)
|
|
139
|
+
docker exec -it <container_id> /bin/bash
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Production deployment
|
|
143
|
+
|
|
144
|
+
1. Keep Instana credentials outside the container; pass them through MCP-compatible clients (Claude Desktop, GitHub Copilot, etc.).
|
|
145
|
+
2. Rely on the built-in HTTP health endpoint (`/health`) for orchestration probes.
|
|
146
|
+
3. Configure persistent logging/metrics at the orchestrator level (CloudWatch, ELK, etc.).
|
|
147
|
+
4. Run at least two replicas and enable rolling updates to avoid downtime.
|
|
148
|
+
5. Regularly rebuild to pick up upstream `python:3.11-slim` security patches.
|
|
149
|
+
|
|
150
|
+
### Kubernetes example
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
apiVersion: apps/v1
|
|
154
|
+
kind: Deployment
|
|
155
|
+
metadata:
|
|
156
|
+
name: mcp-instana
|
|
157
|
+
spec:
|
|
158
|
+
replicas: 2
|
|
159
|
+
selector:
|
|
160
|
+
matchLabels:
|
|
161
|
+
app: mcp-instana
|
|
162
|
+
template:
|
|
163
|
+
metadata:
|
|
164
|
+
labels:
|
|
165
|
+
app: mcp-instana
|
|
166
|
+
spec:
|
|
167
|
+
containers:
|
|
168
|
+
- name: mcp-instana
|
|
169
|
+
image: mcp-instana:latest
|
|
170
|
+
ports:
|
|
171
|
+
- containerPort: 8080
|
|
172
|
+
env:
|
|
173
|
+
- name: PORT
|
|
174
|
+
value: "8080"
|
|
175
|
+
livenessProbe:
|
|
176
|
+
httpGet:
|
|
177
|
+
path: /health
|
|
178
|
+
port: 8080
|
|
179
|
+
initialDelaySeconds: 30
|
|
180
|
+
periodSeconds: 10
|
|
181
|
+
readinessProbe:
|
|
182
|
+
httpGet:
|
|
183
|
+
path: /health
|
|
184
|
+
port: 8080
|
|
185
|
+
initialDelaySeconds: 5
|
|
186
|
+
periodSeconds: 5
|
|
187
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Stage 1: Build stage with minimal runtime dependencies
|
|
2
|
+
FROM docker.io/library/python:3.11-slim AS builder
|
|
3
|
+
|
|
4
|
+
# Install system dependencies needed for building
|
|
5
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
6
|
+
gcc \
|
|
7
|
+
g++ \
|
|
8
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
9
|
+
|
|
10
|
+
# Set working directory
|
|
11
|
+
WORKDIR /app
|
|
12
|
+
|
|
13
|
+
# Copy only the runtime dependency file and source code needed for the build
|
|
14
|
+
COPY pyproject-runtime.toml pyproject.toml
|
|
15
|
+
COPY src ./src
|
|
16
|
+
COPY README.md ./
|
|
17
|
+
|
|
18
|
+
# Install uv for dependency management
|
|
19
|
+
RUN pip install --no-cache-dir uv
|
|
20
|
+
|
|
21
|
+
# Install only runtime dependencies using the minimal pyproject-runtime.toml
|
|
22
|
+
RUN pip install --no-cache-dir .
|
|
23
|
+
|
|
24
|
+
# Stage 2: Runtime stage
|
|
25
|
+
FROM python:3.11-slim AS runtime
|
|
26
|
+
|
|
27
|
+
# Set working directory
|
|
28
|
+
WORKDIR /app
|
|
29
|
+
|
|
30
|
+
# Create a non-root user for security
|
|
31
|
+
RUN groupadd -r mcpuser && useradd -r -g mcpuser mcpuser
|
|
32
|
+
|
|
33
|
+
# Copy only the Python packages from builder (no source code needed)
|
|
34
|
+
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
|
|
35
|
+
COPY --from=builder /usr/local/bin /usr/local/bin
|
|
36
|
+
|
|
37
|
+
# Copy only the source code needed for runtime
|
|
38
|
+
COPY src ./src
|
|
39
|
+
|
|
40
|
+
# Set ownership to non-root user
|
|
41
|
+
RUN chown -R mcpuser:mcpuser /app
|
|
42
|
+
|
|
43
|
+
# Switch to non-root user
|
|
44
|
+
USER mcpuser
|
|
45
|
+
|
|
46
|
+
# Expose the default port (configurable via PORT env var)
|
|
47
|
+
EXPOSE 8080
|
|
48
|
+
|
|
49
|
+
# Set environment variables (no hardcoded secrets)
|
|
50
|
+
ENV PYTHONPATH=/app
|
|
51
|
+
ENV PYTHONUNBUFFERED=1
|
|
52
|
+
ENV PORT=8080
|
|
53
|
+
|
|
54
|
+
# Health check using container's internal network
|
|
55
|
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
|
56
|
+
CMD python -c "import requests; requests.get('http://127.0.0.1:8080/health', timeout=5)" || exit 1
|
|
57
|
+
|
|
58
|
+
# Run the server
|
|
59
|
+
ENTRYPOINT ["python", "-m", "src.core.server"]
|
|
60
|
+
CMD ["--transport", "streamable-http"]
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
# MCP Observability Configuration Guide
|
|
2
|
+
|
|
3
|
+
This document provides comprehensive instructions for enabling and configuring observability in the MCP Instana Server using Traceloop SDK for distributed tracing.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Overview](#overview)
|
|
8
|
+
- [Prerequisites](#prerequisites)
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Configuration](#configuration)
|
|
11
|
+
- [Environment Variables](#environment-variables)
|
|
12
|
+
- [Client-Specific Configurations](#client-specific-configurations)
|
|
13
|
+
- [GitHub Copilot](#github-copilot)
|
|
14
|
+
- [Claude Desktop](#claude-desktop)
|
|
15
|
+
- [Custom MCP Client](#custom-mcp-client)
|
|
16
|
+
- [Starting the Server](#starting-the-server)
|
|
17
|
+
- [Viewing Traces in Instana](#viewing-traces-in-instana)
|
|
18
|
+
- [Troubleshooting](#troubleshooting)
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
MCP-Instana Observability integrates with the Traceloop SDK to provide distributed tracing for your MCP server and client interactions.
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
Before enabling observability, ensure you have:
|
|
27
|
+
|
|
28
|
+
- Traceloop SDK installed (see [Installation](#installation))
|
|
29
|
+
- Access to an Instana instance for viewing spans
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### Install Traceloop SDK
|
|
34
|
+
|
|
35
|
+
If you don't already have it:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Using pip
|
|
39
|
+
pip install traceloop-sdk==0.47.5
|
|
40
|
+
|
|
41
|
+
# Using uv
|
|
42
|
+
uv add traceloop-sdk==0.47.5
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Without this, you'll see warnings like:
|
|
46
|
+
```
|
|
47
|
+
Traceloop requested but not installed. Install with: pip install traceloop-sdk
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
### Environment Variables
|
|
53
|
+
|
|
54
|
+
Observability in MCP-Instana is feature-flag controlled. It will only be enabled if the environment variable `ENABLE_MCP_OBSERVABILITY` is set.
|
|
55
|
+
|
|
56
|
+
#### Main Feature Flag
|
|
57
|
+
|
|
58
|
+
| Variable | Default |
|
|
59
|
+
|----------|---------|
|
|
60
|
+
| `ENABLE_MCP_OBSERVABILITY` | `false` |
|
|
61
|
+
|
|
62
|
+
**Accepted values:**
|
|
63
|
+
- `true`, `1`, `yes`, `on` → enables observability
|
|
64
|
+
- `false`, `0`, `no`, `off` → disables observability (default)
|
|
65
|
+
|
|
66
|
+
**Important:** If this flag is not set (or set to false), MCP observability will remain completely disabled, even if Traceloop and Instana configs are present.
|
|
67
|
+
|
|
68
|
+
#### Traceloop Configuration Variables
|
|
69
|
+
|
|
70
|
+
| Variable | Description | Example |
|
|
71
|
+
|----------|-------------|---------|
|
|
72
|
+
| `TRACELOOP_BASE_URL` | Your Instana OTLP endpoint URL | `https://otlp-pink-saas.instana.rocks:4317` |
|
|
73
|
+
| `TRACELOOP_HEADERS` | Authentication header for Instana | `x-instana-key=your_instana_key` |
|
|
74
|
+
| `OTEL_EXPORTER_OTLP_INSECURE` | Whether to use insecure connection | `false` (recommended) |
|
|
75
|
+
|
|
76
|
+
#### Export Modes
|
|
77
|
+
|
|
78
|
+
You can export traces to Instana in two different modes:
|
|
79
|
+
|
|
80
|
+
**Agent Mode :**
|
|
81
|
+
|
|
82
|
+
Export traces to a local Instana agent running on your machine:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
export TRACELOOP_BASE_URL=<instana-agent-host>:4317
|
|
86
|
+
export TRACELOOP_HEADERS="api-key=<api-key>""
|
|
87
|
+
export OTEL_EXPORTER_OTLP_INSECURE=true
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Agentless Mode (Direct to Backend):**
|
|
91
|
+
|
|
92
|
+
Export traces directly to the Instana backend:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
export TRACELOOP_BASE_URL=<instana-otlp-endpoint>:4317
|
|
96
|
+
export TRACELOOP_HEADERS="x-instana-key=<agent-key>"
|
|
97
|
+
export OTEL_EXPORTER_OTLP_INSECURE=false
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Note:** Replace the values with your actual Instana configuration:
|
|
101
|
+
- For agentless mode, use your Instana backend OTLP endpoint and API key
|
|
102
|
+
- For agent mode, ensure your local Instana agent is running and accessible
|
|
103
|
+
|
|
104
|
+
### Client-Specific Configurations
|
|
105
|
+
|
|
106
|
+
Depending on your client (GitHub Copilot, Claude Desktop, or a custom MCP client), configuration differs for HTTP mode and STDIO mode. In all cases, ensure the flag `ENABLE_MCP_OBSERVABILITY=true` is set.
|
|
107
|
+
|
|
108
|
+
#### GitHub Copilot
|
|
109
|
+
|
|
110
|
+
##### HTTP Mode (mcp.json)
|
|
111
|
+
|
|
112
|
+
For Streamable HTTP mode, configure `.vscode/mcp.json`:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"servers": {
|
|
117
|
+
"Instana MCP Server": {
|
|
118
|
+
"command": "npx",
|
|
119
|
+
"args": [
|
|
120
|
+
"mcp-remote", "http://0.0.0.0:8080/mcp/",
|
|
121
|
+
"--allow-http",
|
|
122
|
+
"--header", "instana-base-url: <your-instana-url>",
|
|
123
|
+
"--header", "instana-api-token: <your-instana-token>"
|
|
124
|
+
],
|
|
125
|
+
"env": {
|
|
126
|
+
"ENABLE_MCP_OBSERVABILITY": "true",
|
|
127
|
+
"TRACELOOP_BASE_URL": "<your-instana-otlp-url>",
|
|
128
|
+
"TRACELOOP_HEADERS": "x-instana-key=<your-instana-key>",
|
|
129
|
+
"OTEL_EXPORTER_OTLP_INSECURE": "false"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Note:** Replace the following values:
|
|
137
|
+
- `<your-instana-url>`: Your Instana instance URL (e.g., `https://your-instance.instana.io`)
|
|
138
|
+
- `<your-instana-token>`: Your Instana API token
|
|
139
|
+
- `<your-instana-otlp-url>`: Your Instana OTLP endpoint (for ex - `https://otlp-pink-saas.instana.rocks:4317`)
|
|
140
|
+
- `<your-instana-key>`: Your Instana authentication key
|
|
141
|
+
|
|
142
|
+
##### STDIO Mode (mcp.json)
|
|
143
|
+
|
|
144
|
+
For STDIO mode, configure `.vscode/mcp.json`:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"servers": {
|
|
149
|
+
"Instana MCP Server": {
|
|
150
|
+
"command": "uv",
|
|
151
|
+
"args": [
|
|
152
|
+
"run",
|
|
153
|
+
"src/core/server.py",
|
|
154
|
+
"--tools", "infra"
|
|
155
|
+
],
|
|
156
|
+
"cwd": "<path-to-mcp-instana>",
|
|
157
|
+
"env": {
|
|
158
|
+
"INSTANA_BASE_URL": "<your-instana-url>",
|
|
159
|
+
"INSTANA_API_TOKEN": "<your-instana-token>",
|
|
160
|
+
"ENABLE_MCP_OBSERVABILITY": "true",
|
|
161
|
+
"TRACELOOP_BASE_URL": "<your-instana-otlp-url>",
|
|
162
|
+
"TRACELOOP_HEADERS": "x-instana-key=<your-instana-key>",
|
|
163
|
+
"OTEL_EXPORTER_OTLP_INSECURE": "false"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Note:** Replace `<path-to-mcp-instana>` with the absolute path to your mcp-instana project directory.
|
|
171
|
+
|
|
172
|
+
#### Claude Desktop
|
|
173
|
+
|
|
174
|
+
##### HTTP Mode (claude_desktop_config.json)
|
|
175
|
+
|
|
176
|
+
For Streamable HTTP mode, configure Claude Desktop:
|
|
177
|
+
|
|
178
|
+
**File Locations:**
|
|
179
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
180
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"mcpServers": {
|
|
185
|
+
"Instana MCP Server": {
|
|
186
|
+
"command": "npx",
|
|
187
|
+
"args": [
|
|
188
|
+
"mcp-remote", "http://0.0.0.0:8080/mcp/",
|
|
189
|
+
"--allow-http",
|
|
190
|
+
"--header", "instana-base-url: <your-instana-url>",
|
|
191
|
+
"--header", "instana-api-token: <your-instana-token>"
|
|
192
|
+
],
|
|
193
|
+
"env": {
|
|
194
|
+
"ENABLE_MCP_OBSERVABILITY": "true",
|
|
195
|
+
"TRACELOOP_BASE_URL": "<your-instana-otlp-url>",
|
|
196
|
+
"TRACELOOP_HEADERS": "x-instana-key=<your-instana-key>",
|
|
197
|
+
"OTEL_EXPORTER_OTLP_INSECURE": "false"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
##### STDIO Mode (claude_desktop_config.json)
|
|
205
|
+
|
|
206
|
+
For STDIO mode:
|
|
207
|
+
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"mcpServers": {
|
|
211
|
+
"Instana MCP Server": {
|
|
212
|
+
"command": "uv",
|
|
213
|
+
"args": [
|
|
214
|
+
"--directory",
|
|
215
|
+
"<path-to-mcp-instana>",
|
|
216
|
+
"run",
|
|
217
|
+
"src/core/server.py"
|
|
218
|
+
],
|
|
219
|
+
"cwd": "<path-to-mcp-instana>",
|
|
220
|
+
"env": {
|
|
221
|
+
"INSTANA_BASE_URL": "<your-instana-url>",
|
|
222
|
+
"INSTANA_API_TOKEN": "<your-instana-token>",
|
|
223
|
+
"ENABLE_MCP_OBSERVABILITY": "true",
|
|
224
|
+
"TRACELOOP_BASE_URL": "<your-instana-otlp-url>",
|
|
225
|
+
"TRACELOOP_HEADERS": "x-instana-key=<your-instana-key>",
|
|
226
|
+
"OTEL_EXPORTER_OTLP_INSECURE": "false"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### Custom MCP Client
|
|
234
|
+
|
|
235
|
+
For custom MCP clients:
|
|
236
|
+
|
|
237
|
+
- **HTTP Mode** → Use the same setup as GitHub Copilot HTTP (JSON config with headers + observability env vars)
|
|
238
|
+
- **STDIO Mode** → Use the same setup as Claude STDIO (JSON config with server command, env vars, and observability flag)
|
|
239
|
+
|
|
240
|
+
## Starting the Server
|
|
241
|
+
|
|
242
|
+
After updating configurations, you'll need to restart components. The steps differ by mode:
|
|
243
|
+
|
|
244
|
+
### Streamable HTTP Mode
|
|
245
|
+
|
|
246
|
+
**Step 1: Export Environment Variables (if needed)**
|
|
247
|
+
|
|
248
|
+
In case the environment variables are not taking effect, export them in the mcp-instana server terminal:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
export ENABLE_MCP_OBSERVABILITY=true
|
|
252
|
+
export TRACELOOP_BASE_URL=<your-instana-otlp-url>
|
|
253
|
+
export TRACELOOP_HEADERS="x-instana-key=<your-instana-key>"
|
|
254
|
+
export OTEL_EXPORTER_OTLP_INSECURE=false
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Note:** `TRACELOOP_BASE_URL` should be your Instana OTLP URL (e.g., `https://otlp-pink-saas.instana.rocks:4317`)
|
|
258
|
+
|
|
259
|
+
**Step 2: Start the Server**
|
|
260
|
+
|
|
261
|
+
Start the server explicitly with streamable HTTP transport:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# Using development installation
|
|
265
|
+
uv run src/core/server.py --transport streamable-http
|
|
266
|
+
|
|
267
|
+
# Using PyPI installation
|
|
268
|
+
mcp-instana --transport streamable-http
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Step 3: Restart the Client**
|
|
272
|
+
|
|
273
|
+
Restart the client (e.g., GitHub Copilot, Claude Desktop, or custom MCP client) using its configuration file.
|
|
274
|
+
|
|
275
|
+
### STDIO Mode
|
|
276
|
+
|
|
277
|
+
In STDIO mode, you don't need to start the MCP server manually. The client (GitHub Copilot, Claude Desktop, or custom MCP client) will directly launch the MCP server process based on its configuration file.
|
|
278
|
+
|
|
279
|
+
Simply start the client, and it will take care of invoking the server under the hood.
|
|
280
|
+
|
|
281
|
+
**Important Note:** In some clients, the root span may not appear automatically unless the session is fully closed:
|
|
282
|
+
|
|
283
|
+
- **Claude Desktop** → Quit the Claude Desktop app after finishing your session
|
|
284
|
+
- **GitHub Copilot** → Stop the MCP server process after your workflow
|
|
285
|
+
|
|
286
|
+
If the session remains open, the root span will be missing from traces.
|
|
287
|
+
|
|
288
|
+
## Viewing Traces in Instana
|
|
289
|
+
|
|
290
|
+
Once observability is enabled and the server is running, you can view traces in Instana:
|
|
291
|
+
|
|
292
|
+
1. **Log in to Instana**
|
|
293
|
+
2. **Navigate to Analytics** → Enable "Show internal calls" (bottom left)
|
|
294
|
+
3. **Add Filter**: Service Name → `Instana-MCP-Server` (the app name you used with `traceloop.init()`)
|
|
295
|
+
4. **Explore traces**:
|
|
296
|
+
- Filter by time range
|
|
297
|
+
- Drill into individual spans
|
|
298
|
+
- Analyze request flows end-to-end
|
|
299
|
+
|
|
300
|
+
This visualization makes it easy to trace requests and identify performance bottlenecks.
|
|
301
|
+
|
|
302
|
+
### Key Benefits
|
|
303
|
+
|
|
304
|
+
Enabling observability brings immediate advantages:
|
|
305
|
+
|
|
306
|
+
- **End-to-End Visibility** – See client-to-server flows
|
|
307
|
+
- **Performance Optimization** – Identify bottlenecks with real data
|
|
308
|
+
- **Error Tracking** – Pinpoint failure points quickly
|
|
309
|
+
- **System Understanding** – Learn how components interact
|
|
310
|
+
|
|
311
|
+
## Troubleshooting
|
|
312
|
+
|
|
313
|
+
### No Spans Visible?
|
|
314
|
+
|
|
315
|
+
If you don't see any spans in Instana:
|
|
316
|
+
|
|
317
|
+
1. **Verify the feature flag is set:**
|
|
318
|
+
```bash
|
|
319
|
+
echo $ENABLE_MCP_OBSERVABILITY
|
|
320
|
+
# Should output: true
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
2. **Check Traceloop SDK installation:**
|
|
324
|
+
```bash
|
|
325
|
+
pip show traceloop-sdk
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
3. **Confirm Instana configuration:**
|
|
329
|
+
- Verify `TRACELOOP_BASE_URL` is correct
|
|
330
|
+
- Verify `TRACELOOP_HEADERS` contains valid authentication key
|
|
331
|
+
- Check `OTEL_EXPORTER_OTLP_INSECURE` is set appropriately
|
|
332
|
+
|
|
333
|
+
4. **Check server logs for errors:**
|
|
334
|
+
- Look for Traceloop initialization messages
|
|
335
|
+
- Check for connection errors to Instana
|
|
336
|
+
|
|
337
|
+
### Environment Variables Not Taking Effect?
|
|
338
|
+
|
|
339
|
+
If environment variables don't seem to work:
|
|
340
|
+
|
|
341
|
+
1. **For HTTP mode:** Export variables in the server terminal before starting
|
|
342
|
+
2. **For STDIO mode:** Ensure variables are in the client configuration file
|
|
343
|
+
3. **Restart both server and client** after configuration changes
|
|
344
|
+
4. **Check for typos** in variable names (they are case-sensitive)
|