An open source agent observability platform records each agent run as a tree of model calls, tool calls and retrievals, with the exact prompt, completion and cost of every step, as the mcpd home page describes it. According to the mcpd README, mcpd is one: a daemon with nothing to adopt, not a proxy. It works with any framework, language and model provider, and nothing travels through it to reach a model.
Your agent works on your laptop, then misbehaves in production. One bad answer is buried in thousands of runs, and nobody can attribute the bill to a step.
After reading, you can send a first trace with stock OpenTelemetry packages and read each step’s prompt and completion. You can also price a step, find one bad run, and decide what to operate, solo or as a platform team.
Key Takeaways
- Setup is an OpenTelemetry exporter, and mcpd reads
gen_ai.*andllm.*.- Cost is priced once per step at ingest; an unknown model has no cost, not zero.
- Monitors, evaluated every 60 seconds, latch and resolve only on a real reading. Scores and feedback are never averaged.
What is an open source agent observability platform, and how does it differ from logs and traces?
Agent observability records each agent run as a tree of model calls, tool calls and retrievals, storing the exact prompt and completion of every step with its latency, tokens and cost. Logs, metrics and traces show that a request was slow or failed. The payload shows why the agent chose what it did.
Infrastructure observability asks whether a service is up and fast. A normal trace can say a request returned 200 in 40 ms, yet the wrong answer lives inside the payload.
mcpd’s concepts guide defines the vocabulary. The mcpd home page puts the shape plainly: a run is a tree of model calls, tool calls and retrievals, and you open any step to read the exact prompt and answer.
A refund agent that calls an order-lookup tool again and again shows the difference. Every HTTP request returns 200, the logs show healthy lookups and the latency chart is flat. The span tree shows the loop:
refund_agent (root span)
chat
tool lookup_order 200
chat
tool lookup_order 200
tool lookup_order 200Open the second chat span: the prompt holds the lookup result, and the completion asks for the same lookup again.
Two standards make the tree portable. The W3C Trace Context specification says the traceparent HTTP header “identifies the incoming request in a tracing system”. That header is how one trace id and a parent span id follow a request from your API into the agent service and on to its tools.
mcpd reads gen_ai.* and the OpenInference llm.* names, so existing instrumentation works unchanged, as the mcpd OpenTelemetry docs state.
How do you set up an open source agent observability platform without an SDK?
With an open source agent observability platform, setup takes four steps.
The OpenTelemetry exporter specification names OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL as the standard variables. The OTLP specification defines both gRPC and HTTP transports. Any exporter that follows the specification reads them.
- Install the stock OpenTelemetry packages. No mcpd package is needed.
pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http-
Create a project and a key at the hosted app, then set the two standard variables in your agent’s environment. The mcpd OpenTelemetry docs page gives the endpoint, the protocol value and how the key is passed. Copy them from there: a wrongly passed key makes the export fail and leaves the interface empty.
-
Wrap the model call in a span that carries the
gen_ai.*attributes. Take the model identifier from your provider’s documentation; Anthropic’s model overview listsclaude-sonnet-4-5.
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
trace.set_tracer_provider(provider)
tracer = trace.get_tracer("my-agent")
with tracer.start_as_current_span("chat claude-sonnet-4-5") as span:
span.set_attribute("gen_ai.operation.name", "chat")
span.set_attribute("gen_ai.request.model", "claude-sonnet-4-5")
# call the model here, then record what came back
span.set_attribute("gen_ai.response.model", "claude-sonnet-4-5")
span.set_attribute("gen_ai.usage.input_tokens", 1200)
span.set_attribute("gen_ai.usage.output_tokens", 85)
provider.shutdown()- Run the script and open the project. You should see one run with a single model-call step, its model names and its token counts. Keep the
provider.shutdown()call in short scripts: the batch processor sends spans in the background, and a script that exits first sends nothing.
The OpenInference specification publishes llm.* attributes such as llm.model_name as a separate convention.
The quickest route is the hosted version at mcpd.sh/app, and Start free opens it.
To self-host, build from source at github.com/loruorg/mcpd, following the mcpd README. You need Rust and Node, then run make build. Node is required because the interface is compiled into the binary.
make build
./target/release/mcpd demoOpen http://localhost:4317 to see the demo data. The quickstart walks through sending a trace from your own agent.
What does open source cover in an agent observability platform?
Open source in an agent observability platform covers three things you can check one at a time: the licence, the features in the open build, and what you operate to get the first trace.
Which licence applies?
mcpd is Apache-2.0. The Apache License 2.0 text on apache.org grants each user “a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work”.
You’re free to run it, change it and redistribute your changes.
Which features are in the open build?
Every feature is in the open build. The hosted version and the self-hosted build are the same product, with no feature gates.
Enterprise capability is configuration on the same artefact, so a solo engineer on a laptop and a platform team run identical code.
What do you operate?
mcpd is one static Rust binary with the storage and the web interface built in. Storage is a choice of four:
- One SQLite file, the default.
:memory:, which keeps nothing.- Postgres, for a team.
- ClickHouse, for a team.
Orchestrators can probe /healthz and /readyz. The operations guide covers running mcpd on your own infrastructure.
Is it open at every seam?
Data comes in as OpenTelemetry and goes out the same way. The mcpd README says “What it stores it also forwards, as OTLP, to any endpoint you name”.
Forwarding presets cover Langfuse, LangSmith, Braintrust, Arize, Phoenix, Datadog, Honeycomb, Grafana and others.
How does an open source agent observability platform find one bad run among thousands?
You find one bad agent run among thousands by starting from the complaint, searching what the model said, and following trace ids and metric exemplars to the exact run.
Two complaints show the path. A user reports that the refund agent refused a valid refund, and the monthly bill jumps with no step to blame.
- Search the payload. Paste a phrase from the agent’s reply into search. mcpd’s home page says “Search finds a run by what the model said”, so a sentence like “I can’t process that refund” finds the run directly. Filtering by user or model name alone returns thousands of runs.
- Open the waterfall and the conversation. For the refused refund, the same refund-lookup tool-call span repeats down the waterfall until the step limit, and the conversation shows each identical tool result. The runs guide covers tracing a failing step.
- Follow the log line to its span. Logs and traces share a trace id, so every log line links to the step that wrote it. Start from the log your tool printed and land on the exact span, with its prompt and answer.
- Follow a metric exemplar back to a run. For the bill, start from the
costmetric. An exemplar on the spike links to one run, where the per-step cost shows a prompt growing on every turn. - Turn the finding into a scorer. With
no_tool_looprunning, the refund loop no longer waits for a user complaint to surface. - Add monitors. mcpd evaluates monitors every 60 seconds on
error_rate,latency_p95,cost,score_mean,trace_countand step-count divergence. Divergence catches a run that takes far more steps than its peers.
A monitor latches. It fires once, calls your webhook, and resolves only on a real reading.
Silence isn’t recovery: if traffic stops and no reading arrives, the monitor stays fired. Without latching, a quiet hour would clear an alert for a problem that’s still there.
Why does an open source agent observability platform keep scores and feedback separate?
Scores and feedback stay separate because they answer different questions. A score is a machine evaluation measured against a declared scale, such as a deterministic check for tool loops or a cost budget. Feedback is a person’s judgement of a run.
mcpd keeps them as two signals and never averages one into the other.
An average hides which side was wrong. If a refund run passes no_tool_loop with 1.0 and a reviewer marks it wrong, a mean of 0.5 can’t tell you whether the check caught the failure or missed it.
A score without a declared scale has a second problem. A value of 0.8 could mean 8 out of 10 or 80% of a budget, so you can’t compare it across runs.
Three kinds of scorer produce scores. Deterministic scorers run fixed checks, a model can act as the judge when the question needs reading, and you can define your own scorer for rules only you know.
People work through a review queue, which records feedback beside the scores.
When a production run fails, it can become a case in a dataset, and an experiment then runs two versions of your agent against those cases so you can compare them. The testing guide covers that loop.
How is the cost of each agent step calculated?
Here’s how an open source agent observability platform prices each step.
A step with 12,000 input tokens and 400 output tokens is priced as 12,000 times the input rate plus 400 times the output rate, each divided by a million.
Input tokens don’t all cost the same.
Service tiers such as batch or priority processing add another rate. The price book holds these variants, so a step that read half its prompt from cache isn’t billed at the full input rate.
If a model name is new, misspelt or served by a gateway under an alias, the step shows its cost as missing.
A zero would read as a free step and drag your totals down without a warning. A missing price stays visible until you add a rate.
To add that rate, supply your own price book. The interface then shows cost per run, per model and per project, so a spike narrows from the month to the model to the run that caused it.
The cost_budget scorer checks each finished run against a limit you set. The cost monitor watches spend and calls your webhook when it crosses the line.
How do you keep agent traces private and auditable on your own network?
You keep agent traces private and auditable on your own network with seven controls, and each one closes a gap an auditor will ask about. The mcpd security documentation covers them in detail.
- Redaction runs before storage. As mcpd’s privacy docs put it, without redaction a secret you delete later was still written down.
- Retention and erasure limit what stays. Retention is set in days, and erasure requests target a person. Without them, prompts that contain personal data stay for as long as the disk does.
- Nothing leaves by default. With a default configuration there is no update check, no usage reporting and no telemetry, so a firewall review has no traffic you didn’t choose to account for.
- Access uses API keys with six scopes: ingest, read, write, execute, worker and admin. Keys are compared as SHA-256 hashes, so the stored value isn’t a usable key. If you set no keys, ingest and reads are open, which is for a laptop only.
- Accounts, roles and an audit log answer “who saw what”.
- Sampling reduces what you store. Every stored run is a payload you have to protect, so storing fewer of them shrinks that surface.
- A relay keeps traffic local. You run a relay as a collector beside the agents in each region, and it spools ingest and ships it to the daemons in order. Agents send to a nearby address instead of crossing a network boundary to reach a single daemon. The relay and regions guide covers the setup.
A laptop and a Kubernetes cluster run the same binary. These team-scale controls are configuration, and storage moves from one SQLite file to Postgres or ClickHouse the same way.
Frequently asked questions
Does an agent observability platform sit in the request path?
No. mcpd is a daemon, not a gateway or proxy: your agent calls the model provider directly and sends telemetry to mcpd on the side. Nothing travels through mcpd to reach a model, so if mcpd is slow or down the agent is not slowed or broken.
Can I use the OpenInference or gen_ai instrumentation I already have?
You can keep it as it is. mcpd reads both the OpenTelemetry gen_ai.* attributes and the OpenInference llm.* attributes, so you change only where the exporter sends data.
Do I need Postgres or a cluster to try it?
You need neither. mcpd stores everything in a single SQLite file by default, so a laptop run has no database to stand up. A team moves to Postgres or ClickHouse by changing configuration.
Can I send my data on to another tool later?
You can. mcpd forwards what it stores as OTLP to any endpoint you name, so it is one hop in a pipeline you already have. Leaving later takes a configuration change.
What should you do next?
Start small with your open source agent observability platform, and let your first traces tell you what’s worth building next.
In the next 5 minutes: set the two OTLP environment variables on an agent you already run and send one trace. Open the run and read the exact prompt and completion of each step. The quickstart walks through it.
Today: add a no_tool_loop or cost_budget scorer and one cost monitor. The next looping run or cost spike then arrives as a webhook with the run attached.
This week: decide whether a single SQLite file is enough for you, or whether your team needs redaction, retention and accounts before more people read the payloads.
Start free on the hosted version, and build from source later if you’d rather run it yourself.
Sources
mcpd · The unopinionated agent observatory. · mcpd README · OpenTelemetry · mcpd · Cost · mcpd · Alerting · mcpd · Evaluation · mcpd · Trace Context, W3C Recommendation · Security · mcpd. Every other source is linked where the article cites it.