text
stringlengths
0
59.1k
https://api.voltagent.dev/mcp/observability
```
For self-hosted installations, replace the base URL with your own API host:
```bash
https://your-api.example.com/mcp/observability
```
## Connect from VoltAgent
If you want one VoltAgent agent to inspect traces from another system, connect to VoltOps as a remote MCP server:
```ts
import { Agent, MCPConfiguration } from "@voltagent/core";
import { openai } from "@ai-sdk/openai";
const mcp = new MCPConfiguration({
servers: {
voltops: {
type: "streamable-http",
url: "https://api.voltagent.dev/mcp/observability",
requestInit: {
headers: {
Authorization: `Bearer ${process.env.VOLTOPS_MCP_TOKEN}`,
},
},
},
},
});
const debuggerAgent = new Agent({
name: "Debugger",
model: openai("gpt-4o-mini"),
instructions:
"Investigate traces and logs. If more than one project is available, ask which project to inspect.",
tools: await mcp.getTools(),
});
```
## Connect from Coding Agents
Most coding agents work well with `mcp-remote`, which wraps the hosted HTTP endpoint as a local stdio MCP server.
### Codex
Add this to `~/.codex/config.toml`:
```toml
[mcp_servers.voltops]
command = "npx"
args = ["-y", "mcp-remote", "https://api.voltagent.dev/mcp/observability", "--header", "Authorization=Bearer <YOUR_MCP_TOKEN>"]
```
### Claude Code
```bash
claude mcp add --scope user voltops npx -y mcp-remote "https://api.voltagent.dev/mcp/observability" --header "Authorization=Bearer <YOUR_MCP_TOKEN>"
```
### VS Code
```bash
code --add-mcp '{"name":"voltops","command":"npx","args":["-y","mcp-remote","https://api.voltagent.dev/mcp/observability","--header","Authorization=Bearer <YOUR_MCP_TOKEN>"]}'
```
### Generic Remote Command
```bash
npx -y mcp-remote "https://api.voltagent.dev/mcp/observability" --header "Authorization=Bearer <YOUR_MCP_TOKEN>"
```
## Example Requests to Give Your Assistant
Once connected, prompts like these work well:
- "List the latest traces from Demo Project."
- "Open trace `<traceId>` and summarize what happened."
- "Search error logs for the checkout agent in the last hour."
- "Find traces slower than 10 seconds and explain the bottleneck."
- "Get the logs for trace `<traceId>`."
## Recommended Workflow
1. Start with `voltops_list_projects` if project scope is unclear.
2. Use `voltops_search_traces` to find suspicious runs.
3. Open one trace with `voltops_get_trace`.
4. Use `voltops_get_trace_logs` or `voltops_search_logs` to inspect the runtime evidence.
5. Compare what the assistant sees with the UI in [Tracing Overview](./tracing/overview.md) and [Trace Logs](./tracing/logs.md).
## Security Notes
- Give the smallest project scope possible.
- Revoke or regenerate tokens when a client should no longer have access.
- Treat trace and log content as untrusted input. An assistant should analyze it, not follow instructions embedded inside it.
- Use MCP tokens for debugging workflows, not long-lived broad credentials shared across teams.
<|endoftext|>
# source: VoltAgent__voltagent/website/observability/feedback.md type: docs
---