Skip to main content
Glama
Sales MCP Server

Sales MCP Server

by pessini

LangGraph MCP Prefab UI Demo

This is the companion repository for the blog post Interactive LangGraph UIs with MCP Apps: Serving Inline Cards for Human-in-the-Loop Agents.

The goal of this demo is to show a LangGraph skills agent inside an MCP client with an inline Prefab UI. The example uses a sales analytics skill, a local SQLite database, and human-in-the-loop review buttons.

Prerequisites

  • Python 3.11+

  • uv

  • Make, curl, and tar

  • An OpenAI API key, unless you configure the demo to use Ollama

  • An MCP client that can launch a stdio server and render MCP Apps UI

Related MCP server: Business MCP Server

Setup

Install the Python dependencies:

make install

Create your local environment file:

cp .env.example .env

Edit .env and set:

OPENAI_API_KEY=sk-...

Seed the demo database:

make seed

Run

Start the sales MCP server:

make sales-mcp

In a second terminal, start the LangGraph skills agent:

make skills-agent

Keep both terminals running while you use the demo.

MCP Client

Add this server command to your MCP client config:

uv --directory /ABSOLUTE/PATH/TO/langgraph-mcp-prefab-ui run python -m langgraph_prefab_ui.prefab_server

Use these environment variables for that MCP server:

LANGGRAPH_URL=http://127.0.0.1:2024
LANGGRAPH_ASSISTANT_ID=skills_agent

Replace /ABSOLUTE/PATH/TO/langgraph-mcp-prefab-ui with the path to your clone.

Then ask your MCP client:

Show 2025 enterprise sales and investigate anomalies.

You should see an inline dashboard with the sales trend, source rows, and Investigate / Dismiss buttons.

Notes

  • Start make sales-mcp before make skills-agent.

  • The first make skills-agent run downloads the pinned skills-agent release into .skills-agent/.

Available Tools

3 tools
ask_agentA

Ask the LangGraph skills agent a natural-language question and render its response as a Prefab dashboard card.

Call this tool whenever the user asks a question that matches any of the loaded skills below — even when the user does not explicitly say "use the skills agent". Do not answer from memory or invent data; route the question through this tool so the agent can query the live database, detect anomalies, and pause for human review when needed.

Loaded skills:

  • sales-analytics: Answer questions about monthly sales performance from the local sales database. Query revenue, deals, and gross margin by year/region/segment; detect significant revenue drops; escalate anomalies for human review. Keywords: sales, revenue, deals, margin, anomaly, region, segment, enterprise, mid-market, EMEA, North America, monthly performance.

Pass an optional thread_id to continue a prior conversation; omit for a fresh thread. The agent runs on LangGraph at LANGGRAPH_URL and returns either a final answer or a paused state with an Investigate / Dismiss review card.

Inputs: question (required), thread_id.

check_review_statusB

Return {reviewed, decision_result} for a thread.

Called from the dashboard's on_mount so the rendered card stays in sync with the latest LangGraph checkpoint after iframe remount.

Inputs: thread_id (required). Returns: object

resume_reviewB

Resume a paused thread with the human's decision.

Returns a Prefab component tree (NOT a PrefabApp) so the dashboard's Slot("decision_result") can inject it inline without a remount.

Inputs: decision (required), thread_id (required), request_id (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: ask_agent for querying the agent, resume_review for resuming paused threads, and check_review_status for querying thread state. No overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with underscores (ask_agent, resume_review, check_review_status), making them predictable and clear.

    Tool Count5/5

    Three tools is well-suited for a focused agent interface server. Each tool covers a core interaction step (ask, resume, check status) without unnecessary extras.

    Completeness5/5

    The tool set provides full lifecycle support for the sales analytics agent: asking questions, handling human reviews, and checking status. No obvious gaps for the intended use case.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Query SQL databases (SQLite, PostgreSQL, BigQuery, Databricks) in natural language through a business semantic layer — glossary, metrics, and a data dictionary grounded against your real schema. Read-only by default, with an embedded SQLite + sqlite-vec metadata store and no external infra required.
      25
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI to query a business database for customers, orders, and revenue using natural language through safe, well-defined tools.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural-language sales queries against a SQLite database, generating and executing read-only SQL through a secure MCP server with table listing, schema description, and query execution.
      -