Choose your surface¶
All four components ship in the same apcore-surfaces package. You rarely need more
than one to start; add a second when you gain a second kind of caller.
Start from the caller, not the feature¶
| The caller is… | Use | Why |
|---|---|---|
| An AI application or desktop client (Claude Desktop, Cursor, Windsurf, your own agent loop) | MCP | MCP is the protocol those clients speak. You also get an OpenAI function-calling export from the same registry. |
| Another team's or vendor's agent, discovered over the network | A2A | A2A gives a machine-readable Agent Card, skills, task lifecycle, streaming, and push notifications. |
| A human at a terminal, a shell script, or CI | CLI | The CLI gives real commands, typed flags, exit codes, and shell completions. |
| Your own code, framework integration, or a new adapter you are building | Toolkit | Scanners, schema extraction, writers, and formatters — the metadata half, with no transport. |
| Application code only, no protocol | Core alone | Install apcore; you may not need Surfaces at all. |
Still unsure? Two follow-up questions usually settle it:
- Does the caller need to discover what exists? MCP clients list tools; A2A agents
read an Agent Card. CLI callers read
--helporapcli list. All three handle discovery, so decide on the protocol the caller already speaks. - Is the caller a process you can configure? If you control the process, MCP over stdio is the least moving parts. If you do not, A2A over HTTP is the network-facing option.
Side-by-side¶
| MCP | A2A | CLI | Toolkit | |
|---|---|---|---|---|
| Caller | AI clients, IDE agents | Agents over HTTP | Humans, scripts, CI | Your code |
| Protocol | Model Context Protocol (2026-07-28 plus legacy negotiation) |
A2A 1.0 | Process arguments and exit codes | Library API |
| Transports | stdio, Streamable HTTP, SSE | HTTP + SSE streaming | Terminal, pipes | — |
| Discovery artifact | tools/list |
/.well-known/agent-card.json |
--help, apcli list |
— |
| Long-running work | Async task meta-tools | Task state machine, push notifications | --stream, --trace |
— |
| Human approval | Elicitation through the client | Out-of-band approval flows | Terminal prompt | — |
| Runs a server | Yes (or stdio) | Yes | No | No |
| Entry point | apcore-mcp binary, APCoreMCP / serve() |
apcore-a2a binary, serve() / asyncServe() |
apcore-cli binary, create_cli() / createCli() |
BaseScanner, OpenAPIScanner, writers |
All three adapters project the same registry and route calls through the same executor, so governance — validation, ACL, approval, audit — is identical no matter which door a caller uses. See How APCore Surfaces works.
What each surface is good at¶
MCP — when an AI client should call your app¶
Choose MCP when the tool schemas are consumed by an LLM host that manages its own conversation and approval UX.
- Automatic tool descriptors from
input_schema, with annotations mapped toToolAnnotations. - OpenAI function-calling export from the same modules, for hosts that do not speak MCP.
- Async task bridge for modules that take minutes rather than milliseconds.
- JWT authentication bridged to apcore identity, plus interactive approval.
- A browser Explorer for manual testing.
Read the MCP overview · MCP quickstart
A2A — when another agent should call your app¶
Choose A2A when the caller is an autonomous agent or another product's agent runtime, and it needs to discover your capabilities without a human in the loop.
- Agent Card generated from registry metadata, with display-overlay overrides for skill names and descriptions.
- Full task lifecycle (
submitted,working,completed,failed,canceled,input-required) plus cancellation. - Streaming status and artifact updates, and webhook push notifications.
- A built-in
A2AClientso your service can also call other agents. - JWT/Bearer authentication bridged to apcore ACL.
Read the A2A overview · A2A quickstart
CLI — when a terminal is the interface¶
Choose the CLI for humans, shell pipelines, and CI jobs — including AI coding agents that work through a shell.
- One subcommand per module, with flags generated from the schema, grouped by the leading segments of the module ID.
- Approval prompts for sensitive modules, bypassable with
--yesin automation. - Byte-equivalent
csv/jsonloutput across languages, plustable,yaml, and Markdown, so pipelines are portable. - Exit codes that distinguish "not found", "invalid input", "approval denied", and "policy denied".
- Shell completions, man pages, and exposure filtering for embedded products.
Read the CLI overview · CLI quickstart
Toolkit — when you are building the adapter¶
Choose the Toolkit when you need metadata work rather than a protocol: scanning a framework's routes, turning an OpenAPI document into modules, generating bindings and wrappers, or rendering identical bytes in several languages.
BaseScannerfor framework-specific scanners;ConventionScannerfor plain functions (Python only, by design).OpenAPIScannerwith deterministic module IDs shared across all three SDKs.- Writers for
.binding.yaml, Python, TypeScript, Rust, direct registry registration, and HTTP proxy registration. - Formatters for Markdown, SKILL.md, CSV, JSONL, and a TUI view model.
Read the Toolkit overview · Toolkit quickstart
Common combinations¶
- MCP + CLI — the same modules served to Claude Desktop and to your build scripts. One registry, two entry points; no duplicated governance.
- A2A + MCP — your service is called by agents (A2A) and by chat clients (MCP).
Both read the same
metadata.displayoverlay, so names stay consistent. - Toolkit + your own adapter — reuse scanning, schema extraction, and formatting instead of reimplementing them. See Adapter Development.
- OpenAPI backend only — you have no apcore project, just an API document. MCP and A2A can both proxy it. Read the safety warning in MCP OpenAPI Backend first: a scanned write operation is advertised like a read operation, and approval is never inferred.
The CLI does not proxy OpenAPI yet
apcli openapi scan and apcli openapi generate turn an OpenAPI document into
binding artifacts, but those artifacts are not executable commands yet. Use the
MCP or A2A OpenAPI backend when you need a callable proxy today. See
CLI OpenAPI Import.
Next steps¶
- Install and first run — install the SDK and verify the commands.
- How APCore Surfaces works — the mental model and the metadata contract.
- Reference: packages and imports — every package name, extra, feature flag, and import path in one table.