Skip to main content

Connect Your Client

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 key
For self-hosted deployments, replace the base URL with your instance (for example, https://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’s id as projectId to every other tool.

Signals

  • list_signals
    List the project’s signals with their prompt, payload schema, trigger, filters and mode. Signal events are queryable with query_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; models replaces 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 with query_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 a prompt; the response returns a conversationId you 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.
Use ask_agent when you want a quick answer without writing SQL; use query_laminar_sql and get_trace_context when your assistant should pull raw rows or trace structure to reason over itself.

Example Questions You Can Ask Your LLM

  • “What failed in the most recent run for my dev-claude session?”
  • “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 contains checkout.”
  • “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.”