Skip to content

docs(mcp): add native Python client and server tracing guide - #1087

Merged
nik13 merged 2 commits into
mainfrom
docs/mcp-python-native-route
Nov 2, 2026
Merged

nik13 merged 2 commits into
mainfrom
docs/mcp-python-native-route

Conversation

@nik13

@nik13 nik13 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a native-first Python MCP guide using the released MCP 2.3+ SDK and standard OpenTelemetry APIs. A local calculator demonstrates client/server spans without model credentials, Node.js, traceAI instrumentation, or a copied bridge.

  • Explicit OTLP/HTTP trace endpoint, both Future AGI auth headers, and Observe project resource attributes.
  • Runnable telemetry configuration, stdio server, and client; shutdown delivery in both processes.
  • Explain server-side setup, client/server span pairs, tool classification, and native error privacy. FI_HIDE_* does not control native SDK telemetry.
  • Preserve existing MCP 1.x propagation instructions, its floor-specific Pydantic constraint, and all TypeScript setup. The old combined guide links to native Python first and bounds its legacy Python SDK to 1.x.
  • Add the native guide to the catalog/sidebar using the existing MCP logo.
  • Add real-snippet OTLP tests and CI for Python 3.11/3.13, declared native floor 2.3.0 and latest 2.x, with loopback-only network namespaces.

Validation

Local runtime/browser checks used an outbound-network-denied OS sandbox, synthetic credentials and isolated homes/profiles. Public package installation occurred separately.

  • Exact snippets in clean Python 3.11 and 3.13 environments without traceAI installed: 3 tests pass in each. Tests exercise real stdio processes, success, failure and four concurrent tool calls; decode OTLP protobuf; verify one client/server pair per tool call, propagated parent/trace IDs, native execute_tool/name attributes, project resource, both auth headers, absent successful argument/result attributes, error status and shutdown delivery.
  • Existing traceAI-mcp propagation regressions: 48 passed on 1.8.1 (Pydantic 2.11.10) and 48 passed on latest 2.3.0. Companion SDK README correction has a failing-first test for its old automatic-all-requests promise.
  • Docs catalog/navigation tests and TypeScript catalog check pass. Link audit: zero broken navigation/content links. Astro + Pagefind build passes (existing redirect-page HTML warnings remain).
  • Isolated desktop Chromium check passes: rendered page, code blocks, native link from old guide, searchable catalog entry, no page errors or horizontal overflow. The rendered page was visually inspected.
  • Tool classification checked against backend source mapping gen_ai.operation.name=execute_tool to TOOL; no native adapter or duplicate operation instrumentation is added.

Release and scope

All installed packages are already published: MCP 2.3.0, standard OTel packages, and traceAI-mcp 0.1.3. No new SDK package/release dependency. This is the mcp SDK, not Python fastmcp (separate #1080) or TypeScript MCP/FastMCP.

No real Cloud ingestion or Future AGI application screenshot is claimed; tests use loopback OTLP and source-verified mapping. No registry publish, workflow dispatch, merge, or issue/label changes. The new guide should land before the companion README correction: future-agi/traceAI#537.

🤖 Generated with Claude Code

nik13 and others added 2 commits November 2, 2026 03:58
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@nik13
nik13 merged commit 727aadf into main Nov 2, 2026
6 checks passed
@nik13
nik13 deleted the docs/mcp-python-native-route branch November 2, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant