Give your agent capabilities, not giant tool walls.
Caplets wraps MCP servers, APIs, and commands behind focused capability cards.
Caplets gives coding agents a Code Mode surface for MCP servers, APIs, and commands. Instead
of exposing every downstream operation as a giant tool list, each backend becomes a typed
caplets.<id> handle the agent can inspect, search, call, filter, join, and summarize inside
one compact workflow.
Progressive discovery is still available when you want visible wrapper tools, but Code Mode is the default exposure for configured backends.
Caplets can wrap:
- MCP servers
- OpenAPI, GraphQL, and simple HTTP APIs
- Curated repository CLI commands
- Shared Caplet files from this repo's
caplets/catalog
Full setup and configuration docs are available at docs.caplets.dev.
Install the CLI and wire it into your agent:
npm install -g caplets
caplets setupInstall a no-auth example Caplet and try it from your agent:
caplets install spiritledsoftware/caplets osvOr add Caplets manually to any MCP client:
{
"mcpServers": {
"caplets": {
"command": "caplets",
"args": ["serve"]
}
}
}Add your own capability sources:
caplets add mcp docs --command npx --arg -y --arg @upstash/context7-mcp
caplets add openapi users --spec ./openapi.json --base-url https://api.example.com
caplets add graphql catalog --endpoint-url https://api.example.com/graphql --schema ./schema.graphql
caplets add http status-api --base-url https://api.example.com --action get_status:GET:/status/{service}
caplets add cli repo-tools --repo . --include git,gh,packageInspect and call them from the CLI:
caplets list
caplets inspect osv
caplets search-tools osv vulnerability
caplets get-tool osv query_package_version
caplets call-tool osv query_package_version --args '{"name":"react","ecosystem":"npm","version":"18.2.0"}'MCP-backed Caplets also support resources, resource templates, prompts, and argument
completion. Direct CLI commands print Markdown by default; pass --format json for
machine-readable output. In agent sessions, Code Mode keeps the same operations behind typed
handles so discovery, execution, filtering, and synthesis can happen in one call.
Caplets works as a regular MCP server through caplets serve. By default, that server exposes
Code Mode for the configured backends. Caplets also has native integrations for agents that can
load packages directly:
| Agent | Setup |
|---|---|
| Codex, Claude Code, and other MCP clients | caplets setup or caplets serve |
| OpenCode | @caplets/opencode |
| Pi | @caplets/pi |
caplets setup uses each harness's MCP configuration command:
codex mcp add caplets -- caplets serve
claude mcp add --transport stdio --scope user caplets -- caplets serveEquivalent local Codex config:
[mcp_servers.caplets]
command = "caplets"
args = ["serve"]For a remote or Cloud-backed MCP server, point the client at caplets attach instead:
[mcp_servers.caplets]
command = "caplets"
args = ["attach"]{
"mcpServers": {
"caplets": {
"command": "caplets",
"args": ["attach"]
}
}
}Native integrations expose caplets__code_mode for multi-step TypeScript workflows over
generated caplets.<id> handles. Progressive exposure adds caplets__<id> tools; direct
exposure adds operation-level tools such as caplets__<id>__<operation>.
Remote mode is available with caplets attach, self-hosted HTTP service settings, or
Caplets Cloud auth:
export CAPLETS_MODE=remote
export CAPLETS_REMOTE_URL=https://caplets.example.com/caplets
export CAPLETS_REMOTE_TOKEN=...
caplets cloud auth login
CAPLETS_MODE=cloud CAPLETS_REMOTE_URL=https://cloud.caplets.dev opencodeThe deterministic benchmark compares flat MCP exposure with Caplets over the same mock servers:
| Initial surface | Direct MCP | Caplets | Reduction |
|---|---|---|---|
| Visible tools | 215 | 7 | 96.7% fewer |
| Serialized payload | 63,250 bytes | 12,720 bytes | 79.9% smaller |
| Approx. context surface | 15,813 tokens | 3,180 tokens | 12,633 fewer |
The landing-page live Pi eval reports Caplets Code Mode passing the same 10/10 real-world large MCP tasks as direct MCP and Executor.sh while using 72.0% fewer request + output tokens than direct vanilla MCP. Live runs are model- and environment-dependent; the deterministic benchmark is the reproducible claim.
See docs/benchmarks/coding-agent.md for methodology and reproduction commands. See docs.caplets.dev/changelog for public release notes.
This monorepo uses pnpm. Published packages support Node.js >=22; repo verification uses
the root toolchain, which requires Node.js >=24.
pnpm install --frozen-lockfile
pnpm verifyUseful focused checks:
pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
pnpm benchmark:check
pnpm buildPackage map:
packages/core- runtime, config, Code Mode, backends, MCP server, remote attachpackages/cli- publishedcapletsbinarypackages/opencode- native OpenCode pluginpackages/pi- native Pi extensionpackages/benchmarks- deterministic and opt-in live benchmarksapps/landing- public site atcaplets.devapps/docs- public docs site atdocs.caplets.dev
Long-lived docs:
- Code Mode PRD
- Architecture
- ADR 0001: Code Mode default exposure
- Benchmark methodology
- Native integrations
- Project Binding
MIT