AI Studio MCP Server
A comprehensive Model Context Protocol server for Google AI Studio automation using Playwright. This server provides tools, resources, and prompts for end-to-end development workflows - from project creation through deployment.
Features
🛠️ Tools (5 automation functions)
- aistudio_login - Authenticate to Google AI Studio
- aistudio_create_repo - Create GitHub repository for project
- aistudio_commit_and_deploy - Commit to GitHub and deploy to Cloud Run
- aistudio_clone_repository - Clone repository locally
- aistudio_wait_for_implementation - Wait for Gemini to complete implementation
📚 Resources (12 documentation files)
All documentation accessible via MCP resources protocol:
aistudio://docs/start-here- Quick start and navigation guideaistudio://docs/workflow-new-project- Complete new project lifecycleaistudio://docs/workflow-existing-project- Enhancement workflowaistudio://docs/ai-features-catalog- AI capabilities referenceaistudio://docs/browser-automation-reference- Playwright commandsaistudio://docs/llm-decision-guide- Decision-making frameworkaistudio://docs/best-practices-antipatterns- Troubleshooting guideaistudio://docs/mcp-server-setup- Server configurationaistudio://docs/mcp-quick-reference- Quick lookup reference- Plus 3 legacy documentation files
💬 Prompts (4 workflow templates)
- create-new-project - Full workflow for new projects
- enhance-existing-project - Add features/fix bugs
- add-ai-features - Integrate AI capabilities
- troubleshoot-workflow - Debug issues
Installation
Recommended: Standalone Script (No Installation Required)
The easiest way to use this server is with the standalone script:
python /path/to/src/aistudio/aistudio_mcp_server.py
No dependencies or installation needed - just point to the file!
Alternative: Using uv (for package installation)
# No installation needed - use uvx directly
uvx mcp-server-aistudio
Alternative: Using pip
pip install mcp-server-aistudio
Prerequisites
- Playwright: Install and setup browsers
playwright install chromium
-
Google Account: Access to Google AI Studio and Google Cloud Platform
-
GitHub Account: For repository creation (automated via AI Studio)
Configuration
Recommended: Standalone Script
Add to claude_desktop_config.json or .mcp.json:
{
"mcpServers": {
"aistudio": {
"command": "python",
"args": ["/absolute/path/to/src/aistudio/aistudio_mcp_server.py"]
}
}
}
Example (absolute path):
{
"mcpServers": {
"aistudio": {
"command": "python",
"args": ["/home/user/mcpservers/src/aistudio/aistudio_mcp_server.py"]
}
}
}
Alternative: Using uvx
{
"mcpServers": {
"aistudio": {
"command": "uvx",
"args": ["mcp-server-aistudio"]
}
}
}
Alternative: Using pip installation
{
"mcpServers": {
"aistudio": {
"command": "python",
"args": ["-m", "mcp_server_aistudio"]
}
}
}
Quick Start
1. First Time: Authenticate
Use the aistudio_login tool to authenticate and save session
This opens a browser where you manually log in to Google AI Studio. Your session is saved to ~/.playwright/aistudio_auth_state.json.
2. Create a New Project
Use the create-new-project prompt:
Prompt: create-new-project
Arguments:
- project_name: "my-ai-app"
- project_description: "A chatbot for customer support"
- google_cloud_project: "my-gcp-project-id"
This will:
- Guide you through the complete workflow
- Create AI Studio project with Gemini implementation
- Set up GitHub repository
- Deploy to Google Cloud Run
- Clone locally for development
3. Enhance Existing Project
Use the enhance-existing-project prompt:
Prompt: enhance-existing-project
Arguments:
- app_url: "https://aistudio.google.com/apps/drive/abc123"
- enhancement_description: "Add voice input support"
- google_cloud_project: "my-gcp-project-id"
4. Access Documentation
All documentation is available as MCP resources. LLM agents can read them directly:
Read resource: aistudio://docs/workflow-new-project
No need to look at external files - everything is accessible through the MCP!
Workflows
Creating a Brand New Project
Time: ~2-3 minutes for full workflow
-
Authentication (one-time)
- Tool:
aistudio_login
- Tool:
-
Project Creation
- Manually create project in AI Studio
- Send implementation prompt to Gemini
- Tool:
aistudio_wait_for_implementation(90+ seconds)
-
Repository Setup
- Edit project name with UUID prefix
- Tool:
aistudio_create_repo
-
Deployment
- Tool:
aistudio_commit_and_deploy - Wait ~60 seconds for deployment
- Tool:
-
Local Development
- Tool:
aistudio_clone_repository - Review and iterate
- Tool:
Reference: Read aistudio://docs/workflow-new-project
Enhancing Existing Project
Time: ~10-15 minutes per enhancement
- Navigate to existing project URL
- Describe enhancement to Gemini
- Tool:
aistudio_wait_for_implementation - Tool:
aistudio_commit_and_deploy - Verify deployed application
Reference: Read aistudio://docs/workflow-existing-project
Adding AI Features
Time: Varies (5-15 minutes)
-
Explore Features
- Read
aistudio://docs/ai-features-catalog - Available: voice, chatbots, TTS, images, video, maps, search
- Read
-
Plan Implementation
- Read
aistudio://docs/llm-decision-guide - Craft feature-specific prompt
- Read
-
Implement & Deploy
- Send prompt to Gemini
- Wait for implementation
- Deploy and verify
Reference: Use add-ai-features prompt
Critical Timing Patterns
⏱️ Gemini Implementation: Minimum 90 seconds, typical 2-5 minutes ⏱️ Dialog Loading: 8-10 seconds for GitHub/Deploy dialogs ⏱️ Deployment: ~60 seconds for Cloud Run deployment ⏱️ Verification: 3 seconds between retry checks
Source: All timing patterns documented in aistudio://docs/browser-automation-reference
Troubleshooting
Common Issues
Authentication Fails
- Delete
~/.playwright/aistudio_auth_state.json - Run
aistudio_loginagain - Ensure browser allows cookies
Implementation Times Out
- Increase
timeout_secondsparameter - Verify Gemini prompt is clear
- Check browser is still open
Repository Creation Fails
- Verify GitHub integration in AI Studio
- Check repository name uniqueness
- Ensure you have GitHub permissions
Deployment Fails
- Verify Google Cloud project ID
- Check Cloud Run permissions
- Review project quotas
Use Troubleshooting Prompt
Prompt: troubleshoot-workflow
Arguments:
- issue_description: "Describe your issue here"
This will guide you through debugging with references to:
aistudio://docs/best-practices-antipatternsaistudio://docs/browser-automation-reference
Development
Project Structure
src/aistudio/
├── src/mcp_server_aistudio/
│ ├── __init__.py # Package exports
│ ├── __main__.py # Entry point
│ ├── server.py # MCP server (tools, resources, prompts)
│ ├── automation.py # Playwright automation (AIStudioAutomation class)
│ └── config.py # Configuration constants
├── docs/ # Documentation (exposed as MCP resources)
│ ├── 00-start-here.md
│ ├── 01-workflow-new-project.md
│ ├── 02-workflow-existing-project.md
│ ├── 03-ai-features-catalog.md
│ ├── 04-browser-automation-reference.md
│ ├── 05-llm-decision-guide.md
│ ├── 06-best-practices-antipatterns.md
│ ├── 07-mcp-server-setup.md
│ └── 08-mcp-quick-reference.md
├── pyproject.toml
├── README.md
└── LICENSE
Running Tests
cd src/aistudio
uv run pytest
Running Locally
cd src/aistudio
uv run mcp-server-aistudio
License
MIT License - see LICENSE file for details
Contributing
Contributions welcome! Please ensure:
- All documentation is updated
- New tools have corresponding documentation resources
- Timing patterns follow established guidelines
- Tests pass
Related Documentation
The MCP server exposes these as resources, but they're also available in docs/:
- Start Here: Complete navigation guide
- Workflows: New project and enhancement workflows
- AI Features: Catalog of AI capabilities
- Browser Automation: Playwright command reference
- Best Practices: Anti-patterns and solutions
- MCP Setup: Server configuration guide
Support
For issues, questions, or contributions:
- Create an issue in the repository
- Read
aistudio://docs/best-practices-antipatternsfor troubleshooting - Use the
troubleshoot-workflowprompt for guided debugging
Version: 0.1.0 Status: Alpha MCP SDK: 1.0.0+ Python: 3.10+ Playwright: 1.40+
Metadata
Release files for mcp-server-aistudio 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_server_aistudio-0.1.0.tar.gz | 77.4 kB | Without provenance | Details for mcp_server_aistudio-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_server_aistudio-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_server_aistudio-0.1.0-py3-none-any.whl |
Total release size: 92.3 kB
Release files / mcp_server_aistudio-0.1.0.tar.gz
| Download URL | mcp_server_aistudio-0.1.0.tar.gz |
|---|---|
| Size | 77.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09cd14763a2acdc7cbfa7296e2d0bb1f3936b8aa17909753e55a78f70ef12974
|
|
BLAKE2b-256 checksum How to use checksums |
01f26b8b3a3678c3f7863e7ffed8e36b9c03b695f5376fa3811659ee5c33be4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.1 cpython/3.10.19 HTTPX/0.28.1
|
Release files / mcp_server_aistudio-0.1.0-py3-none-any.whl
| Download URL | mcp_server_aistudio-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dc0425c4be209be95fd9d1aaf455a853e4b8dc313a1b8009b3b8f008cbf1a7d
|
|
BLAKE2b-256 checksum How to use checksums |
08cdf1116e53937d44fd4a8bb29d5c7116ecb2aa594e5ccf1fdd26bf17631209
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.1 cpython/3.10.19 HTTPX/0.28.1
|
Security for mcp-server-aistudio 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.