AGENTS.md@packages/mcp · git:20261009.95ca1ef · 2026-10-09 · sha256 0b6d9479c4e99ca6

AGENTS.md@packages/mcp git:20261009.95ca1efA

Immutable. This exact content never changes and is served at /api/v1/blob/0b6d9479c4e99ca6.

# @shadowclone/mcp

Serves the Shadowclone tools to a connected agent over the MCP protocol on standard input and output. The `shadowclone mcp` command starts it.

<!-- package-facts:start -->

(generated by `bun run guides`; do not edit by hand)

- Package name: `@shadowclone/mcp`
- Workspace dependencies: `@shadowclone/changes`, `@shadowclone/cloud`, `@shadowclone/core`, `@shadowclone/environment`, `@shadowclone/learning`, `@shadowclone/profile`, `@shadowclone/sessions`, `@shadowclone/skills`, `@shadowclone/web`
- External dependencies: `zod`
- Export subpaths: `.`

<!-- package-facts:end -->

## Owns

- `src/server.ts`: `serveMcp` and `handleMcpRequest`, the JSON-RPC loop.
- `src/protocol.ts`: request parsing and the context tools `shadowclone_context` and `shadowclone_profile`.
- `src/preferences.ts`: `shadowclone_remember`, `shadowclone_history`, and `shadowclone_skills_status`.
- `src/references.ts`: `shadowclone_recall`. `src/bot.ts`: `shadowclone_bot`.

## Rules

- Each tool parses its arguments with a strict schema. An invalid call returns an error.
- `shadowclone_profile` is a deprecated alias of `shadowclone_context`. Do not add behavior to it.
- `shadowclone_remember` fails when the managed policy disables Shadowclone.
- `shadowclone_bot` has no credential operation. The owner enters every token on GitHub.
- The first `setup` call only lists the skill files. It pushes them after a second call with `approveSkills: true`.
- Context comes from `compileContext`, so it follows the same consent and scope as native delivery.

## Tests

Run `bun test` in this folder, or `bun test packages/mcp` from the root. The tests send synthetic requests to the handler. They start no agent and no GitHub call.

Update this file in the same commit when you change the package purpose, public exports, dependencies, or a rule above.