Commonshell gives coding agents its memory, plans, tests and tools through an MCP server: 18 tools, listed here exactly as the server describes them to agents.
How agents get it
- Claude Code and Kiro tabs in Commonshell have the server already; you don't set anything up. In Claude Code,
memory_record and memory_search are in the agent's prompt from the first turn; the other tools load when the agent needs them.
- For an agent outside Commonshell, add a stdio server that runs
cs mcp, for example:
{
"mcpServers": {
"commonshell": {
"type": "stdio",
"command": "/Applications/Commonshell.app/Contents/Resources/bin/cs",
"args": [
"mcp"
]
}
}
}
Everything runs on your Mac. Learnings stay on this machine unless you are in a team: then those of your projects sync with your teammates. The full schema is in tools.json, the server's own tools/list answer.
Memory
What worked, what failed and why, recalled across sessions and agents.
memory_record always loaded
Record a learning in Commonshell's learning memory: an approach that worked, one that failed and why, a decision, or an environment fact. A failed learning must give `why` (what made it fail) and should give `instead` when known; it is kept even after a later fix. Use space=private by default; team only for learnings the whole team should reuse (team episodes are shared with your teammates peer to peer).
| Parameter | Type | Description |
|---|
instead | string | kind=failed: what worked or should be done instead |
kind required | string (worked | failed | decision | environment | note) | |
project | string | Defaults to the current repository |
space | string (private | team) | Default: "private". |
supersedes | string[] | IDs of learnings this one replaces (from memory_search or a memory_record reply's similar list): they rank as older and stop being recalled |
team | string | space=team: which team (name), when you're in several |
text required | string | Self-contained: approach taken, outcome, and why |
why | string | kind=failed (required): what made the approach fail |
memory_search always loaded
Search Commonshell's learning memory (what worked and what didn't, and why, in this and other projects, yours and your team's) for learnings relevant to a question. Results marked older have a newer learning on the same topic. entities=true also returns entity summaries when the optional memory graph is on.
| Parameter | Type | Description |
|---|
entities | boolean | Default: false. |
limit | integer | Default: 10. |
query required | string | What you want to know, e.g. 'how to run the tests in demo-app' |
space | string (private | team) | Only this space (default: both) |
prior_work
Before researching something on the web, check whether it was researched before: earlier research (the question, sources and conclusion, dated) from this and other sessions. Use it if it answers the question and is recent enough; search again if it may be out of date.
| Parameter | Type | Description |
|---|
limit | integer | Default: 3. |
query required | string | What you are about to research |
Goals and tasks
Plans with acceptance criteria that the agent works through.
create_goal
Create a goal. With plan=true, also break it into tasks with the planner.
| Parameter | Type | Description |
|---|
description | string | |
plan | boolean | Default: false. |
title required | string | |
plan_goal
Break a goal into tasks and subtasks with dependencies and acceptance criteria. replace=true replans the unfinished tasks of an already planned goal.
| Parameter | Type | Description |
|---|
goal_id required | string | Goal id, e.g. k3x9qa |
reason | string | With replace: why the old plan was wrong (used for learning) |
replace | boolean | Default: false. |
list_goals
List goals with their tasks.
| Parameter | Type | Description |
|---|
include_done | boolean | Default: false. |
get_next_task
Get the next actionable tasks: open, unblocked, dependencies finished. In-progress tasks come first.
| Parameter | Type | Description |
|---|
count | integer | Default: 1. |
goal_id | string | Goal id, e.g. k3x9qa |
get_task
Get one task with its acceptance criteria and dependencies.
| Parameter | Type | Description |
|---|
task_id required | string | Task id, e.g. k3x9qa |
set_task_status
Change a task's status. Use complete_task to finish it. Pass context whenever you start, pause or block a task, so it can be resumed later by you or anyone else.
| Parameter | Type | Description |
|---|
context | string | Replaces the task's context: where it stands, the files involved, how to check it, what's left and what it's waiting on |
status required | string (todo | in_progress | blocked | cancelled) | |
task_id required | string | Task id, e.g. k3x9qa |
complete_task
Record the result of working on a task. pass closes it (and its parent/goal when nothing is left); fail records the attempt and keeps it in the queue. Returns the next task.
| Parameter | Type | Description |
|---|
notes | string | What was done, or why it failed |
result required | string (pass | fail) | |
task_id required | string | Task id, e.g. k3x9qa |
Testing
Run web and phone tests, and keep the patterns that make them reliable.
run_web_test
Test a web page (headless Chrome by default) or a phone app. Give url + verify to have a Selenium IDE test written and run (saved to tests/commonshell/ when it passes), or side_path to run an existing .side file. target picks where it runs: microbrowser (the browser in Commonshell, the user watches), headless, external (a tab of the user's own Chrome through the Commonshell extension; the user must click Allow in Chrome, so tell them first) or android/ios (through Appium; native apps need side_path). Captures screenshots, console errors and failed requests; with a Claude key, also checks the screenshots. Results feed the learning loop; with task_id the task is completed as pass/fail.
| Parameter | Type | Description |
|---|
app | string | target android/ios: native app (.apk/.app/.ipa path or URL, or an installed app's id); without it, the phone's browser |
appium_url | string | target android/ios: the Appium server (default http://127.0.0.1:4723) |
device | string | target android/ios: device or simulator name (iOS simulators need one) |
mobile | boolean | Test the mobile web: phone-sized screen, touch, mobile user agent Default: false. |
shared_browser | boolean | Same as target microbrowser Default: false. |
side_path | string | Path to a .side file to run instead |
tab | string | target external: the tab the user must pick on the Allow page (its id or the start of its URL); the run fails if they pick another |
target | string (microbrowser | headless | external | android | ios) | Where to run: microbrowser (the browser the user has open in Commonshell, so they watch and can take over), headless, external (a tab of the user's own Chrome through the Commonshell extension, after they click Allow there), android or ios (Appium) Default: "headless". |
task_id | string | Task id, e.g. k3x9qa |
test_name | string | With side_path: run only this test |
url | string | |
verify | string | What must be true on the page |
visual | boolean | Default: true. |
add_pattern
Teach a reusable rule. The planner sees relevant patterns when planning future goals.
| Parameter | Type | Description |
|---|
guidance required | string | What to do, e.g. 'wait for #app[data-ready] before asserting' |
scope | string (global | repo | language | site) | Default: "global". |
scope_value | string | Repo name, language or domain for non-global scopes |
trigger required | string | When it applies, e.g. 'testing pages on shop.example.com' |
search_patterns
Find learned patterns relevant to a situation (uses the current repo and languages for scoped patterns).
| Parameter | Type | Description |
|---|
limit | integer | Default: 5. |
query required | string | |
Team library
Files and codebases your team shared.
library_search
Search the team library: files and codebases your team shared, indexed by meaning and by text. Returns collection, path, line range and a snippet. Nothing is downloaded; use library_read for the file.
| Parameter | Type | Description |
|---|
collection | string | Only this collection |
limit | integer | Default: 10. |
query required | string | What you are looking for, in words or identifiers |
library_list
List the collections in the team library (id, title, author, file count).
No parameters.
library_read
Read a file from the team library (downloaded on first read, verified, then cached). At most 2000 lines per call; use start_line/end_line for long files.
| Parameter | Type | Description |
|---|
collection required | string | |
end_line | integer | |
path required | string | |
start_line | integer | |
Browser and notifications
Drive a connected browser; tell the person when something is done.
remote_browser
Drive a browser on another computer that is paired with Commonshell through the Commonshell browser extension (end-to-end encrypted, peer to peer). Actions: list (connected browsers), tabs, open {url}, navigate {url}, back, forward, reload, activate {tab}, close {tab}, read (page text plus numbered interactive elements), click {ref|selector|text}, type {ref|selector, text, submit?}, select {ref|selector, value}, key {key, e.g. Enter}, scroll {y | ref}, wait {selector|text, timeout_ms}, screenshot, eval {code}. Most take an optional `tab` (id from tabs); the default is the active tab. Use read before click or type, and act on its refs.
| Parameter | Type | Description |
|---|
action required | string (list | tabs | open | navigate | back | forward | reload | activate | close | read | click | type | select | key | scroll | wait | screenshot | eval) | |
args | object | The action's arguments, e.g. {"url": "https://example.com"} or {"ref": 12} |
browser | string | Which browser (id or name from list); optional when only one is connected |
notify_user
Send the user a notification on their Mac and paired phone. Use it ONLY when the user asked to be notified (e.g. "tell me when it's done", "ping me if the tests fail"), when that moment comes. Don't use it to ask a question: questions and permission prompts notify the user by themselves.
| Parameter | Type | Description |
|---|
message required | string | What happened, in one or two short sentences |
title | string | Optional; defaults to the session's name |