Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/assets/logo/logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/logo/logo-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 0 additions & 18 deletions .github/brand/brand.lock.json

This file was deleted.

Binary file removed .github/brand/social.png
Binary file not shown.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
package:
runs-on: macos-latest
Expand All @@ -24,8 +28,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: |
python3 -m unittest discover -s Tests -p 'test_*.py'
python3 Scripts/build_package.py dist > package-receipt.json
python3 -m unittest discover -s tests -p 'test_*.py'
python3 scripts/build_package.py dist > package-receipt.json
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: claude-plugin-${{ github.sha }}-${{ matrix.python-version }}
Expand All @@ -46,8 +50,12 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: ${{ matrix.python-version }}
- run: python3 Tests/check_runtime_rejection.py
brand:
uses: computer-mcp/.github/.github/workflows/brand-check.yml@f402911abcdfb87ef0c41a2759e8c51387b18935 # master
- run: python3 tests/check_runtime_rejection.py
runtime:
uses: computer-mcp/.github/.github/workflows/plugin-runtime.yml@35766b350427ed900b456aa3c39098e97d9d3aa1 # master
uses: computer-mcp/github-workflows/.github/workflows/plugin-runtime.yml@d65bc20504f39c3a30232d67043abeca43d2c7b1
validate:
if: always()
needs: [package, unsupported-runtime, runtime]
uses: computer-mcp/github-workflows/.github/workflows/result.yml@d65bc20504f39c3a30232d67043abeca43d2c7b1
with:
needs-json: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/notify-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- name: Request complete catalog reconciliation
id: catalog
uses: computer-mcp/computer-mcp.github.io/.github/actions/notify-catalog@cda692839487f03a2b4740d945f9a8bd818554e5
uses: computer-mcp/github-workflows/actions/notify-catalog@d65bc20504f39c3a30232d67043abeca43d2c7b1
with:
client-id: ${{ vars.CATALOG_APP_CLIENT_ID }}
private-key: ${{ secrets.CATALOG_APP_PRIVATE_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
permissions:
contents: write
actions: read
uses: computer-mcp/.github/.github/workflows/plugin-release.yml@35766b350427ed900b456aa3c39098e97d9d3aa1 # master
uses: computer-mcp/github-workflows/.github/workflows/plugin-release.yml@d65bc20504f39c3a30232d67043abeca43d2c7b1
with:
ref: ${{ inputs.ref }}
publish: ${{ inputs.publish }}
build: python3 Scripts/build_package.py
build: python3 scripts/build_package.py
ci_artifact: claude-plugin-${commit}-3.13
notify-catalog:
needs: release
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/source-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Source policy checks
on:
pull_request:
types: [opened, synchronize, reopened, edited]
push:
branches: [master]
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
policy:
uses: computer-mcp/github-workflows/.github/workflows/policy.yml@d65bc20504f39c3a30232d67043abeca43d2c7b1
with:
declaration-revision: 5c54a40cb7953db7472ebbefd3db608036b7b3ab
38 changes: 14 additions & 24 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ Use this check:

- Before changing versions, dependencies, packaging or release workflows, read
the [organization VERSIONING](https://github.com/computer-mcp/.github/blob/master/VERSIONING.md)
for version rules and `Documentation/Reference/Release.md` for release facts
for version rules and `docs/Reference/Release.md` for release facts
and check entry points.

- For repository-native documentation placement, read `Documentation/README.md`
- For repository-native documentation placement, read `docs/README.md`
before editing.
- For current canonical structure, read
`Documentation/Architecture/README.md` and the relevant architecture files.
- For design-in-progress, use `Documentation/Proposals/*` when that subtree is
`docs/Architecture/README.md` and the relevant architecture files.
- For design-in-progress, use `docs/Proposals/*` when that subtree is
present.
- For change history, consult `Documentation/Decisions/*`,
`Documentation/Migrations/*`, and `Documentation/Archive/*` when those
- For change history, consult `docs/Decisions/*`,
`docs/Migrations/*`, and `docs/Archive/*` when those
subtrees are present.
- For GitHub-facing collaboration files, use `.github/` and root governance
files.
Expand All @@ -92,10 +92,10 @@ Use this check:
- `AGENTS.md` is the agent guide: first-principles guardrails, task
route, authority boundaries, and boundary guardrails.
- `README`-class files index scope and placement.
- `Documentation/Architecture/*` is current truth.
- `Documentation/Proposals/*` is proposal space when that subtree is present.
- `Documentation/Decisions/*`, `Documentation/Migrations/*`, and
`Documentation/Archive/*` are history when those subtrees are present.
- `docs/Architecture/*` is current truth.
- `docs/Proposals/*` is proposal space when that subtree is present.
- `docs/Decisions/*`, `docs/Migrations/*`, and
`docs/Archive/*` are history when those subtrees are present.
- `.github/*` is GitHub-facing governance.

## Boundary Guardrails
Expand All @@ -113,8 +113,8 @@ and operating guidance. Keep temporary implementation notes, local evidence,
local paths, run-specific artifacts, and historical comparison notes out of
README files, Reference docs, API docs, and bundled user-facing skills. Promote
only accepted decision records into
`Documentation/Decisions/*` and durable transition or cutover records into
`Documentation/Migrations/*`.
`docs/Decisions/*` and durable transition or cutover records into
`docs/Migrations/*`.

Use this decision test:

Expand Down Expand Up @@ -147,11 +147,11 @@ source of truth instead of a literal value.
- Keep Agent Guide and Index separate.
- Keep current truth out of proposal and history subtrees when they are
present.
- Keep GitHub collaboration configuration out of `Documentation/`.
- Keep GitHub collaboration configuration out of `docs/`.

## Repository Guardrails

Read `README.md`, `computer-mcp-plugin.toml`, and `Documentation/Reference/Interface.md` before editing.
Read `README.md`, `computer-mcp-plugin.toml`, and `docs/Reference/Interface.md` before editing.

Keep vendor installation, authentication, subscription/API usage, updates, plugins, and setup tokens outside this repository. The external Claude Code executable is a dependency, not bundled code. Do not run authenticated model prompts merely to validate package structure.

Expand All @@ -162,13 +162,3 @@ Keep vendor installation, authentication, subscription/API usage, updates, plugi
Use Python standard library only unless a dependency demonstrably removes required complexity. Tests must cover MCP initialization, tool discovery, stream-json parsing, permission-boundary rejection, cancellation, deterministic package contents, and executable archive mode.

Before handoff run unit tests, the native non-model interface check, deterministic package build, Computer MCP package validation/doctor where available, and git status. Do not publish or create a release implicitly.

## Brand delivery

The organization `.github` repository owns the design system and renders every
image; the main Computer MCP repository owns ProductIdentity. Imported
`Documentation/Brand/header-light.png` and `header-dark.png` travel with the
packaged manual; `.github/brand/social.png` supplies the repository preview.
`.github/brand/brand.lock.json` binds them to the organization exports, and CI
verifies it with the shared brand-check workflow. Update imports with the
organization repository's `python3 Brand/brand.py sync`.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Contributing

Read the [architecture](Documentation/Architecture/README.md) and [interface contract](Documentation/Reference/Interface.md). Keep vendor-specific behavior in this repository and preserve the host manifest/CLITree/MCP boundaries.
Read the [architecture](docs/Architecture/README.md) and [interface contract](docs/Reference/Interface.md). Keep vendor-specific behavior in this repository and preserve the host manifest/CLITree/MCP boundaries.

CI runs these checks on Python 3.13 and 3.14; run them before opening a pull request:

```sh
python3 -m unittest discover -s Tests -p 'test_*.py' -v
python3 Scripts/build_package.py /new/output/directory
python3 -m unittest discover -s tests -p 'test_*.py' -v
python3 scripts/build_package.py /new/output/directory
```

CI also runs `python3 Tests/check_runtime_rejection.py` on Python 3.11 and 3.12 to confirm that unsupported interpreters are refused, and the organization brand check. When changing the native interface, inspect the matching real executable and run `Scripts/validate_native.py --executable PATH`. Never use authenticated model calls as ordinary unit tests.
CI also runs `python3 tests/check_runtime_rejection.py` on Python 3.11 and 3.12 to confirm that unsupported interpreters are refused. When changing the native interface, inspect the matching real executable and run `scripts/validate_native.py --executable PATH`. Never use authenticated model calls as ordinary unit tests.

Do not commit caches, local credentials or generated runtime state. Publishing a repository or release is a separate explicit action.

Expand Down
Binary file removed Documentation/Brand/header-dark.png
Binary file not shown.
Binary file removed Documentation/Brand/header-light.png
Binary file not shown.
127 changes: 104 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,119 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="Documentation/Brand/header-dark.png">
<img alt="Computer MCP — Claude Code" src="Documentation/Brand/header-light.png">
</picture>
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/assets/logo/logo-dark.png">
<img src=".github/assets/logo/logo-light.png" width="128" height="128" alt="">
</picture>
</p>

# Computer MCP — Claude Code
<h1 align="center">Claude Code</h1>

Part of the [Computer MCP](https://computer-mcp.github.io/) family.
**Wherever you chat, your computer is there.**
<p align="center">Computer MCP family plugin for Claude Code CLI and streaming MCP integration.</p>

An independent Computer MCP plugin for Claude Code. The same package contributes a canonical CLI Tree, a stdio MCP adapter and client-neutral usage Skills. It does not link Computer MCP Core or require a host release to add vendor behavior.
<p align="center">
<a href="https://github.com/computer-mcp/plugin-claude/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/computer-mcp/plugin-claude/ci.yml?branch=master&label=CI&style=flat"></a>
<a href="computer-mcp-plugin.toml"><img alt="Python 3.13 or newer" src="https://img.shields.io/badge/Python-3.13%2B-blue?style=flat"></a>
<a href="computer-mcp-plugin.toml"><img alt="Architecture: arm64" src="https://img.shields.io/badge/architecture-arm64-lightgrey?style=flat"></a>
<a href="LICENSE"><img alt="License: FSL-1.1-ALv2" src="https://img.shields.io/badge/license-FSL--1.1--ALv2-blue?style=flat"></a>
</p>

The CLI contribution describes verified non-interactive commands. The native baseline and its exact version assertion live in `cli-tree.json`. It is deliberately partial: interactive setup, installation and unsupported administrative flows are not represented as callable tools. The adapter separately owns streaming and session/run state; the host owns registration, profile grants, initial working-directory selection and audit.
<p align="center">
<a href="#install">Install</a> ·
<a href="#usage">Usage</a> ·
<a href="docs/Reference/Interface.md">Interface</a> ·
<a href="docs/README.md">Documentation</a> ·
<a href="CONTRIBUTING.md">Contributing</a>
</p>

## MCP capabilities
## Overview

The adapter provides `claude.run`, `claude.run.start`, `claude.run.list`, `claude.run.result`, `claude.run.events`, `claude.run.cancel` and `claude.run.release`. It consumes native print-mode stream-json, including partial messages, and retains the final result, native session ID and explicit error status. Release discards a completed result only after cleanup is confirmed. Discovery does not launch Claude Code.
An independent [Computer MCP](https://computer-mcp.github.io/) plugin for Claude Code. One
package contributes a canonical CLI tree, a stdio MCP adapter that streams runs, and
client-neutral usage skills. It does not link Computer MCP Core, and adding vendor behavior needs
no host release.

The ordinary MCP work resource reports active runs and retained result handles
with their original acquisition reference. Hosts can account for this work
after its creating tool returns, without private Host Services permission.
Cleanup uncertainty remains owned and cannot be released or evicted.
The CLI contribution describes verified non-interactive commands; the native baseline and its
exact version assertion live in `cli-tree.json`. It is deliberately partial: interactive setup,
installation and unsupported administrative flows are not callable tools. The adapter owns
streaming and session and run state. The host owns registration, profile grants, the initial
working directory and audit.

`permission_mode` defaults to `dontAsk`; `plan` and `acceptEdits` are supported explicit choices. The noninteractive contract does not expose permission-bypass modes or fabricate interactive permission responses. Existing vendor configuration continues to apply. Resume/continue/new-session selection is explicit; cancelling a run does not delete its saved native conversation.
## Quick look

## Use and verify
| Contribution | What it adds |
| --- | --- |
| `claude` CLI | Typed tools for the verified non-interactive Claude Code commands |
| `stream` MCP server | `claude.run`, `claude.run.start`, `claude.run.list`, `claude.run.result`, `claude.run.events`, `claude.run.cancel` and `claude.run.release`, plus a work resource listing active runs and retained results |
| `claude-code` skill | Guidance for choosing the CLI or the streaming tools safely |

The external `claude` executable, Python 3.13+ and vendor credentials are user-owned. Install neither through this plugin. Configure the two contributions using the [installation guide](Documentation/Reference/Installation.md) and `Examples/settings.json`.
Install the archive in the host, bind the `claude` executable, and configure both contributions
from `Examples/settings.json`.

## Install

1. Install and authenticate Claude Code yourself, and provide Python 3.13 or newer on the
Computer MCP launch `PATH`. The plugin never installs or updates either, logs in, creates setup
tokens or copies credentials.
2. Build the archive:

```sh
python3 scripts/build_package.py /new/output/directory
```

3. Install the ZIP through Computer MCP's plugin UI or the owner CLI. Installation is neither
activation nor a permission grant.
4. Review `Examples/settings.json`, replace its placeholder paths, and configure the plugin
through the same UI or `plugins configure`. The CLI dependency binding selects the executable
for the CLI contribution; the MCP launch `args` supply `--executable` for the adapter. Point
both at the same verified installation.

See the [installation guide](docs/Reference/Installation.md) for revisions, configuration
publication and validation.

## Usage

The adapter consumes Claude Code's print-mode stream-json, including partial messages, and keeps
the final result, the native session ID and an explicit error status. Discovery does not launch
Claude Code. Release discards a completed result only after cleanup is confirmed; cleanup
uncertainty stays owned and cannot be released or evicted. The work resource reports each active
run and retained result with its original acquisition reference, so hosts can account for work
after the creating tool returns, without private Host Services permission.

`permission_mode` defaults to `dontAsk`; `plan` and `acceptEdits` are supported explicit choices.
The non-interactive contract exposes no permission-bypass mode and never fabricates interactive
permission responses, and existing vendor configuration continues to apply. Choosing to resume,
continue or start a session is explicit, and cancelling a run does not delete its saved native
conversation.

The working directory is not an operating-system sandbox. Vendor configuration, credentials and
tools keep their own authority; host authorization does not silently approve vendor actions. See
the [interface contract](docs/Reference/Interface.md) for retention, cancellation and error
semantics.

## Requirements

- Computer MCP on an arm64 computer.
- Claude Code, installed and authenticated separately; its version must match `cli-tree.json`.
- Python 3.13 or newer.

## Documentation

The [documentation index](docs/README.md) links the architecture, the interface, the installation
guide and the [release process](docs/Reference/Release.md). To validate a checkout:

```sh
python3 -m unittest discover -s Tests -p 'test_*.py' -v
python3 Scripts/validate_native.py --executable /absolute/path/to/claude
python3 Scripts/build_package.py /new/output/directory
python3 -m unittest discover -s tests -p 'test_*.py' -v
python3 scripts/validate_native.py --executable /absolute/path/to/claude
```

Normal tests use deterministic peers, not a model. Authenticated execution and production activation are separate acceptance steps. See the [interface contract](Documentation/Reference/Interface.md) for retention, cancellation and error semantics and the [documentation index](Documentation/README.md) for ownership.
Tests use deterministic peers, not a model. Authenticated execution and production activation are
separate acceptance steps.

## Contributing

See the [contributor guide](CONTRIBUTING.md).

## License

The working directory is not an operating-system sandbox. Vendor configuration, credentials and tools retain their own authority; host authorization does not silently approve vendor actions.
Computer MCP-owned code and resources use the
[Functional Source License 1.1, Apache 2.0 Future License](LICENSE) (FSL-1.1-ALv2). Claude Code
and Anthropic services are external; see the [third-party notices](THIRD_PARTY_NOTICES.md).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package architecture

This repository owns the Claude Code CLI description and print/stream-json-to-MCP adapter. Computer MCP owns admission, host grants, workspace selection, CLI encoding and audit. The package neither links Computer MCP Core nor modifies host state or requires Host Services.
This repository owns the Claude Code CLI description and print/stream-json-to-MCP adapter. Computer MCP owns admission, host grants, project selection, CLI encoding and audit. The package neither links Computer MCP Core nor modifies host state or requires Host Services.

`computer-mcp-plugin.toml` combines a canonical file-backed CLI tree, the stdio adapter and Skills. `cli-tree.json` owns the exact supported native command/version contract. `bin/claude-mcp-adapter` owns run handles, retained native events and final results, cancellation and explicit native permission modes. Native conversation persistence stays with Claude Code; no duplicate vendor session database is created.

Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading