Skip to main content
Glama
don-aie-cohort8

LangSmith MCP Server

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 filtering

  • ls_read_run(run_id, hydrate_children=False, child_limit=100) — Read single run with optional children

  • ls_get_run_url(run_id) — Generate shareable LangSmith URLs

  • ls_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_KEY in your environment

  • Optional: LANGSMITH_ENDPOINT for 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 -v

Run 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.json

Alternative (direct Python):

uv run python src/server.py

FastMCP Cloud Deployment

Deploy to FastMCP Cloud for free hosting:

  1. Push to GitHub: don-aie-cohort8/langsmith-mcp-server

  2. Sign in to https://fastmcp.cloud

  3. Create new project:

    • Repository: don-aie-cohort8/langsmith-mcp-server

    • Branch: main

    • Entrypoint: src/server.py:app

  4. Add environment variable: LANGSMITH_API_KEY

  5. Deploy!

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 fastmcp per official FastMCP recommendations

  • Creates isolated environment with clean dependency management

  • Avoids dependency on global fastmcp installation

  • Runtime dependencies pulled from pyproject.toml via editable install

  • No 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 file

Dependency 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 payloads

  • LangGraph 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 tools
ls_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/...)

ParametersJSON Schema
NameRequiredDescriptionDefault
run_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
parent_run_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsYes

TDQS

A4.6/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsYes
next_cursorNo

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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)

ParametersJSON Schema
NameRequiredDescriptionDefault
errorNo
limitNo
selectNo
is_rootNo
run_typeNo
project_nameYes
start_minutes_agoNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsYes
next_cursorNo

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness4/5

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.

Completeness5/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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)

ParametersJSON Schema
NameRequiredDescriptionDefault
run_idYes
child_limitNo
hydrate_childrenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
runYes
urlNo
childrenNo

TDQS

A4.6/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 5 tool updatesv0.1.0
    • First observedls_get_run_url
    • First observedls_list_children
    • First observedls_list_projects
    • First observedls_list_runs
    • First observedls_read_run

TDQS

A4.1/5.0
Disambiguation5/5

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.

Naming Consistency3/5

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.

Tool Count5/5

Five tools is a well-scoped set for exploring LangSmith runs and projects. Each tool serves a specific purpose without redundancy or bloat.

Completeness4/5

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

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables 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.
    13
    131
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Query Langfuse traces, schema and datasets, scores and metrics, debug exceptions, analyze sessions, and manage prompts. Full observability toolkit for LLM applications.
    55
    3
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables LLM clients to query SQL databases via natural language with read-only, AST-validated, and capped queries, ensuring safety guarantees.
    2
    MIT

Latest Blog Posts

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