LangSmith MCP Server
Provides read-only access to LangSmith traces that contain LangGraph auto-instrumented configuration, including graph_id, thread_id, and model information, enabling inspection of LangGraph runs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LangSmith MCP Serverlist recent runs from project 'my-app'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LangSmith MCP Server
FastMCP-based MCP server exposing LangSmith read-only tools for querying existing traces (runs, children, URLs) without extra instrumentation.
Tools
ls_list_runs(project_name, is_root=True, limit=50, select?)— List recent runs with filteringls_read_run(run_id, hydrate_children=False, child_limit=100)— Read single run with optional childrenls_get_run_url(run_id)— Generate shareable LangSmith URLsls_list_children(parent_run_id, limit=100)— List child spans for parent run
Related MCP server: langfuse-mcp-java
Requirements
Python 3.10+
LANGSMITH_API_KEYin your environmentOptional:
LANGSMITH_ENDPOINTfor on-prem deployments
Quick Start
# Clone and setup
git clone <repo-url>
cd langsmith-mcp-server
# Install dependencies (uv manages environment automatically)
uv sync
export LANGSMITH_API_KEY="lsv2_pt_..."
# Run smoke test
uv run python tests/smoke_test.py
# Run unit tests
uv run pytest tests/test_server.py -vRun as MCP Server
Local Development
Recommended (using fastmcp.json for configuration):
# FastMCP auto-detects fastmcp.json in current directory
fastmcp run
# Or via uv
uv run fastmcp run fastmcp.jsonAlternative (direct Python):
uv run python src/server.pyFastMCP Cloud Deployment
Deploy to FastMCP Cloud for free hosting:
Push to GitHub:
don-aie-cohort8/langsmith-mcp-serverSign in to https://fastmcp.cloud
Create new project:
Repository:
don-aie-cohort8/langsmith-mcp-serverBranch:
mainEntrypoint:
src/server.py:app
Add environment variable:
LANGSMITH_API_KEYDeploy!
Auto-deploys on every push to main.
MCP Client Configuration
Local Development
Add to your MCP client config (Claude Desktop, Claude Code, etc.):
{
"mcpServers": {
"langsmith-local": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"fastmcp",
"run",
"/absolute/path/to/langsmith-mcp-server/src/server.py:app"
]
}
}
}Note: Replace /absolute/path/to/langsmith-mcp-server with your actual project path.
Why this pattern?
Uses
uv run --with fastmcpper official FastMCP recommendationsCreates isolated environment with clean dependency management
Avoids dependency on global
fastmcpinstallationRuntime dependencies pulled from
pyproject.tomlvia editable installNo need to list all dependencies in MCP config
FastMCP Cloud
For cloud deployment:
{
"mcpServers": {
"langsmith-cloud": {
"url": "https://langsmith-mcp-server.fastmcp.app/mcp"
}
}
}Project Structure
Following FastMCP and Python best practices:
langsmith-mcp-server/
├── src/
│ └── server.py # MCP server implementation (~190 lines)
├── tests/
│ ├── smoke_test.py # Startup validation
│ ├── test_server.py # Unit tests
│ ├── test_integration.py # Integration tests
│ └── README.md # Testing documentation
├── scripts/
│ ├── integration_demo.py # Demo script for testing tools
│ └── claude-agent-sdk-testing/ # Claude Agent SDK integration
├── docs/
│ ├── PRODUCTION_READINESS.md # Production deployment guide
│ ├── MCP_FIX_REPORT.md # Historical fix documentation
│ ├── SERIALIZATION_FIX.md # Pydantic compatibility fixes
│ └── TESTING_REPORT.md # Testing results
├── notebooks/ # Jupyter notebooks for exploration
├── fastmcp.json # Deployment configuration
├── pyproject.toml # Package metadata and dependencies
└── README.md # This fileDependency Management
This project uses a dual-file approach for dependencies:
pyproject.toml: Defines all Python dependencies (runtime + dev)
fastmcp.json: Deployment configuration that references pyproject.toml via
"editable": ["."]
When you run uv sync, dependencies are installed from pyproject.toml. FastMCP automatically loads them via the editable install.
Usage Tips
Use
select=["id","name","error","extra"]for minimal payloadsLangGraph auto-instrumented config appears under
run.extra(e.g.,graph_id,thread_id,research_model)All tools are read-only by design (no create/update/delete operations)
References
Client:
Server:
Available Tools
5 toolsls_get_run_urlA
Generate a shareable LangSmith UI URL for a run.
Args: run_id: Run ID to generate URL for (required)
Returns: Shareable LangSmith URL (e.g., https://smith.langchain.com/o/.../runs/...)
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses the core behavior: it generates a shareable URL from a run ID and provides an example of the returned format. It does not mention potential errors or side effects, but for this simple utility, the behavioral contract is adequately transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single-purpose, front-loaded sentence followed by a standard Args/Returns structure. Every sentence is necessary, with zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one required parameter) and the presence of a Returns section describing the output with an example, the description is complete for an agent to select and invoke the tool correctly. Sibling tools are different enough that no further context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no parameter descriptions (0% coverage), and the description compensates by documenting `run_id` as 'Run ID to generate URL for (required)', adding semantic meaning beyond the bare type and requirement.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Generate'), the resource ('a shareable LangSmith UI URL'), and the target ('for a run'), clearly distinguishing it from sibling tools that list or read runs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool over siblings or any exclusion criteria. It implies usage through its clear purpose, but lacks direct guidance, making this the minimum viable score of 3.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ls_list_childrenA
List child spans for a given parent run.
Args: parent_run_id: Parent run ID (required) limit: Maximum children to return (default: 100, range: 1-500)
Returns: List of child run objects with id, name, run_type, timing, and error info
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| parent_run_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| items | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return shape (list of child run objects with specific fields), the limit parameter with default and range, and the fact that it lists children. Since it's a 'List' operation, it implicitly communicates read-only behavior, but it doesn't explicitly state side effects or auth requirements. Still, it provides useful behavioral details beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a concise one-line summary, a clear 'Args' section, and a 'Returns' section. Every sentence is informative, no redundant wording, and the most important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given it's a simple listing tool with two parameters and an output schema, the description covers all necessary context: how to call it, what parameters mean, and what kind of objects are returned. It even mentions timing and error info in the return, which is more than many tools provide. The output schema further supplements return details, so nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema only provides types and defaults, but the description adds full semantics: parent_run_id is required, limit is the maximum children and has a valid range (1-500). With 0% schema coverage, the description fully compensates by explaining each parameter's purpose and constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a specific verb 'List' and resource 'child spans', scoped to 'a given parent run'. This clearly distinguishes it from sibling tools like ls_list_runs, which lists runs at the top level, and ls_read_run, which reads a single run.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states that parent_run_id is required, implying you use this after you have a parent run ID (likely from ls_list_runs). It doesn't explicitly mention alternatives or exclusions, but the context is clear: when you need to inspect children of a specific run.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ls_list_projectsA
List projects from LangSmith workspace.
Args: limit: Maximum projects to return (default: 10, range: 1-200)
Returns: List of project objects with id, name, start_time, tenant_id, and optional statistics
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| items | Yes | |
| next_cursor | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the burden. It states the return type (list of project objects) and mentions optional statistics, which is useful. However, it doesn't disclose any side effects (likely read-only, but not stated), pagination behavior (only a limit, no offset), or how the default limit works in practice (e.g., whether it returns up to 10 or exactly 10). This is adequate but could be more explicit about being a read-only operation and any server-side defaults.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: a single sentence followed by an Args/Returns structure that is front-loaded and scannable. Every part earns its place: it covers purpose, the one parameter, and the return shape. No fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only one parameter, an output schema (though its richness isn't shown, it's present), and no annotations, the description covers the essentials: what it lists, the limit semantics, and the return type. It doesn't discuss error handling, authentication, or retries, but for a simple listing tool with a single optional parameter, this is reasonably complete. Sibling tools exist, but the description's scoping to projects is sufficient for basic selection. A 4 is warranted given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has only one parameter (limit) with a default, but the schema_description_coverage is 0% (no description beside the property). The description compensates by explaining the limit's default and range (1-200), which adds meaning beyond the bare schema. However, it doesn't mention whether limit is optional (though it has a default, implying so) or how it interacts with pagination. This is acceptable for a single simple parameter, so a 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists projects from LangSmith workspace, with a specific verb ('List') and resource ('projects'). It doesn't explicitly distinguish from sibling tools like ls_list_runs, but the resource name is different enough to avoid confusion, and it mentions the workspace context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing projects, but provides no guidance on when to use this vs. alternatives like ls_list_runs or ls_list_children. It does document the limit parameter's default and range, which gives some context, but lacks explicit exclusions or alternative recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ls_list_runsA
List recent runs from LangSmith (root-only by default).
Args: project_name: LangSmith project name (required) is_root: Only return root runs when true (default: True) run_type: Filter by run type (e.g., 'llm', 'chain', 'tool') error: Filter by error status - True=failed only, False=successful only, None=all start_minutes_ago: Lookback window in minutes (default: 1440 = 24 hours, min: 1) limit: Maximum runs to return (default: 50, range: 1-200) select: List of fields to return (default: id, name, run_type, start_time, end_time, error, tags, extra)
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| limit | No | ||
| select | No | ||
| is_root | No | ||
| run_type | No | ||
| project_name | Yes | ||
| start_minutes_ago | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| items | Yes | |
| next_cursor | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden. It discloses default behavior (root-only, 24-hour lookback, limit 50, selected fields) and parameter semantics. It does not explicitly mention that it is read-only, but the operation is inherently non-destructive and the defaults provide useful behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with a concise purpose statement followed by a well-structured, line-by-line argument list. It is slightly long but every line adds value, and the formatting improves readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
At 7 parameters with 1 required, the description covers all parameter meanings, defaults, and constraints. The presence of an output schema relieves the need to describe return values. The tool is fully specified for an agent to understand when and how to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds substantial meaning beyond the schema, explaining each parameter's purpose (e.g., 'error: Filter by error status - True=failed only, False=successful only, None=all'), with ranges and defaults. This fully compensates for the 0% schema description coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List recent runs from LangSmith (root-only by default)' with a specific verb, resource, and scope. The 'root-only' qualifier distinguishes it from sibling tools like ls_list_children, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context (listing recent runs with filtering) but does not explicitly state when to use this tool versus alternatives like ls_list_children or ls_read_run. No exclusions or alternative references are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ls_read_runA
Read a single run with optional children hydration.
Args: run_id: Run ID to fetch (required) hydrate_children: Include child spans in response (default: False) child_limit: Maximum children to return when hydrate_children=True (default: 100, range: 1-500)
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | ||
| child_limit | No | ||
| hydrate_children | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| run | Yes | |
| url | No | |
| children | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that hydrate_children defaults to False, that child_limit only applies when hydrate_children=True, and provides the valid range for child_limit. 'Read' implies a non-destructive operation, covering the safety profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with a clear opening sentence and an Args list. Every sentence adds value; there is no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for a simple read tool with three parameters and an output schema present. It explains defaults, ranges, and the relationship between hydrate_children and child_limit, covering all necessary behavioral context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates by explaining each parameter: run_id is required, hydrate_children includes child spans with a default, and child_limit specifies the maximum and range. This adds significant meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads a single run, with an optional children hydration feature. It is specific and distinguishes from sibling tools like ls_list_runs (which lists) and ls_list_children (which lists children).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for fetching a single run's details, which is clear from the verb 'Read' and the resource 'single run'. It does not explicitly name alternatives or exclusions, but the purpose is unambiguous enough for an agent to infer when to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
ls_get_run_url - First observed
ls_list_children - First observed
ls_list_projects - First observed
ls_list_runs - First observed
ls_read_run
TDQS
Each tool targets a distinct resource and action: listing runs, reading a single run, generating a URL, listing children, and listing projects. There is no ambiguity or overlap between them.
All tools share a consistent 'ls_' prefix, but the verbs mix 'list', 'read', and 'get', creating a slight inconsistency. The pattern is still readable and predictable, but not as uniform as a pure verb_noun convention.
Five tools is a well-scoped set for exploring LangSmith runs and projects. Each tool serves a specific purpose without redundancy or bloat.
The set covers all essential read-only workflows for runs, children, and projects. Minor gaps exist, such as no direct project detail tool or search/filter beyond what's offered, but these are workarounds and not dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Query Honeycomb observability data: traces, events, metrics, SLOs, triggers, and boards.
Read-only access to your Citlyze workspace: AI search visibility, citations, and recommendations.
Query OneLens cloud-cost data in natural language: breakdowns, trends, cost centers. Read-only.
Related MCP Servers
AlicenseAqualityFmaintenanceEnables language models to access LangSmith observability platform features including fetching conversation history, managing prompts, retrieving traces and runs, working with datasets and examples, and analyzing experiments.13131MIT- AlicenseBqualityDmaintenanceQuery Langfuse traces, schema and datasets, scores and metrics, debug exceptions, analyze sessions, and manage prompts. Full observability toolkit for LLM applications.553MIT
- AlicenseNot gradedqualityCmaintenanceEnables read-only access to SwanLab workspaces, projects, runs, and metrics through the Model Context Protocol.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM clients to query SQL databases via natural language with read-only, AST-validated, and capped queries, ensuring safety guarantees.2MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/don-aie-cohort8/langsmith-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server