Skip to content

docs(fastmcp): add native Python tracing guide - #1080

Merged
nik13 merged 3 commits into
mainfrom
docs/fastmcp-python-native
Nov 2, 2026
Merged

nik13 merged 3 commits into
mainfrom
docs/fastmcp-python-native

Conversation

@nik13

@nik13 nik13 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Add a discoverable Python FastMCP 4.1.x guide using its native OpenTelemetry spans and the standard OTLP/HTTP exporter. The generic MCP guide links to this route without removing support for older or non-native SDKs.

The example configures one provider per process, project resource attributes, both Future AGI authentication headers, and shutdown delivery. It distinguishes Python FastMCP from the unrelated npm package and avoids an additional instrumentor or customer-maintained adapter.

Important behavior

  • Client/server traces can include intermediate MCP SDK transport spans; those are not additional tool executions.
  • Native tool names remain available in span attributes. Native MCP spans can have an Unknown type, and transport session IDs are not automatically conversation IDs.
  • Normal tool arguments/results are not captured by this setup. Native exception details can contain content, and traceAI hide flags do not sanitize this standard-provider route. The guide explains this before setup.
  • The sample MCP server binds to loopback; exporter credentials are not server authentication.

Verification

The new CI workflow executes the page's exact HTTP snippets and real stdio/in-process calls against published FastMCP 4.1.0/Python 3.10 and 4.1.5/Python 3.13, with networking restricted to loopback. Tests assert parent ancestry, one native server execution, resource/auth headers, protobuf plain/gzip export, errors, content behavior and shutdown delivery.

Locally, both six-case runtime suites, the guide contract, integration catalog tests, type checks, link audit and docs build pass. The built guide, active sidebar and catalog search were checked in an isolated browser. Backend semantic aliases were checked against native attributes; no live Future AGI ingestion or product screenshot is claimed.

Only already-published packages are used. No SDK package, release metadata, version, model call or registry publication changes. No product e2e/ harness applies in this documentation repository.

Follow-up: merged current main without dropping the native MCP 2.x guide or catalog entry; added a regression contract for both native routes and refreshed CI to FastMCP 4.1.5 (the current published patch). Both six-case runtime suites, three guide/CI contracts, catalog checks, type check, link audit and full docs build pass locally on the refreshed branch. The latest-version CI assertion was reproduced failing before the matrix update.

Source: the framework tracing audit's fastmcp:python INCOMPLETE finding (native setup/semantics documentation gap).

🤖 Generated with Claude Code

Use the published FastMCP native provider route and pin the runnable guide with loopback-only HTTP, stdio, privacy and shutdown tests.

Co-Authored-By: Claude Code <noreply@anthropic.com>
nik13 and others added 2 commits November 2, 2026 06:32
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@nik13
nik13 merged commit 726ad27 into main Nov 2, 2026
8 checks passed
@nik13
nik13 deleted the docs/fastmcp-python-native branch November 2, 2026 15:14
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