MCP Dynamic HTML App
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ MCP Dynamic HTML App
A Python-based Model Context Protocol (MCP) server that demonstrates dynamic HTML rendering with live data for ChatGPT applications.
๐ฏ What This Does
This app showcases how to build a dynamic ChatGPT app where:
HTML is rendered based on live data (not static assets)
Data is fetched from a simulated database
Content changes dynamically based on user queries
Perfect for dashboards, reports, and data visualizations
Related MCP server: widget-studio
๐๏ธ Architecture
Based on the Server-Side Dynamic HTML Rendering pattern:
ChatGPT โ MCP Tool Call โ Python Server โ Fetch DB Data โ Render HTML โ Return to ChatGPT๐ฆ Features
โ Three Dynamic Tools:
get_dynamic_dashboard- Live metrics dashboard with theme supportget_user_profile- User profile cards with real-time dataget_metrics_table- Interactive data tables (sales, performance, engagement)
โ Simulated Database - No setup required, works out of the box
โ Beautiful HTML - Modern, responsive designs with CSS
โ Easy Deployment - Deploy to Railway, Render, or any Python hosting
๐ Quick Start
1. Clone the Repository
git clone https://github.com/vikkysarswat/mcp-dynamic-html-app.git
cd mcp-dynamic-html-app2. Install Dependencies
pip install -r requirements.txt3. Run the Server
python server.py๐ง How to Use
With Claude Desktop (Recommended)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"dynamic-html": {
"command": "python",
"args": ["/path/to/mcp-dynamic-html-app/server.py"]
}
}
}Example Prompts
"Show me the dashboard"
"Get user profile for user_001"
"Display sales metrics table"
"Show me performance metrics with dark theme"๐ Project Structure
mcp-dynamic-html-app/
โโโ server.py # Main MCP server with tool definitions
โโโ database.py # Simulated database with sample data
โโโ html_renderer.py # HTML rendering templates
โโโ requirements.txt # Python dependencies
โโโ README.md # This file๐ ๏ธ Customization
Add Your Own Data Source
Replace the simulated database in database.py:
import sqlite3
async def get_user_data(user_id: str):
conn = sqlite3.connect('your_database.db')
cursor = conn.cursor()
cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
return cursor.fetchone()Create Custom HTML Templates
Add new rendering functions in html_renderer.py:
def render_custom_view(data):
return f"""
<!DOCTYPE html>
<html>
<!-- Your custom HTML -->
</html>
"""Add New Tools
Extend the tools list in server.py:
@server.list_tools()
async def handle_list_tools():
return [
# ... existing tools
types.Tool(
name="your_custom_tool",
description="Your tool description",
inputSchema={...}
)
]๐ข Deployment Options
Deploy to Railway
Fork this repository
Go to Railway.app
Click "New Project" โ "Deploy from GitHub"
Select this repository
Railway will auto-detect Python and deploy
Deploy to Render
Go to Render.com
Click "New" โ "Background Worker"
Connect your GitHub repository
Set build command:
pip install -r requirements.txtSet start command:
python server.py
Deploy to Heroku
heroku create your-app-name
git push heroku main๐ Example Use Cases
Business Dashboards - Real-time KPIs and metrics
User Management - Dynamic user profiles and lists
Data Reports - Interactive tables and charts
Analytics Views - Performance and engagement tracking
Admin Panels - System monitoring and alerts
๐งช Testing
Test the tools directly:
import asyncio
from database import get_user_data
from html_renderer import render_user_card
async def test():
user = await get_user_data("user_001")
html = render_user_card(user)
print(html)
asyncio.run(test())๐ Learn More
๐ค Contributing
Contributions welcome! Feel free to:
Add new HTML templates
Create additional tools
Improve the database layer
Add tests
๐ License
MIT License - feel free to use this in your projects!
๐ Credits
Created by Nilesh Vikky based on MCP dynamic HTML rendering patterns.
Happy Building! ๐
If you have questions or need help, open an issue or reach out!
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Render API: chart images, invoice and receipt PDFs with the math done, social images and video.
Generate images and PDFs from HTML/CSS, live websites, and reusable templates.
Render PDFs and images (invoices, receipts, OG images) from templates or HTML. 1 cent each.
Turn HTML or a live URL into polished PDF and Excel files โ hosted downloads, async jobs, history.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables agents to render shadcn-styled dashboards, forms, charts, and comparisons in a local browser via MCP tools.42MIT
- AlicenseAqualityDmaintenanceMCP server that lets agents create, display, and export rich UI widgets (cards, dashboards, charts, forms) inline in conversations, with interactive iframe support in MCP Apps hosts and PNG image fallback for other clients.3MIT

@sheetrender/mcpofficial
AlicenseAqualityBmaintenanceRenders PDFs from HTML templates or saved templates and spreadsheet data, with batch job support and document retrieval.1188 npm1MIT- AlicenseNot gradedqualityBmaintenanceA standalone stdio MCP server that exposes 13 resources, 3 prompts and 7 tools for assembling interactive, replayable HTML interfaces such as calculators, charts, maps, flowcharts and small apps. It returns the generated HTML document for the calling client to decide whether and how to display.MIT