Gemini-Cloud-Agent-MCP
Offers a Git tool for version control operations on the remote Linux filesystem, enabling tasks like cloning, committing, and branching.
Enables the agent to use Google Gemini as a model provider for AI-driven task execution and problem solving.
Enables full operation of a remote Linux machine, including shell commands, filesystem access, and process management.
Through the slack-gif-creator skill, enables interaction with Slack, such as creating and sending GIFs to channels.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gemini-Cloud-Agent-MCPrun a Python script that prints 'Hello' and show output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gemini Cloud Agent
Complete web application to operate a remote Linux computer with models via OpenRouter, OpenCode Zen, Google Gemini or TokenRouter: multi-step chat, persistent Vercel Sandbox, terminal, files, private uploads, verifiable artifacts, Git, previews and MCP Streamable HTTP server.
The agent does not just return commands for the user to run. When the task requires code or files, it uses real tools in the sandbox, reads stdout/stderr, fixes failures, validates the result and publishes the file for download.
What is implemented
Next.js 16, React 19, TypeScript, Tailwind CSS 4 and shadcn/ui.
Mobile/desktop interface with sidebar, chat, tool cards, logs, upload, STOP, continue, history, artifacts and downloads.
OpenRouter Free Models Router as recommended option, selectable OpenCode Zen/Google Gemini/TokenRouter, function calling and
ToolLoopAgentfrom AI SDK 7.Multi-step loop limited by
MAX_AGENT_STEPS.Vercel Sandbox 3 with isolated microVM, persistent filesystem and sandbox named per user/workspace.
Shell, filesystem, Git, web/download, processes, archives, artifacts and real port preview.
Supabase Auth with Google, Postgres/RLS and private Storage.
Direct upload via signed URL, without crossing the Vercel Function body limit.
Artifacts with size, SHA-256, MIME, database record and short signed URL.
Remote stateless MCP at
/mcp, current Streamable HTTP, OAuth 2.1 + PKCE/DCR and compatibility Bearer.MegaBrain Skills with progressive catalog of 19 Claude-compatible capabilities, installable resources in the sandbox and auditable origin/license.
Browser cancellation propagated to the model/command and sandbox interruption.
Local security tests and real cloud suite for the five mandatory scenarios.
Related MCP server: Containarium-Cloud
Architecture
Browser / celular
│
├── Supabase Auth (Google)
▼
Next.js UI + Route Handlers
├── Postgres/RLS ─ mensagens, runs, tools, workspaces
├── Storage privado ─ uploads e artifacts
▼
ToolLoopAgent (AI SDK) ─ OpenRouter / OpenCode Zen / Google / TokenRouter
│ tool ▲ resultado real
▼ │
Tool layer ─ Vercel Sandbox (microVM Linux persistente)
├── /workspace/uploads
├── /workspace/source
├── /workspace/output
├── /workspace/temp
├── /workspace/logs
└── /workspace/metadata
Clientes MCP ─ OAuth/Bearer ─ POST /mcp ─ Vercel Sandbox persistenteEach workspace receives a name derived by SHA-256 from user_id + workspace_id. persistent: true allows restoring the filesystem after the session stops. Application secrets are not injected into the sandbox.
Prerequisites
Node.js 22+.
Supabase project.
At least one compatible API key: OpenRouter, OpenCode Zen, Google Gemini or TokenRouter.
Vercel project with Sandbox access.
Locally: Vercel token, team ID and project ID. On deploy, OIDC is automatic.
The end user's computer does not take part in execution. After deployment, tasks and builds run in the cloud.
Installation
git clone <seu-repositorio>
cd gemini-cloud-agent
npm install
cp .env.example .env.localFill in .env.local, apply the migration and run:
npm run devThe application opens at http://localhost:3000.
Environment variables
Use .env.example as the complete source.
Variable | Usage |
|
|
| OpenRouter key, server-side only. |
| Default |
| OpenCode Zen key, server-side only. |
| Default |
| TokenRouter key, server-side only. |
| Default |
| Optional Gemini key. |
| Model ID used when the provider is |
| Supabase URL. |
| Current publishable key. |
| Alternative for legacy anon key. |
| Server-side only for the web interface and legacy smoke tests. |
| Local access to Sandbox. |
| OAuth password and compatibility Bearer, at least 24 characters. |
| Stable UUID used as isolated namespace for MCP sandboxes. |
| Maximum generations/tool rounds. |
| Maximum timeout per command. |
| Maximum session time. |
| Maximum per upload in bytes. |
| Maximum per artifact in bytes. |
| Limit checked before/after operations. |
| stdout/stderr truncation for model/log. |
| vCPUs; memory is tied to vCPUs. |
| Up to 15 preview ports. |
DEV_AUTH_BYPASS=true is for development only, requires service role and is ignored in production.
Supabase
Database and Storage
Link the project and apply the migration:
npx supabase login
npx supabase link --project-ref <project-ref>
npx supabase db pushThe migration creates workspaces, conversations, messages, agent_runs, tool_calls, files, artifacts, sandboxes, indexes, constraints, triggers and the private buckets uploads/artifacts.
The tables receive explicit grants for authenticated, since current projects may not expose new tables automatically. RLS still requires (select auth.uid()) = user_id on SELECT, INSERT, UPDATE and DELETE.
Google Auth
In Supabase: Authentication → Providers → Google.
Configure Google Client ID/Secret.
Add the callback indicated by Supabase in the Google Cloud Console.
Include
http://localhost:3000/auth/callbackand the production URL in the redirect URLs.
The server authorizes with supabase.auth.getClaims(), not getSession().
Uploads
The buckets are private; the first segment of the object path is always auth.uid(). The browser uses createSignedUploadUrl + uploadToSignedUrl; then the server downloads the authenticated object and materializes it in the sandbox. This way, uploads up to 50 MB do not enter the Vercel Function body.
Model and agent loop
By default, set OPENROUTER_API_KEY and keep OPENROUTER_MODEL=openrouter/free. This route picks a free model that supports the call requirements, including tools. Free models have variable availability and low limits; to pin a model, use a current :free ID from the OpenRouter catalog.
AI_PROVIDER=auto selects the first key present in this order: OpenRouter, OpenCode Zen, Google and TokenRouter. To pin an integration, use the corresponding name. OpenCode Zen uses the official OpenAI-compatible endpoint and a free model by default. Google Gemini accepts the models configured in GEMINI_MODEL. TokenRouter uses its OpenAI-compatible endpoint.
The selection lives in src/lib/ai/provider.ts and no key is sent to the browser or the sandbox.
The system prompt forces the agent to use the remote computer, inspect results, handle stderr, fix failures, validate files, call artifact_publish, hide private reasoning and not push externally without authorization.
The loop ends when the model concludes, an impossible condition/cancellation occurs, or MAX_AGENT_STEPS is reached.
MegaBrain Skills
The agent and the MCP expose a skills catalog loaded on demand. Only name and description are always in context; skill_read loads the relevant instructions, skill_resources queries scripts/references/assets and skill_install copies the full package to /workspace/metadata/skills/<name> when it needs to run in the microVM.
A versioned manifest records path, size and SHA-256 for each of the 234 resources. The 14 official skills are fetched from the pinned Anthropic commit only when used and every byte is verified against the manifest; the 5 native skills live in the deployment itself. This keeps the deployment light without accepting future changes from the upstream branch. Regenerate the manifest after updating sources with npm run skills:manifest.
The catalog was pinned on 24/08/2026 at commit 3b3fad96af16a10759d930941b4520ba0c40edae from anthropics/skills:
14 official Apache 2.0 skills:
academy-guide,algorithmic-art,brand-guidelines,canvas-design,claude-api,discernment-nudge,frontend-design,internal-comms,mcp-builder,skill-creator,slack-gif-creator,theme-factory,web-artifacts-builderandwebapp-testing.5 equivalent native implementations:
doc-coauthoring,docx,pdf,pptxandxlsx.
The four official documentary skills are source-available only and prohibit copying/redistribution outside Anthropic services; doc-coauthoring does not publish a redistribution license. Therefore these five were originally reimplemented for MegaBrain, keeping coverage without incorporating restricted material. The audit is in skills/PROVENANCE.json, and each official package keeps its LICENSE.txt and third-party notices.
Vercel Sandbox
The project uses the current universal SDK image, persistent sandbox and /workspace. Creation configures vCPU, timeout and ports. Isolation is a Firecracker microVM; Vercel plan limits prevail over application configuration.
In development, fill in the three Vercel credentials. On Vercel deploy, the SDK uses OIDC automatically.
For Android/heavy toolchains, use your own OCI/VCR image with JDK, Android command-line tools, SDK and Gradle already installed. Without a custom image, the agent can install dependencies in the persistent sandbox, subject to time and disk.
Tools
skill_list,skill_read,skill_resources,skill_installworkspace_infoshell_executefile_list,file_read,file_write,file_edit,file_deletemkdir,move_file,copy_fileartifact_list,artifact_publishgit_clone,git_status,git_diffdownload_url,web_fetchcreate_archive,extract_archiveprocess_list,process_killexpose_port
shell_execute calls bash -lc in the microVM, never in the Next.js process. It supports present/installed tools such as Python, pip, Node, npm, Git, curl, zip, Java and Gradle.
Artifacts
artifact_publish(path) resolves/protects the path, reads the real file, rejects empty/oversized, computes SHA-256, detects MIME, uploads to the private bucket, records in Postgres and returns /api/artifacts/:id/download. The download validates the user and creates a signed URL for 60 seconds.
The panel only offers Download for real artifacts records.
APKG
There is no fake generator. The agent installs a real library, such as genanki, generates the package, verifies ZIP/database/size/hash, and publishes it. The cloud suite covers a Teste deck with three cards.
Android APK
The agent can install JDK/Gradle/Android SDK and run ./gradlew assembleDebug. A pre-warmed VCR image is recommended. Push and GitHub Actions fallback are not automatic: they require credentials and explicit authorization for branch/push. The MVP offers public clone/status/diff without external mutation.
Preview
Start the server in the sandbox in background/detached mode and use expose_port. The port must be listed in SANDBOX_EXPOSED_PORTS. The link uses sandbox.domain(port) and exists while the session is active.
Cancellation
STOP cancels the HTTP stream. vercel.json enables supportsCancellation; the AbortSignal reaches the model and the command. The application calls sandbox.stop(), killing the session's processes. The persistent filesystem can be restored later.
Remote MCP
Endpoint of this installation: https://gemini-cloud-agent.vercel.app/mcp.
The transport is stateless Streamable HTTP. POST is supported; GET/DELETE return 405. The server publishes OAuth discovery, dynamic client registration, Authorization Code + PKCE, and refresh token. This allows adding just the URL in Gemini Spark.
In Gemini Spark:
Open
Settings & help→Connected Apps.Under
Custom apps for Spark, chooseAdd a custom app.Paste
https://gemini-cloud-agent.vercel.app/mcpand proceed.On the
Authorize Gemini Cloud Agentscreen, enter theMCP_SECRETvalue.
The connection is not activated automatically just by existing in the list. After connecting it, use /goal or /meta and describe the complete result. Both prompts forward the request to goal_run, which creates/reuses the computer, chooses skills, runs commands, verifies the delivery, and publishes the files in a single composite call. If the prompts menu does not appear, ask in natural language: @Gemini Cloud Agent use goal_run para ....
Gemini/Google controls the security confirmation shown before using a tool. The server cannot click Allow or disable this protection. The composite flow reduces an entire task to a single initial confirmation; destructive actions remain explicit.
Legacy clients can also use the Bearer directly:
Authorization: Bearer SEU_MCP_SECRETCompatibility configuration:
{
"name": "CloudComputer",
"url": "https://SEU-DOMINIO/mcp",
"headers": { "Authorization": "Bearer SEU_MCP_SECRET" }
}Tools: goal_run, skill_list, skill_read, skill_resources, skill_install, workspace_create, workspace_delete, workspace_info, shell_execute, file_list, file_read, file_write, file_edit, git_clone, artifact_list, artifact_publish.
All operate with workspace_id. Each ID maps to a named sandbox within the MCP_USER_ID namespace. The MCP does not depend on Supabase for terminal and files, and the secret is never sent to the microVM or the model.
goal_run uses only the configured free providers/models when ZERO_COST_MODE=true. New or changed files in /workspace/output are published automatically. The result includes a signed download_url, valid for 24 hours; after it expires, run artifact_publish again to generate another link. workspace_delete shuts down and deletes the indicated computer, so it should only be used when that deletion is truly desired.
To validate the public installation end to end — OAuth, MCP catalog, real Linux, autonomous goal, file content, signed download, and cleanup — run:
npm run test:cloudVercel Deploy
Push the repository to your Git provider.
Import it in the Vercel Dashboard.
Configure the production variables.
Confirm Sandbox access.
Configure the production callback in Supabase/Google.
Deploy.
Equivalent local validation:
npm run typecheck
npm run lint
npm test
npm run buildThe routes declare extended duration, but the effective limit depends on the plan. Commands run in the sandbox; the web function stays alive during the loop/stream.
Security
Arbitrary code only in the Vercel Sandbox.
No application env/secret is injected into the sandbox.
RLS on all tables and per-user Storage.
Service role only on the server.
shell_executerequires a Supabase session in the web UI or OAuth/Bearer in the MCP.MCP secret compared in constant time.
Paths normalized/restricted to
/workspace; root deletion blocked.Tool URLs block localhost, link-local, and private IPs.
ZIP/TAR is validated against traversal before extracting.
Timeouts, steps, vCPU/memory, upload, artifact, disk, read, and output are limited.
Logs truncate content and redact token/secret/password/API key.
Remote push/commit is not exposed by default.
The disk is checked before/after operations; the Sandbox's physical limit is the barrier during a command that grows quickly. In high-risk production, also restrict networkPolicy to necessary domains.
Costs and free tiers
The dashboard shows the active limits.
Steps/timeouts prevent loops and abandoned sessions.
Limited output/read reduce the context sent to the model.
Supabase Free currently includes database, storage, and egress quotas; maximum upload per file is 50 MB. Confirm the current table.
OpenRouter Free Models has a low shared limit and is not recommended for production; availability of each model varies.
Gemini, when used, has per-project/model quotas visible in AI Studio.
Vercel Sandbox charges for active CPU and plans limit duration/resources. Confirm quotas before opening the application to the public.
Sources: OpenRouter free models, Supabase pricing, Gemini rate limits, Vercel Sandbox.
Tests
Local, without cloud:
npm testThey verify traversal, private URLs, sanitization, and redaction.
Real cloud:
npm run test:cloudThe command uses the public production endpoint and performs OAuth, MCP initialization, skill read/install, workspace creation, file write and read, Linux command, autonomous goal_run, automatic publishing, signed download, and exact byte comparison. At the end, it removes only the temporary workspace it created itself.
The legacy administrative suite, which depends on TEST_USER_ID and additional local credentials, remains available as npm run test:cloud:extended.
Known limitations
shell_executestreamsstdoutandstderrprogressively to the event log and to the UI terminal. The terminal is for monitoring and does not expose an interactive PTY for manual input.Persistent filesystem depends on the Vercel plan's feature/snapshots.
Android SDK is not guaranteed in the universal image; use your own VCR for predictability.
Authenticated GitHub/push/Actions requires an explicit authorization flow.
PDFs are processed by libraries installed inside the sandbox, keeping untrusted content out of the web process.
Cloud smoke tests do not run in CI without secrets to avoid unexpected cost/external writes.
Troubleshooting
Supabase not configured
Check the URL and publishable/anon key, apply the migration, and restart the server.
Google login returns to the home screen
Check the provider, Supabase redirect URL, and Google callback. In production, use exactly https://SEU-DOMINIO/auth/callback.
401/403 or empty tables
Run the migration. Confirm Data API grants, RLS policies, and that the JWT has the same user_id.
Signed upload fails
Check buckets/policies, the plan limit, and MAX_UPLOAD_SIZE. The first path segment must be the user's UUID.
Sandbox does not authenticate locally
Check the Vercel token/team/project. In deployment, prefer OIDC and do not copy tokens unnecessarily.
Command expires
Increase MAX_EXECUTION_SECONDS within the plan limit or use an image with pre-installed dependencies.
MCP returns 401/503
401: complete the OAuth or send the correct Bearer. 503: MCP_SECRET or MCP_USER_ID is missing. The UUID is only the namespace for MCP sandboxes and does not need to exist in auth.users.
Artifact does not appear
The agent needs to call artifact_publish. Check tool_calls, the bucket policy, and MAX_ARTIFACT_SIZE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Artifact store for AI agents. Hosted OAuth at mcp.artifacta.io/mcp; local stdio via npm/PyPI.
Hosted runtime for persistent agent teams, durable workflows, memory, schedules, and goals.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create, manage, and execute code in isolated Firecracker microVM sandboxes via the MCP protocol, with support for sandbox lifecycle and file operations.2Apache 2.0
- AlicenseNot gradedqualityAmaintenancePersistent, secure LXC sandbox environments for AI agents with native MCP support.276Apache 2.0
- AlicenseAqualityAmaintenanceMCP server that gives AI agents isolated, named Linux computers with stable IDs and lifecycle control. Supports multiple backends like Docker, Fly Machines, Modal, and E2B, with a dashboard for managing sandboxes.73MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to securely operate isolated coding workspaces with file, command, Git, and deployment tools via authenticated remote MCP.8MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JOAO2666/Gemini-Cloud-Agent-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server