Build and share data apps and ML dashboards.
## Streamlit MCP Server: Data Apps in Pure Python The **Streamlit MCP Server** integrates Streamlit's rapid app development framework into Google Antigravity. This open-source library turns Python scripts into interactive web applications in minutes, perfect for data science demos, ML prototypes, and internal tools. ### Why Streamlit MCP? Streamlit revolutionizes Python app development: - **Pure Python**: No frontend knowledge required - **Instant Updates**: Hot reload during development - **Rich Widgets**: Charts, tables, inputs built-in - **Data Native**: Optimized for data applications - **Free Hosting**: Deploy to Streamlit Community Cloud ### Key Features #### 1. Interactive Dashboards ```python import streamlit as st import pandas as pd st.title("Sales Dashboard") # File upload uploaded_file = st.file_uploader("Upload CSV", type="csv") if uploaded_file: df = pd.read_csv(uploaded_file) # Filters region = st.selectbox("Region", df["region"].unique()) filtered = df[df["region"] == region] # Visualizations st.bar_chart(filtered.groupby("product")["sales"].sum()) st.dataframe(filtered) ``` #### 2. ML Model Interfaces ```python import streamlit as st from transformers import pipeline @st.cache_resource def load_model(): return pipeline("sentiment-analysis") st.title("Sentiment Analyzer") model = load_model() text = st.text_area("Enter text to analyze:") if st.button("Analyze"): with st.spinner("Analyzing..."): result = model(text) st.success(f"Sentiment: {result[0]['label']} ({result[0]['score']:.2%})") ``` #### 3. Multi-Page Apps ```python # pages/1_Data_Explorer.py import streamlit as st st.title("Data Explorer") # Page content... # pages/2_Model_Training.py import streamlit as st st.title("Model Training") # Page content... # Streamlit automatically creates navigation ``` ### Configuration ```json { "mcpServers": { "streamlit": { "command": "npx", "args": ["-y", "@anthropic/mcp-streamlit"], "env": { "STREAMLIT_SERVER_PORT": "8501", "STREAMLIT_BROWSER_GATHER_USAGE_STATS": "false" } } } } ``` ### Use Cases **Data Exploration**: Build interactive dashboards for exploring datasets and visualizing insights. **ML Demos**: Create polished demos of machine learning models for stakeholders. **Internal Tools**: Rapidly build internal tools for data processing and analysis. The Streamlit MCP Server enables rapid data app development in Antigravity.
{
"mcpServers": {
"streamlit": {}
}
}