MCP Elicitation and Apps Demo
MCP server demonstrating elicitation for booking appointments and an interactive MCP App for viewing appointments with SQLite persistence.
README
MCP Elicitation and Apps Demo
A minimal MCP server demo with Elicitation and MCP Apps support for webinar presentations.
Features
- Elicitation Tool:
book_appointmentwith SQLite persistence - MCP App:
view_appointmentswith interactive HTML UI - Tailwind CSS: Modern, responsive interface
- Real-time Data: Live appointment statistics
- SQLite Database: Data persistence and sample data
- HTTP Transport: Endpoint at
http://localhost:3000/mcp
MCP Apps Feature
This demo now includes MCP Apps support with:
- Interactive HTML interface rendered in MCP hosts
- Tailwind CSS for modern styling
- Real-time appointment data visualization
- Statistics dashboard
- Sample data pre-loaded
Database Schema
CREATE TABLE appointments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
person TEXT NOT NULL,
duration_minutes INTEGER NOT NULL,
created_at TEXT NOT NULL
);
Installation
# Install dependencies
npm install
# Build TypeScript
npm run build
Running the Demo
Elicitation Demo (Original)
# Start the original elicitation server
npm start
# Or for development with auto-reload:
npm run dev
MCP Apps Demo (New)
# Start the MCP Apps server
npm run start:apps
# Or for development with auto-reload:
npm run dev:apps
Simple Test
To see the expected flow:
npm run test
Webinar Flow
- Start server:
npm start - Connect an MCP client to
http://localhost:3000/mcp - Ask: "Book an appointment with John"
- Elicitation asks for duration: 30 / 60 / 90 minutes
- Choose 60
- Open
appointments.dbin a SQLite GUI - Show the inserted row with John, 60 minutes, and timestamp
Tool Specifications
Book Appointment (Elicitation Demo)
Name: book_appointment
Initial input:
{
"person": "string"
}
Elicitation (when duration is missing):
- Message: "How long should the appointment be?"
- Schema: Enum of 30, 60, or 90 minutes
Result: Inserts into SQLite and returns confirmation message.
View Appointments (MCP App)
Name: view_appointments
Input: None required
Result: Opens an interactive HTML interface with:
- List of all appointments
- Statistics dashboard (total appointments, total duration, average duration)
- Real-time data refresh
- Modern Tailwind CSS styling
MCP App Features:
- Interactive UI rendered directly in MCP hosts
- HTML content served via MCP resources API
- Real-time data from SQLite database
Code Structure
Original Demo
src/server-simple.ts- Simple MCP server with Elicitation logicsrc/db.ts- SQLite database operationsappointments.db- SQLite database file (created on first run)
MCP Apps Demo
src/server-apps.ts- Extended server with MCP Apps supportsrc/appointments-ui.html- Interactive HTML interface with Tailwind CSSappointments.db- Shared SQLite database with sample data
Key Implementation Points
- Tool starts - Receives
personparameter - Elicitation - Detects missing
duration_minutes, returnsinputRequired - Continue - After user provides duration, completes operation and saves to DB
Testing
You can test both servers using any MCP-compatible client (Claude Desktop, VS Code with MCP extension, etc.) by connecting to http://localhost:3000/mcp.
Testing Elicitation Demo
- Connect to
http://localhost:3000/mcp - Call
book_appointmentwith{"person": "John"} - Server will elicit for duration (30/60/90 minutes)
- Provide duration to complete the appointment
Testing MCP Apps Demo
- Start the MCP Apps server:
npm run start:apps - Connect to
http://localhost:3000/mcp - Call
view_appointments(no parameters needed) - MCP host will render the interactive HTML interface
- Explore appointments with statistics and real-time data
Requirements
- Node.js 18+
- SQLite GUI (for viewing the database during demo)
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.
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.