π
App Fastmcp Example
A basic MCP app example with fastmcp Python backend
0 installs
Trust: 34 β Low
Search
Ask AI about App Fastmcp Example
Powered by Claude Β· Grounded in docs
I know everything about App Fastmcp Example. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
MCP Demo Counter App
An interactive counter UI demonstrating MCP Apps SDK with Python/FastMCP and React.
Quick Start
npm install && uv sync
npm run build
uv run python server.py
For stdio transport: uv run python server.py --stdio
Tools
| Tool | Description |
|---|---|
get-counter | Get current value and display UI |
increment-counter | Increment by amount |
decrement-counter | Decrement by amount |
reset-counter | Reset to zero |
Project Structure
βββ server.py
βββ pyproject.toml
βββ src/
β βββ mcp-app.tsx
β βββ mcp-app.module.css
β βββ global.css
βββ mcp-app.html
βββ dist/
βββ vite.config.ts
βββ package.json
How It Works
- Server registers MCP tools linked to a UI resource
- Host fetches the bundled HTML when a tool is called
- React app connects via
useApphook from@modelcontextprotocol/ext-apps - UI calls server tools via
app.callServerTool()
Development
npm run build # Static app page
uv run python server.py # MCP server
Port defaults to 3001. Override with PORT=8080 uv run python server.py.
