npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@frontmcp/observability

v1.6.1

Published

OpenTelemetry instrumentation, structured JSON logging, and request log objects for FrontMCP

Readme

@frontmcp/observability

OpenTelemetry instrumentation, structured JSON logging, and Prometheus metrics for FrontMCP servers.

NPM

What you get

Install the plugin and every MCP request produces a trace span, a structured log line, and counters — without touching your tool code.

  • Traces — W3C trace context propagated across the request pipeline, with MCP-specific span attributes (tool name, session, transport, RPC method).
  • Logs — one structured JSON object per request; ready for Datadog, Loki, CloudWatch, or anything that reads JSON from stdout.
  • Metrics — counters and gauges exposed in Prometheus or JSON format.
  • Process stats — memory, event-loop lag, and uptime.

Install

npm install @frontmcp/observability

Usage

import { ObservabilityPlugin } from '@frontmcp/observability';
import { FrontMcp } from '@frontmcp/sdk';

@FrontMcp({
  info: { name: 'my-server', version: '1.0.0' },
  apps: [MyApp],
  plugins: [ObservabilityPlugin],
})
class Server {}

Configure

plugins: [
  ObservabilityPlugin.configure({
    logging: { level: 'info', includeRequestBody: false },
    otel: { serviceName: 'my-server', endpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT },
  }),
];

Do not log request bodies in production unless you have reviewed them for PII — tool arguments frequently carry user data.

Exposing metrics

import { PROMETHEUS_CONTENT_TYPE, renderPrometheusExposition } from '@frontmcp/observability';

http: {
  routes: [
    {
      method: 'GET',
      path: '/metrics',
      handler: (_req, res) => {
        res.setHeader('Content-Type', PROMETHEUS_CONTENT_TYPE);
        res.status(200).send(renderPrometheusExposition());
      },
    },
  ];
}

renderJsonExposition() returns the same data as JSON when you would rather scrape structured output.

/metrics is unauthenticated in the snippet above. Bind it to an internal interface, or put it behind auth, before exposing the server publicly.

Key exports

| Export | Purpose | | ---------------------------------------------------- | --------------------------------------------------- | | ObservabilityPlugin | The plugin — add it to plugins: [] | | setupOTel | Wire an OTel SDK yourself instead of via the plugin | | FrontMcpPropagator | W3C trace-context propagator for FrontMCP contexts | | McpAttributes, RpcAttributes, HttpAttributes | Semantic-convention attribute keys | | renderPrometheusExposition, renderJsonExposition | Metrics rendering | | ProcessStatsCollector | Memory / event-loop / uptime sampling | | reportStartup | Emit a structured boot record |

Trace context over MCP

Protocol revision 2026-07-28 carries OpenTelemetry context in the request _meta (traceparent, tracestate, baggage) per SEP-414, and FrontMCP echoes it back on the result. A client can therefore stitch its span to the server's without an out-of-band correlation id — see the protocol versions guide.

Full guide: Observability · Metrics

License

Apache-2.0