Connect Your Client
- Claude Code
- Codex
- Claude
- ChatGPT
- Cursor
- Other
Sign in with OAuth
claude mcp login opens the browser. You can also run /mcp inside a Claude Code session to sign in. Claude Code refreshes the token on its own, so you only sign in once. Add --scope user to claude mcp add to use the server in every project.Project API keyhttps://laminar.example.com/v1/mcp). To run against a local app-server, use http://localhost:8000/v1/mcp. Claude and ChatGPT connect from their own cloud, so they need a public HTTPS URL. To enable OAuth sign-in on a self-hosted instance, set MCP_RESOURCE_URL to that same URL on both the frontend and the app-server. Without it, the MCP server accepts project API keys only.
Available Tools
Query
query_laminar_sql
Run read-only ClickHouse SQL across Laminar data and get JSON back. Use this to find trace IDs, filter by time/session/status, or pull raw span fields (input,output,attributes).list_projects
List the Laminar projects you can access, with their workspaces. When you sign in with OAuth, the agent calls this first and passes a project’sidasprojectIdto every other tool.
Signals
list_signals
List the project’s signals with their prompt, payload schema, trigger, filters and mode. Signal events are queryable withquery_laminar_sql(signal_events).get_signal
Get one signal with its trigger, filters and mode.list_signal_versions
List a signal’s definition (prompt and payload schema) versions, oldest first.create_signal
Create a signal: an LLM judge that runs a prompt on matching traces and extracts a structured payload. Like the UI, it also creates a critical-severity alert. When you sign in with OAuth, the alert is subscribed to your email.update_signal
Update a signal. Only the fields you pass change. Changing the prompt or payload schema adds a definition version.delete_signal
Delete a signal with its triggers, alerts and events. This is irreversible.
LLM profiles
list_llm_profiles
List the workspace’s LLM profiles: the provider credentials and models that signals and the playground run on. Secrets come back masked.get_llm_profile
Get one LLM profile. Secrets come back masked.create_llm_profile
Create a workspace LLM profile. Secrets you pass are stored encrypted and never returned.update_llm_profile
Update an LLM profile. Only the fields you pass change;modelsreplaces the whole list.delete_llm_profile
Delete an LLM profile. Refused while a signal or feature route uses it.
Traces
add_trace_tags
Add tags to a trace, for example to mark traces you reviewed. Tags the trace already has are kept. Tags are queryable withquery_laminar_sql(traces.tags).get_trace_context
Get an LLM-optimized summary of a single trace: span tree, timings, LLM inputs/outputs, and errors. Use this to quickly understand what happened in a specific run once you have a trace ID.
Agent
ask_agent
Ask Laminar Agent a question in plain language and get a grounded answer back. The agent runs read-only SQL and reads trace context for you, so you do not have to write the queries yourself. Pass aprompt; the response returns aconversationIdyou can pass back on the next call to continue the conversation.
get_trace_context and ask_agent are available on Laminar Cloud. Self-hosted open-source builds
don’t list them.Every tool acts on one project. With a project API key, that is the key’s project. With OAuth, it
is the
projectId the agent passes, and Laminar checks that you are a member of that project on
every call. The SQL tool is read-only (SELECT only). If trace context truncates long inputs or
outputs, use SQL to fetch full fields.Example Questions You Can Ask Your LLM
- “What failed in the most recent run for my
dev-claudesession?” - “Find the latest error trace and summarize the root cause.”
- “Which tool call failed first in the last 20 minutes?”
- “Show me the spans where the model returned an empty response today.”
- “List the 5 slowest traces from the last hour and summarize the slowest one.”
- “Find traces where
status = 'error'and the top span name containscheckout.” - “Compare the token usage between the last two successful runs.”
- “Which failure clusters cost the most this week, and open the most expensive trace in the biggest one.”