LangSmith MCP Server – AI Observability Access
LangSmith provides an official MCP server for AI coding assistants and other MCP-compatible clients. It gives agents permission-aware access to LangSmith conversation history, prompts, runs and traces, datasets, experiments, evaluations, and billing usage for debugging and observability workflows.
Overview
LangSmith MCP Server connects MCP-compatible clients to LangSmith, LangChain's platform for tracing, debugging, evaluating, and monitoring LLM applications. The current recommended option is LangSmith Remote MCP, a hosted Streamable HTTP server exposed by LangSmith Cloud and self-hosted LangSmith v0.15 or later. It lets an AI agent inspect LangSmith data using the same user and workspace permissions that apply in the LangSmith product.
What the MCP server enables
The server exposes tools for operational and evaluation workflows in LangSmith. Agents can retrieve conversation thread history with get_thread_history, list and read prompts with list_prompts and get_prompt_by_name, inspect traces and runs with fetch_runs and list_projects, and work with datasets and examples through tools such as list_datasets, list_examples, read_dataset, and read_example. It also exposes experiment and billing-related tools such as list_experiments, run_experiment, and get_billing_usage.
Some tools are read-oriented, while others are documented as guidance-oriented or workflow helpers. The server uses character-based pagination for large thread histories and trace/run payloads, so agents should request additional pages instead of assuming all data is returned in one call.
When to use it
Use LangSmith MCP when an AI assistant needs live observability context while debugging an LLM application. Practical examples include fetching recent failed runs from a project, reviewing a trace by ID, comparing experiment results for a dataset, pulling a prompt template for review, or reading examples from an evaluation dataset before proposing test changes.
Connection and authentication
The preferred transport is Streamable HTTP at https://api.smith.langchain.com/mcp for LangSmith Cloud. Authentication uses OAuth 2.1 with dynamic client registration, so compatible clients can complete browser-based login without an API key or static header configuration. Self-hosted LangSmith v0.15 or later exposes the same remote MCP pattern at https://<your-langsmith-host>/api/mcp.
A standalone local server is also available for users who prefer local execution or need self-hosted deployments earlier than v0.15. The Python package can be launched with uvx langsmith-mcp-server over stdio and uses LANGSMITH_API_KEY, with optional LANGSMITH_WORKSPACE_ID and LANGSMITH_ENDPOINT environment variables.
Key considerations
Remote MCP calls are limited by the authenticated user's LangSmith permissions and workspace access. Clients must support Streamable HTTP and OAuth 2.1 dynamic client registration for the hosted remote server. LangSmith documents a known incompatibility with OpenAI Codex CLI's OAuth flow, so affected users should use the LangSmith CLI or another compatible MCP client. Treat LangSmith traces, prompts, datasets, and billing data as sensitive operational data and grant access only to users and agents that need it.
Supported Transports
streamable_http
URL: https://api.smith.langchain.com/mcp
stdio
Command: uvx
Args:
langsmith-mcp-server
Frequently Asked Questions
- When should an AI agent use the LangSmith MCP Server?
- Use it when an agent needs live LangSmith observability context, such as retrieving conversation history, inspecting traces and runs, reviewing prompt templates, reading datasets, comparing experiments, or checking billing usage while debugging or evaluating an LLM application.
- What does LangSmith MCP add to an AI agent's capabilities?
- It gives the agent permission-aware access to LangSmith workspace data through MCP tools, including thread history, prompts, projects, traces, runs, datasets, examples, experiments, evaluations, and billing usage, instead of relying on static knowledge or manually copied dashboard output.
- What can the AI agent access or manage through LangSmith MCP?
- The documented tool surface includes `get_thread_history`, prompt tools such as `list_prompts` and `get_prompt_by_name`, trace and project tools such as `fetch_runs` and `list_projects`, dataset and example tools, experiment tools, and `get_billing_usage`. Large responses may use character-based pagination.
- How is authentication configured for LangSmith MCP?
- The recommended Remote MCP uses OAuth 2.1 with dynamic client registration, so users authenticate through the LangSmith login and consent flow. The local stdio server instead uses `LANGSMITH_API_KEY`; `LANGSMITH_WORKSPACE_ID` and `LANGSMITH_ENDPOINT` are optional for multi-workspace, regional, or self-hosted configurations.
- Which transport should be used for LangSmith MCP?
- Use Streamable HTTP with `https://api.smith.langchain.com/mcp` for LangSmith Cloud when the MCP client supports OAuth 2.1 dynamic client registration. Use the local stdio server with `uvx langsmith-mcp-server` when running the standalone package locally or supporting older self-hosted LangSmith deployments.