Sales Explorer
A minimal MCP server that demonstrates an interactive bar chart UI for sales data exploration, enabling drill-down by clicking a region without requiring additional model turns.
README
Sales Explorer — a minimal MCP App
A tiny, dependency-light demo of an MCP App: an interactive UI that an MCP server ships into an AI host (Claude, etc.), rendered in a sandboxed iframe right in the conversation.
The whole point is one moment: you click a bar and the chart drills down with no model round-trip — and the assistant still knows what you're looking at.
The three beats this demonstrates
- UI in the chat, not text. Ask "show me sales by region" → a bar chart renders inline instead of a table of numbers.
- Bidirectional, model-free interaction. Click a region → the iframe calls
the
get_salestool itself and re-renders. No new prompt, no model turn. - The model stays in the loop. After drilling in, the app tells the host what you're viewing, so you can then say "email this to my team" and it knows what "this" is.
How it works (the two files that matter)
server.ts— registers a tool (get_sales) whose_meta.ui.resourceUripoints at a UI resource (ui://sales-explorer/mcp-app.html). That one line of metadata is what turns a normal tool into an MCP App.src/mcp-app.ts— the iframe app. It renders the chart from the result the host pushes in (app.ontoolresult), and on a bar click callsapp.callServerTool({ name: "get_sales", arguments: { region } }).
The UI is bundled by Vite into a single self-contained HTML file
(dist/mcp-app.html) so the server can return it as one resource with no
external asset requests.
Run it
Requires Node ≥ 22.18 (run TypeScript directly — no tsx/ts-node).
npm install
npm run dev # builds the UI on change + serves MCP over HTTP on :3001
- HTTP endpoint:
http://localhost:3001/mcp(Streamable HTTP, stateless) - stdio:
npm run start:stdio
Then point an MCP-Apps-capable host at it (Claude Desktop, MCPJam, VS Code Copilot, …) and ask: "show me sales by region."
Verify without a host (curl)
npm start & # build UI + serve
# list tools — note the _meta.ui.resourceUri on get_sales
curl -s -H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-X POST http://localhost:3001/mcp \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
# the drill-down the iframe performs on a click
curl -s -H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-X POST http://localhost:3001/mcp \
--data '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_sales","arguments":{"region":"EMEA"}}}'
Project layout
server.ts # MCP server: get_sales tool + ui:// resource
main.ts # transport (Streamable HTTP / stdio)
mcp-app.html # UI shell (bundled into dist/mcp-app.html)
src/mcp-app.ts # the iframe app: render chart, click -> callServerTool
src/styles.css # chart styling (uses host theme variables when provided)
vite.config.ts # single-file bundle config
Built on @modelcontextprotocol/ext-apps + @modelcontextprotocol/sdk.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.