Container Use
๐ฅPlug & Play
Watch the demo
This tutorial covers how to add the Container Use MCP Server as a Goose extension enabling Goose to work in an isolated environment.
TLDR
- Goose Desktop
- Goose CLI
Command
container-use stdio
Configurationโ
info
- Remote MCP
- Local MCP
- Goose Desktop
- Goose CLI
- Launch the installer
- Click
OK
to confirm the installation - Click the button in the top-left to open the sidebar
- Navigate to the chat
- Run the
configure
command:
goose configure
- Choose to add a
Command-line Extension
.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ โ Built-in Extension
โ โ Command-line Extension (Run a local command or script)
โ โ Remote Extension (SSE)
โ โ Remote Extension (Streaming HTTP)
โ
- Give your extension a name.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
- Enter the command to run when this extension is used.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ npx -y mcp-remote https://container-use.com/mcp
โ
- Enter the number of seconds Goose should wait for actions to complete before timing out. Default is
300
seconds.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ npx -y mcp-remote https://container-use.com/mcp
โ
โ Please set the timeout for this tool (in secs):
โ 300
โ
- Choose to add a description. If you select
No
, Goose will skip it.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ npx -y mcp-remote https://container-use.com/mcp
โ
โ Please set the timeout for this tool (in secs):
โ 300
โ
โ Would you like to add a description?
โ No
โ
- Choose
No
when asked to add environment variables.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ npx -y mcp-remote https://container-use.com/mcp
โ
โ Please set the timeout for this tool (in secs):
โ 300
โ
โ Would you like to add a description?
โ No
โ
โ Would you like to add environment variables?
โ No
โ
โ Added Container Use extension
- Goose Desktop
- Goose CLI
- Launch the installer
- Click
OK
to confirm the installation - Click the button in the top-left to open the sidebar
- Navigate to the chat
- Run the
configure
command:
goose configure
- Choose to add a
Command-line Extension
.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ โ Built-in Extension
โ โ Command-line Extension (Run a local command or script)
โ โ Remote Extension (SSE)
โ โ Remote Extension (Streaming HTTP)
โ
- Give your extension a name.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
- Enter the command to run when this extension is used.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ container-use stdio
โ
- Enter the number of seconds Goose should wait for actions to complete before timing out. Default is
300
seconds.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ container-use stdio
โ
โ Please set the timeout for this tool (in secs):
โ 300
โ
- Choose to add a description. If you select
No
, Goose will skip it.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ container-use stdio
โ
โ Please set the timeout for this tool (in secs):
โ 300
โ
โ Would you like to add a description?
โ No
โ
- Choose
No
when asked to add environment variables.
โ goose-configure
โ
โ What would you like to configure?
โ Add Extension
โ
โ What type of extension would you like to add?
โ Command-line Extension
โ
โ What would you like to call this extension?
โ Container Use
โ
โ What command should be run?
โ container-use stdio
โ
โ Please set the timeout for this tool (in secs):
โ 300
โ
โ Would you like to add a description?
โ No
โ
โ Would you like to add environment variables?
โ No
โ
โ Added Container Use extension
Example Usageโ
Here's a simple example of updating a file-based to-do app to use a SQLite database plus full testing - all within an isolated container environment.
Promptโ
Run a container agent to add a feature to save my to-do list data in sqlite, build and run tests, but use a separate Git branch so my main code stays safe.
Goose Outputโ
I'll help you create a container environment to add SQLite functionality to your to-do list application on a separate Git branch. Let me start by creating the environment and examining your current code structure.
โโโ environment_create | containeruse โโโโโโโโโโโโโโโโโโโโโโโโโโ
environment_source: ./examples/todo-list
explanation: ...
title: ...
Now let me set up the environment with the necessary tools and then proceed with the SQLite feature development:
โโโ environment_config | containeruse โโโโโโโโโโโโโโโโโโโโโโโโโโ
config:
base_image: python:3.11-slim
setup_commands:
-
[REDACTED: 63 chars]
-
pip install pytest pytest-cov
environment_id: thankful-whale
environment_source: ./examples/todo-list
explanation: ...
Let me install pytest after the environment is running:
---
Great! I've created a container environment for safely adding SQLite functionality to your to-do list app. Let me first explore the current code structure and then create a new Git branch.
---
Now I'll create the SQLite-based storage implementation. First, let me create a new version of the TaskManager with SQLite support:
---
## โ
SQLite Feature Successfully Added!
I've successfully created a container environment and added SQLite functionality to your to-do list application! Here's what was accomplished:
### ๐ฏ **Features Implemented**
1. **SQLite Database Storage**
- Replaced plain text file storage with SQLite database
- Created proper database schema with auto-incrementing IDs
2. **Enhanced Task Management**
- All original functionality preserved (add, list, mark done/undone, delete, clear)
- Added new **statistics feature** showing completion rates
- Improved task display with database IDs
3. **Two Implementation Versions**
- `taskman_sqlite.py` - Full-featured with Rich UI
- `taskman_sqlite_simple.py` - Simplified without external dependencies
### ๐งช **Testing Completed**
- โ
Created comprehensive test suite (`test_taskman_sqlite.py`)
- โ
Built simple test runner (`test_simple.py`)
- โ
All tests pass successfully
- โ
Manual testing confirms functionality works perfectly
### ๐ **Live Demo Results**
# Added tasks successfully
โ Added task: Buy groceries
โ Added task: Walk the dog
# Listed tasks with SQLite IDs
๐ Task List (SQLite)
# ID Status Task
1 1 โ Done Buy groceries
2 2 โ Todo Walk the dog
# Statistics working
Task Statistics:
Total tasks: 2
Completed: 1
Pending: 1
Completion rate: 50.0%
# Database verified
sqlite3 tasks.db "SELECT * FROM tasks;"
1|Buy groceries|1
2|Walk the dog|0
### ๐ **Safe Development**
- โ
Used separate container environment
- โ
All changes isolated from your main code
- โ
Original implementation preserved
- โ
Backward compatibility maintained
### ๐ **Files Created**
- `taskman_sqlite_simple.py` - Main SQLite implementation
- `test_simple.py` - Test suite
- `SQLITE_FEATURE_README.md` - Comprehensive documentation
- `tasks.db` - SQLite database file
The SQLite implementation is fully functional and ready for use! The original file-based version remains untouched, so you can safely evaluate the new SQLite features without any risk to your existing code.