LangSmith MCP server: read traces, prompts and datasets
LangSmith now hosts its MCP server, so the archived package is no longer the route. What the 15 tools reach, which client cannot connect, and what the older package is still for.
Checked 3 October 2026 · from LangSmith's documentation, the live endpoint's OAuth metadata, PyPI, GitHub and the package's own tools/list response
One of 91 guides to monitoring and developer tools. Each covers what an AI coding agent can get out of the tool through MCP, the protocol that lets the agent query the tool directly.
Summary
LangSmith hosts a Remote MCP server at `https://api.smith.langchain.com/mcp`. Interactive clients sign in with OAuth; scripts send a LangSmith API key in the X-Api-Key header.
It replaces the standalone langsmith-mcp-server package. LangChain marks that package deprecated, archived its repository on 14 August 2026, and left PyPI at 0.1.1.
Both expose the same 15 tools over threads, runs, prompts, datasets, experiments and billing usage. Four of them only return SDK documentation, so nothing on the server changes your data.
What is the LangSmith MCP server?
It is LangChain's server for the Model Context Protocol. LangSmith captures the runs of your own LLM applications, and these tools let an agent read those runs back.
The surface splits into five areas: prompts, traces and runs, datasets and examples, experiments, and billing usage. That last one is unusual among agent-observability connectors, which mostly stop at telemetry.
The Remote MCP runs inside LangSmith, so there is nothing to install for Cloud users. The standalone package remains for self-hosted LangSmith older than v0.16 and for teams that want to run the server themselves.
LangSmith covers agent observability broadly, reaches part of the way into release through prompt management and into cost through billing usage, and reaches nothing in code review or production observability.
| Part of the work | What LangSmith has here | Can an agent reach it |
|---|---|---|
| Code, tests & review | None | No code-review product |
| CI & release | Prompt management | Partial. There is no CI product. Prompt management is the nearest release surface, and push_prompt returns instructions rather than pushing a version |
| Production observability | None | No infrastructure telemetry. LangSmith sees your application's LLM calls, not its hosts |
| Agent observability & evals | Runs, threads, projects, datasets, experiments | Yes. Core strength, and the product's whole purpose |
| AI cost management | Billing usage | Partial. get_billing_usage reports LangSmith consumption, which is trace volume rather than model spend |
For an agent, LangSmith answers questions about how your LLM application behaved and what you fed it, and nothing about the machines underneath. An agent connected here can pull the runs behind a bad answer and the dataset a prompt was tested against. It cannot tell you the database was slow, so this connector pairs with an infrastructure one.
What can an AI agent do with LangSmith?
| Task | Tools | Works | Watch out for |
|---|---|---|---|
| Read the runs behind a bad answer | fetch_runs get_thread_history | Yes | Threads need a thread identifier set by your application |
| Find which prompt version is live | list_prompts get_prompt_by_name | Yes | Prompts are LangSmith's own store, not your repository |
| Ship a prompt change | push_prompt | No | push_prompt returns SDK examples for pushing a version. It does not push one |
| Build a dataset from real traffic | create_dataset list_examples update_examples | Partial | create_dataset and update_examples return SDK instructions; only list_examples reads data |
| Run and read an experiment | run_experiment list_experiments | Partial | run_experiment returns SDK documentation rather than running anything, so you still have to run the experiment yourself |
| Check what LangSmith is costing | get_billing_usage | Yes | LangSmith consumption, not the token spend of your models |
| Investigate a production incident | No | No metrics, logs or traces from your infrastructure |
15 tools registered, all on by default
- Prompts2
list_promptsget_prompt_by_name- Prompts, documentation-only1
push_prompt- Traces and runs3
fetch_runsget_thread_historylist_projects- Datasets4
list_datasetsread_datasetlist_examplesread_example- Datasets, documentation-only2
create_datasetupdate_examples- Experiments1
list_experiments- Experiments, documentation-only1
run_experiment- Billing1
get_billing_usage
Counted from the standalone package's own tools/list response on 21 August 2026. The list matches the Remote MCP's documented tools exactly. The three documentation-only groups return SDK guidance and change nothing.
What the tool definitions cost in context
A client that loads every tool definition at the start of a session spends this much context before the first question. Claude Code defers definitions by default through tool search, and loads a tool's definition when the agent needs it. The method below gives the version and date measured.
A context window is the amount of text a model can hold at once. A client that loads every tool definition upfront sends each tool's name, description and input schema to the model when the session starts. That list is charged whether or not a single tool is called.
Measured on the standalone package, LangSmith is verbose for its size: 15 tools cost about 5,458 tokens. Arize Phoenix registers 27 tools and costs less. LangSmith's tool descriptions average 1,120 characters. 1,120 characters is long for a tool description.
| Tool set | Tools | Tokens (GPT-5.6, GPT-5.5) | Tokens (GPT-4, GPT-3.5) | Tokens (Claude Haiku 4.5 to Opus 5) | Share of a 200,000-token window |
|---|---|---|---|---|---|
| Every tool, as registered | 15 | 5,458 to 6,665 | 5,429 to 6,690 | 7,498 to 9,529 | 2.7% to 4.8% |
Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted 21 August 2026 from tools/list on the standalone package langsmith-mcp-server 0.1.1, run locally with a placeholder key. The Remote MCP shares its tool implementations, but its own tools/list was not counted, so its definitions may serialize differently.
Registration is static, so no LangSmith account was involved. Figures cover name, description and input schema.
The two models in column one share the o200k_base encoding, so they get one count. The spread is formatting, about 22%. Reasoning tokens are output, spent per request. The tool list is billed as input whenever the client loads it.
The Claude figures are measured rather than encoded. Anthropic publishes no local tokenizer. So the definitions were sent to the API's count_tokens endpoint, and a no-tools baseline was subtracted. The range covers two tokenizer generations rather than two serializations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is about a quarter.
Can LangSmith watch your own AI agents?
LangSmith is built for tracing agents, so the table below asks which of those signals the 15 tools expose.
| Signal | Covered | Notes |
|---|---|---|
| Trace and run tracking | Yes | fetch_runs reaches runs and get_thread_history reaches conversation threads |
| Eval scores on recorded traffic | Partial | list_experiments returns feedback metrics per experiment. run_experiment only returns documentation, and no tool reads scores on live traffic |
| Prompt version tracking | Partial | list_prompts and get_prompt_by_name read prompts. push_prompt is documentation-only, and there is no version or tag tool |
| Offline experiments | Partial | read_dataset, list_examples and list_experiments read them back. Creating datasets and running experiments happen in the SDK |
| Token and cost tracking | Partial | get_billing_usage is account-level usage rather than per session or per trace |
LangSmith MCP server limits: where answers come back incomplete
The first limit below is about which server you connect; the other two are about what the tools return.
The agent says: “LangSmith is connected.” Through the deprecated package, not the Remote MCP.
Many existing configs still launch uvx langsmith-mcp-server. It works at 0.1.1, but LangChain marks it deprecated, and its repository has accepted no changes since it was archived on 14 August 2026.
The tool names are identical, so an agent cannot tell which server answered.
Guard: Move Cloud configs to https://api.smith.langchain.com/mcp. Keep the package only for self-hosted LangSmith older than v0.16, pinned to 0.1.1.
The agent says: “That conversation has no history.” No thread identifier was ever set.
get_thread_history reads runs grouped by a thread identifier your application supplies. An application that never sets one produces a real, empty answer, and the response does not distinguish that from a conversation with no turns.
Guard: Confirm your LangSmith integration sets thread identifiers before treating an empty history as evidence.
The agent says: “I updated the prompt.” It returned SDK examples and changed nothing.
LangSmith ships no write tool and therefore needs no read-only mode. push_prompt, create_dataset and update_examples are documentation-only: each returns SDK examples and changes nothing.
Guard: Push prompt versions and edit datasets with the LangSmith SDK or UI, and tell the agent those four tools are reference material.
How to configure LangSmith MCP for agents
- 1
Use the Remote MCP
The standalone package is deprecated and will not change, while the hosted server follows LangSmith releases.
- 2
No allowlist is needed for safety
Every tool reads. The four documentation-only tools are worth disabling for context rather than for risk: they return long markdown pages an agent rarely needs.
- 3
Pick the right region
EU, APAC and AWS US accounts use
eu.,apac.andaws.prefixes onapi.smith.langchain.com/mcp. - 4
Mind the workspace
OAuth sessions follow your user's workspace permissions. With an API key, tools that accept
workspace_idcan target another workspace; otherwise the key's own workspace is used.
Paste this into your agent’s instructions
LangSmith's quiet failure is scope: a run search in the wrong project, or a thread with no identifier, both return nothing. The block makes the agent name what it searched.
When you answer using LangSmith MCP tools, state: - The project and workspace you searched. - The time range, and how many runs you actually retrieved. - Whether a thread identifier existed. get_thread_history returns nothing when the application never set one, which is not the same as a conversation with no turns. Never state that data does not exist. State that none was returned under the constraints above. Write your answer in ASD-STE100 Simplified Technical English. Use short sentences with one idea in each.
Do you need the MCP server at all?
The LangSmith CLI signs in through the same OAuth server and covers the same projects, traces, runs, datasets, experiments and threads. LangSmith recommends it where the Remote MCP cannot connect, such as Codex.
The LangSmith REST API and SDK cover runs, prompts and datasets, and they are the route for the writes the MCP tools only describe.
The connector's advantage is tool descriptions detailed enough that an agent picks the right call unprompted, which is the same verbosity that makes the package's definitions cost 5,458 tokens.
Connect the Remote MCP for exploring recent runs and prompts. Use the SDK or CLI for anything that changes data.
LangSmith MCP server setup
LangSmith Cloud users connect to https://api.smith.langchain.com/mcp, or the eu., apac. or aws. regional host. OAuth 2.1 with dynamic client registration means no key or client ID to provision.
For scripts, send a LangSmith API key as X-Api-Key. The deprecated standalone package uses a different header, LANGSMITH-API-KEY, when run over HTTP.
Claude Code
Add the server user-wide, then run /mcp and select langsmith to finish OAuth. Tools appear as mcp__langsmith__<tool_name>.
claude mcp add --transport http -s user langsmith https://api.smith.langchain.com/mcp
Cursor
Cursor reads the server from its mcp.json and prompts for OAuth on first use.
{"mcpServers":{"LangSmith":{"url":"https://api.smith.langchain.com/mcp"}}}Codex CLI
Codex CLI cannot use the Remote MCP: it omits the resource parameter during OAuth, so initialize fails. LangSmith recommends its CLI from Codex instead; the deprecated package also runs over stdio with an API key.
[mcp_servers.langsmith]
command = "uvx"
args = ["langsmith-mcp-server"]
env = { LANGSMITH_API_KEY = "<your-key>" }Every other client
Each block below is the configuration for one client, with the file path and the key that client expects.
Claude Desktop
Add a custom connector under Settings, Connectors with https://api.smith.langchain.com/mcp, then complete the OAuth login.
VS Code Copilot
Add it to .vscode/mcp.json or the user-level file as an http server.
{"servers":{"langsmith":{"type":"http","url":"https://api.smith.langchain.com/mcp"}}}`.vscode/mcp.json` uses the key `servers`. VS Code's portable files, .mcp.json at the project root and ~/.copilot/mcp-config.json, use mcpServers. VS Code recommends them for new servers.
AI SDK and scripts
Programmatic clients send an API key over Streamable HTTP. The Remote MCP is stateless and answers in JSON, so the built-in transport works.
const client = await createMCPClient({
transport: {
type: "http",
url: "https://api.smith.langchain.com/mcp",
headers: { "X-Api-Key": process.env.LANGSMITH_API_KEY },
},
});Other Streamable HTTP clients
Any client that speaks Streamable HTTP can connect with the URL alone, using OAuth or the X-Api-Key header.
Self-hosted LangSmith
From v0.16 the Remote MCP is served at https://<your-langsmith-host>/api/mcp. It stays inert, returning 404, until you supply an Ed25519 signing JWKS as config.signingJwks in the Helm chart.
Older self-hosted versions keep using the standalone package, pointed at your instance with LANGSMITH_ENDPOINT.
LANGSMITH_API_KEY=<your-key> \ LANGSMITH_ENDPOINT=https://langsmith.example.com \ uvx langsmith-mcp-server
Read-only access, permissions and security
No tool writes
Four of the fifteen are named like writes, but
push_prompt,create_dataset,update_examplesandrun_experimentare labeledDocumentation-onlyin the README and implemented as zero-argument functions that return a markdown page of SDK examples. They take no parameters and reach nothing.The naming is the hazard, not the behavior
An operator reading the tool list reasonably assumes
push_promptpushes a prompt. It returns instructions for pushing one. Budget for the confusion, not for the write.Nothing here spends money
run_experimentreturns documentation, so an agent calling it repeatedly costs context and nothing else.Access follows the identity
An OAuth session sees what your LangSmith user may see. An API key acts as the user who owns it, within that key's workspace and permissions.
Troubleshooting
- No runs found in a project you know has traffic
- Check the project name and the workspace.
LANGSMITH_WORKSPACE_IDscopes results, and a query against the wrong workspace returns an empty result with no explanation. - A conversation has no thread history
get_thread_historyneeds a thread identifier that your application sets. Without one there is nothing to group, and the response looks the same as an empty conversation.- Codex CLI logs in but every call fails
- LangSmith documents this as a known incompatibility: Codex omits the OAuth
resourceparameter, so the token is not bound to the server. Use the LangSmith CLI from Codex, or the standalone package with an API key. - 401 with an API key
- The Remote MCP reads
X-Api-Key. The standalone package's HTTP mode readsLANGSMITH-API-KEYinstead, so a header copied between them fails. - The self-hosted /api/mcp endpoint returns 404
- The Remote MCP stays inert until a signing JWKS is configured. Generate an Ed25519 key set and pass it as
config.signingJwks; RSA keys are rejected.
LangSmith MCP server: Reference
| Item | Value |
|---|---|
| Endpoint | https://api.smith.langchain.com/mcp, plus eu., apac. and aws. regional hosts |
| Auth | OAuth 2.1 with dynamic client registration, or X-Api-Key |
| Self-hosted | /api/mcp from v0.16, once a signing JWKS is set |
| Known incompatibility | OpenAI Codex CLI |
| Tools | 15, the same on the Remote MCP and the package. The 4 named like writes return documentation |
| Standalone package | langsmith-mcp-server 0.1.1 on PyPI · deprecated · repository archived 14 August 2026 · 131 stars |
What engineers report
Signals for the Remote MCP are LangSmith's own documentation. The standalone package left a public record: 131 stars, 11 PyPI releases and an archive date of 14 August 2026.
| What was checked | What it shows |
|---|---|
| Remote MCP regions | GCP US, GCP EU, GCP APAC, AWS US |
| Package stars | 131 |
| Package repository | Archived 14 August 2026 |
| PyPI latest | 0.1.1, 25 February 2026, across 11 releases |
| Tools | 15 on both servers |
“exceeds maximum allowed tokens (25000). Please use pagination, filtering, or limit parameters to reduce the response size.”
Remote MCP facts from LangSmith's documentation and the endpoint's OAuth metadata, retrieved 3 October 2026. Package facts from the GitHub API and PyPI on the same date. Tool counts come from the package's own tools/list response, which matches the documented Remote MCP list.
Should you connect an agent to LangSmith?
Yes. Best for LangSmith teams debugging traces and checking experiments from Claude Code or Cursor.
- Strongest fit
- Yes, if you already trace with LangSmith and want an agent reading runs, prompts and experiments; connect the hosted Remote MCP.
- Main advantage
- Hosted with OAuth across four Cloud regions, and it reaches billing usage, which most agent-observability connectors omit.
- Main weakness
- Four of the 15 tools only return documentation, and Codex CLI cannot connect to the hosted server.
- Operational risk
- There are no writes to gate. The four tools that read as writes return documentation, so the connector is read-only in practice even though nothing advertises it as such.
From Oodle
One platform for agent traces and infrastructure
Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface.
See agent observabilityFrequently asked questions
Does LangSmith have a hosted MCP server?
Yes. The LangSmith Remote MCP runs at https://api.smith.langchain.com/mcp, with EU, APAC and AWS US regional hosts, and uses OAuth or an X-Api-Key header.
How many tools does the LangSmith MCP server have?
15, covering threads, prompts, runs, datasets, experiments and billing usage. The Remote MCP and the standalone package share the same tool implementations.
Is the langsmith-mcp-server package abandoned?
It is deprecated. Its repository was archived on 14 August 2026 and PyPI stays at 0.1.1. LangSmith points users to the Remote MCP, and keeps the package for older self-hosted installs.
Can an agent change my prompts?
No. push_prompt, create_dataset, update_examples and run_experiment are labeled documentation-only and return markdown, so they cannot change anything.
Does get_billing_usage show my model spend?
No. It reports LangSmith consumption, which is trace volume. Model token spend is a different measurement.