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.
- Python 3.11+
- uv
- Make,
curl, andtar - 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
Install the Python dependencies:
make installCreate your local environment file:
cp .env.example .envEdit .env and set:
OPENAI_API_KEY=sk-...Seed the demo database:
make seedStart the sales MCP server:
make sales-mcpIn a second terminal, start the LangGraph skills agent:
make skills-agentKeep both terminals running while you use the demo.
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_serverUse these environment variables for that MCP server:
LANGGRAPH_URL=http://127.0.0.1:2024
LANGGRAPH_ASSISTANT_ID=skills_agentReplace /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.
- Start
make sales-mcpbeforemake skills-agent. - The first
make skills-agentrun downloads the pinned skills-agent release into.skills-agent/.