Sandbox Studio MCP Server
OfficialClick 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., "@Sandbox Studio MCP ServerCreate a template for my students with a $50 budget and EC2 access only"
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.
Sandbox Studio MCP Server
A local Model Context Protocol (MCP) server that connects AI assistants to the Sandbox Studio API. This lets you manage AWS sandbox accounts, leases, templates, events, and settings through natural language conversations.
Install
After installing, run
npx sandbox-studio-mcp initto configure your credentials.
Related MCP server: AWS SSO MCP Server
What is this?
Sandbox Studio is a platform for managing temporary AWS accounts — useful for training, labs, hackathons, and development sandboxes. This MCP server exposes the full Sandbox Studio API as tools that AI assistants (Claude, Kiro, Cursor, etc.) can call on your behalf.
Example conversations:
"Create a template for my students with a $50 budget and EC2 access only"
"Request a lease for the VS Code Server template and tell me when it's ready"
"Show me all pending approvals and deny Emma's requests"
"Terminate all my leases except the GPU one"
How it works
┌─────────────────┐ stdio ┌──────────────────┐ HTTPS ┌─────────────────────┐
│ AI Assistant │◄────────────────►│ MCP Server │◄───────────────►│ Sandbox Studio │
│ (Kiro/Claude/ │ │ (this project) │ OAuth2 │ API │
│ Cursor) │ │ │ │ │
└─────────────────┘ └──────────────────┘ └─────────────────────┘The AI assistant spawns the MCP server as a local subprocess
When you ask a question, the AI decides which tools to call
The MCP server authenticates with Sandbox Studio using OAuth2 client credentials
API responses are returned to the AI, which formats them for you
Prerequisites
Node.js >= 18
pnpm (or npm)
A Sandbox Studio instance with API access
OAuth client credentials — create these in the Sandbox Studio admin panel
Quick Start
1. Configure credentials
npx sandbox-studio-mcp initThis will prompt you for:
Instance URL — your Sandbox Studio base URL (e.g.
https://sandbox.example.com)Client ID — from your OAuth client in the Sandbox Studio admin panel
Client Secret — from your OAuth client
To create OAuth credentials, go to your Sandbox Studio admin panel → API Clients → Create new client.
2. Connect to your AI assistant
Kiro
Add to ~/.kiro/settings/mcp.json:
{
"mcpServers": {
"sandbox-studio": {
"command": "npx",
"args": ["-y", "sandbox-studio-mcp"]
}
}
}Claude Code
claude mcp add sandbox-studio -- npx -y sandbox-studio-mcpCursor / VS Code (manual)
Add to your MCP settings (or use the one-click badges above):
{
"mcp": {
"servers": {
"sandbox-studio": {
"command": "npx",
"args": ["-y", "sandbox-studio-mcp"]
}
}
}
}Codex
Add to ~/.codex/config.json:
{
"mcpServers": {
"sandbox-studio": {
"command": "npx",
"args": ["-y", "sandbox-studio-mcp"]
}
}
}AI Behaviour Guidance
The MCP server includes guidance in tool descriptions that shapes how the AI interacts with you. This is one of the key design patterns of this project:
Safety guardrails
Lease termination — When terminating multiple leases, the AI will list them clearly, distinguish between your own and others' leases, and ask for confirmation before proceeding.
Bulk operations — The AI won't batch-terminate or batch-deny without explicit confirmation.
Template creation prompts
When creating templates, the AI is guided to ask about:
Tags for categorisation
Custom icon and colour
Manager/approver configuration
Launch script convention
When the AI writes launch scripts for templates, it uses set-sandbox-output instead of echo to expose variables to the lease owner in the Sandbox Studio UI:
set-sandbox-output --name "Public IP" --value "$PUBLIC_IP"
set-sandbox-output --name "Admin Password" --value "$PASSWORD" --is-secretThe --is-secret flag masks the value in the UI.
Response enrichment
When templates or leases are created, the response includes a _link field with a direct URL to the resource in the Sandbox Studio UI.
OAuth2 Authentication
The server uses the OAuth2 client credentials grant flow:
On first API call, it requests a token from
{instanceUrl}/api/oauth/tokenThe token is cached in memory with a 60-second refresh buffer
On 401 responses, it automatically clears the cache and retries
HTML responses (login page redirects) are detected and trigger a token refresh
To create OAuth credentials, go to your Sandbox Studio admin panel → API Clients → Create new client.
Available Tools (65+)
Leases
Tool | Description |
| List leases with filtering by status, user, date |
| Get lease details by ID |
| Request a new lease from a template |
| Update lease budget/duration/expiration |
| Suspend an active lease |
| Resume a suspended lease |
| Approve or deny a lease request |
| Terminate a lease (irreversible) |
| Withdraw a pending request |
| List shared users |
| Share with additional users |
| Remove shared users |
| Get setup/activity logs |
| Get build output secrets |
Templates
Tool | Description |
| List templates available for lease requests |
| List templates you manage |
| Create a new template |
| Get full template details |
| Delete a template |
| Get basic info (name, description, icon) |
| Update basic info |
| List leases for a template |
| Get IAM permission config |
| Update IAM permissions |
| Get launch/setup scripts |
| Update launch/setup scripts |
| Update budget settings |
| Update duration settings |
| Update managers/approvers |
| Update sharing settings |
| Update tags |
Accounts
Tool | Description |
| List sandbox accounts |
| List available unregistered accounts |
| Get account details |
| Import AWS accounts into the pool |
| Eject accounts from the pool |
| Get lease history for an account |
| Retry failed cleanup |
| Get cleanup logs |
| Get failed cleanup resources |
Events
Tool | Description |
| List events with status filtering |
| Create a new event |
| Get event details |
| Update an event |
| Get event teams |
| Add teams to an event |
| Assign a team owner |
| Provision event accounts |
| Start a provisioned event |
| Terminate an event |
Approvals & Reporting
Tool | Description |
| List pending approval requests |
| Get cost reporting data |
Admin Jobs
Tool | Description |
| Run drift detection |
| Run lease monitoring |
Settings
Tool | Description |
| Get global platform config |
| Update global config |
| Get runtime config |
| Get nuke config |
| Update nuke config |
| Get cleanup hook script |
| Update cleanup hook |
| Get email templates |
| Update email templates |
| Send test email |
| Get SMTP config |
| Update SMTP config |
Users & Identity
Tool | Description |
| List users from identity provider |
| List groups from identity provider |
| Validate user IDs exist |
| Update user preferences |
| List all OAuth clients (admin) |
| List your OAuth clients |
| Create an OAuth client |
| Update an OAuth client |
| Delete an OAuth client |
| Get current terms of service |
| List ToS versions |
| Get specific ToS version |
| Publish new ToS |
| Get all template tags |
| Validate an S3 path |
Project Structure
src/
├── index.ts # Entry point — registers all tools, connects via stdio
├── config.ts # Config file management (~/.sandbox-studio-mcp/config.json)
├── auth.ts # OAuth2 client_credentials token management
├── client.ts # HTTP client with auth, retry, and HTML detection
├── init-config.ts # Interactive config setup CLI
└── tools/
├── leases.ts # Lease lifecycle tools
├── accounts.ts # Account pool management
├── templates.ts # Template configuration (with AI guidance)
├── events.ts # Events, approvals, reporting, admin jobs
├── settings.ts # Cleanup, email, SMTP, global config
└── users.ts # Users, groups, OAuth clients, ToS, tagsDevelopment
# Build
pnpm build
# Watch mode (rebuild on change)
pnpm dev
# Run directly
node dist/index.jsExtending
Adding a new tool
Choose the appropriate file in
src/tools/Register the tool with
server.registerTool(name, schema, handler)Use
apiRequest(config, options)to call the Sandbox Studio API
Adding AI guidance
Use the tool's description field to influence AI behaviour:
server.registerTool("my_tool", {
description: `Do something.
IMPORTANT: Always ask the user about X before calling this tool.
Never do Y without explicit confirmation.`,
inputSchema: { ... }
}, handler);This is the primary mechanism for shaping how AI assistants use your tools.
Troubleshooting
Problem | Solution |
HTML responses instead of JSON | Check that |
401 errors | Verify client credentials are valid and the OAuth client is active |
Token refresh loops | The OAuth client may have been deleted — recreate in admin panel |
Tools not appearing | Rebuild ( |
License
MIT
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.
Latest Blog Posts
- 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/sandboxstudiosoftware/sandbox-studio-mcp-public'
If you have feedback or need assistance with the MCP directory API, please join our Discord server