The python framework for ChatGPT apps
📚 Documentation: https://www.fastapps.org/
👥 Community: Join Our Discord
# 0. Set virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # Mac/Linux
.venv\Scripts\Activate.ps1 # Windows PowerShell
# 1. Install
pip install fastapps
# 2. Create project (includes example widget + auto npm install)
fastapps init my-app
# 3. Run
cd my-app
fastapps devThat's it! Your example widget is now running at a public URL. On first run, you'll need an ngrok auth token (free).
Option A: Test on MCPJam Inspector
Add your public URL + /mcp to ChatGPT: Example: https://xyz.ngrok-free.app/mcp
npx @mcpjam/inspector@latestOption B: Test on ChatGPT
Add your public URL + /mcp to ChatGPT's "Settings > Connectors": Example: https://xyz.ngrok-free.app/mcp
fastapps create another-widgetYou only need to edit these 2 files:
from fastapps import BaseWidget, Field, ConfigDict
from pydantic import BaseModel
from typing import Dict, Any
class MyWidgetInput(BaseModel):
model_config = ConfigDict(populate_by_name=True)
name: str = Field(default="World")
class MyWidgetTool(BaseWidget):
identifier = "my-widget"
title = "My Widget"
input_schema = MyWidgetInput
invoking = "Processing..."
invoked = "Done!"
widget_csp = {
"connect_domains": [], # APIs you'll call
"resource_domains": [] # Images/fonts you'll use
}
async def execute(self, input_data: MyWidgetInput) -> Dict[str, Any]:
# Your logic here
return {
"name": input_data.name,
"message": f"Hello, {input_data.name}!"
}import React from 'react';
import { useWidgetProps } from 'fastapps';
export default function MyWidget() {
const props = useWidgetProps();
return (
<div style={{
padding: '40px',
textAlign: 'center',
background: '#4A90E2',
color: 'white',
borderRadius: '12px'
}}>
<h1>{props.message}</h1>
<p>Welcome, {props.name}!</p>
</div>
);
}That's it! These are the only files you need to write.
We welcome contributions! Please see our contributing guidelines:
- Contributing Guide - How to contribute to FastApps
- Code Style Guide - Code formatting and style standards
- GitHub Workflows - CI/CD documentation
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/FastApps.git
cd FastApps
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pip install pre-commit
pre-commit install
# Make changes and ensure they pass checks
black .
ruff check --fix .
pytest
# Submit a pull requestMIT © Dooi Labs
- PyPI: https://pypi.org/project/fastapps/
- React Hooks: https://www.npmjs.com/package/fastapps
- GitHub: https://github.com/DooiLabs/FastApps
- MCP Spec: https://modelcontextprotocol.io/