Shared plumbing for FABRIC MCP servers — token authentication, Prometheus instrumentation, and structured logging
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"fabric-mcp-common","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# fabric-mcp-common Shared plumbing for FABRIC MCP servers: **token authentication**, **Prometheus instrumentation**, and **structured logging**. Extracted from [`fabric_api_mcp`](https://github.com/fabric-testbed/fabric_api_mcp) so that new MCP implementations get this for free instead of reimplementing bearer extraction, JWT claim decoding, local-vs-server token resolution, metric definitions, and identity plumbing for logs and dashboards. The point isn't only code reuse. Because every adopting server reports the **same metric names and log fields**, one Grafana dashboard works against all of them — and that dashboard ships in this package. - **No third-party dependencies** in the core (`auth` + `logging`): pure standard library. - **Everything heavier is an extra** — Prometheus, JWKS verification, FastMCP. - **Framework adapters** for FastMCP and Starlette/ASGI, imported on demand. - **Never logs a token.** Every `__repr__`, log-field helper and parameter sanitiser is redacted by construction. | Subpackage | Contents | Needs | | :-- | :-- | :-- | | `fabric_mcp_common.auth` | bearer extraction, JWT claims, token sources, JWKS verification | stdlib (`[verify]` for signatures) | | `fabric_mcp_common.metrics` | the `mcp_*` metric contract, ASGI middleware, bundled dashboard | `[metrics]` | | `fabric_mcp_common.logging` | JSON formatter, level wiring, tool-logging decorator | stdlib | | `fabric_mcp_common.integrations` | FastMCP and Starlette adapters | `[fastmcp]` for FastMCP | --- ## Install ```bash pip install fabric_mcp_common # auth + logging (no dependencies) pip install "fabric_mcp_common[metrics]" # + Prometheus instrumentation pip install "fabric_mcp_common[fastmcp]" # + FastMCP request-context adapter pip install "fabric_mcp_common[verify]" # + CredMgr JWKS signature verification pip install "fabric_mcp_common[all]" # everything ``` --- ## Quick start ### 1. Authenticate an MCP tool call …
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.