Integrations/Observability
Advanced12 min

LangSmith MCP Server

The LangSmith MCP Server exposes your entire observability workspace as callable tools via Model Context Protocol — query traces with FQL, manage datasets, push prompts, and check billing from Claude Desktop, Cursor, or any custom agent without leaving your editor.

Quick Reference

  • Hosted server at https://langsmith-mcp-server.onrender.com/mcp — add your API key and connect immediately
  • Auth header is LANGSMITH-API-KEY (not X-API-Key) — pass your lsv2_pt_... key
  • Primary trace tool: fetch_runs with FQL filtering — use eq(), gt(), has(), and() operators
  • Page-number pagination — default 25,000 chars/page, max 30,000; pass page=2 to get the next page
  • Dataset tools: list_datasets, read_dataset, list_examples, read_example, create_dataset, update_examples
  • Prompt tools: list_prompts, get_prompt_by_name, push_prompt | Thread: get_thread_history | Billing: get_billing_usage
  • Self-hosted Docker: use LANGSMITH_ENDPOINT env var (not LANGSMITH_API_URL), server runs on port 8000

Should You Use the LangSmith MCP Server?

The LangSmith MCP Server is the right tool when you want to query your observability workspace conversationally or let an agent introspect its own production history. It is not the right tool for every LangSmith task.

Access PathWhen to UseWhat It Gives You
LangSmith UIVisual exploration, dashboards, annotation queuesFull-featured browser UI — charts, filters, side-by-side evals
LangSmith SDKProgrammatic pipelines, CI eval harness, custom scriptsFull API coverage, strongly typed, best for automation
MCP ServerConversational queries from an AI client, agent self-monitoringNatural-language access to traces/datasets/prompts from any MCP client
LangSmith Fetch CLITerminal-native one-liners, quick trace dumps without an MCP clientLightweight CLI — no AI client needed, just your terminal
Best use case

The MCP server shines when you want to ask Claude Desktop or Cursor 'what was the error rate for my support agent last hour' and get an answer without switching apps. For batch evaluation, use the SDK. For quick terminal lookups, use the Fetch CLI.