Build once, invoke by code or AI.
A protocol-neutral runtime that keeps schema validation, ACL, approval, and execution evidence consistent across agent and code surfaces.
English · 中文
Documentation · Getting Started · Protocol Spec · aiperceivable.com
A tool schema tells a model how to format a call. It does not say who may make that call, what it may touch, whether a human must approve it first, or what record survives afterwards.
Those questions do not belong inside the model's reasoning loop. They belong at the execution boundary — and they must be answered the same way regardless of which protocol carried the request.
MCP tells an agent what it can call. apcore decides whether this call — with these arguments, in this environment, by this identity — should happen at all, and leaves evidence that it did.
┌──────────────────────────────────────────┐
│ Agent · Human · Application │
└────────────────────┬─────────────────────┘
│
┌──────────┬──────────┬──────┴────┬──────────┬──────────┐
▼ ▼ ▼ ▼ ▼ ▼
┌─────┐ ┌───────┐ ┌───────┐ ┌──────┐ ┌───────┐ ┌────────┐
│ MCP │ │ A2A │ │ CLI │ │ HTTP │ │OpenAI │ │ direct │
└──┬──┘ └───┬───┘ └───┬───┘ └──┬───┘ └───┬───┘ └───┬────┘
└──────────┴──────────┴─────┬────┴───────────┴──────────┘
▼
╔═══════════════════════════════════════════════╗
║ apcore runtime ║
║ schema · ACL · approval gate · middleware ║
║ observability · audit trail ║
╚═══════════════════════┬═══════════════════════╝
▼
┌──────────────────────────────────────────┐
│ your existing business logic │
│ (unchanged) │
└──────────────────────────────────────────┘
Three steps, and only the first one touches your code:
- Bind — a decorator, or a YAML binding file for code you cannot annotate
- Expose — the same registered module is projected through whichever adapters you enable
- Execute under governance — validation, identity, ACL, approval, and audit run before and after your logic, identically on every surface
Define a governed capability once. Project it onto any surface. The guarantees do not weaken when the transport changes.
This is the most common question, so it is worth answering directly: apcore is not an alternative to MCP. MCP defines client-server communication and tool metadata. apcore addresses a different boundary — defining and executing an application capability consistently before it is exposed through MCP or anything else.
| Concern | MCP | apcore |
|---|---|---|
| Primary role | Client-server protocol and tool surface | Capability definition and governed execution runtime |
| Schema and hints | Tool input/output schemas and annotations | Required schemas plus runtime-enforced validation |
| Access and approval | Implemented by the server or deployment | ACL and approval gates enforced by the execution pipeline |
| Auditability | Implemented by the server or deployment | Trace context, structured errors, events, usage hooks |
| Language model | Protocol SDKs | Semantically aligned Python, TypeScript, and Rust SDKs |
Use MCP directly when a protocol server is all you need. Add apcore when the same business capability must retain validation, access, approval, and audit semantics across MCP, A2A, CLI, HTTP, and direct code.
The same logic applies upward: apcore is complementary to LangChain, LlamaIndex, CrewAI, and AutoGen rather than competing with them. Those frameworks orchestrate calls between capabilities; apcore standardizes what an individual capability is and what happens when one is invoked.
apcore solves how to build modules (a module standard), not how to call tools (a communication protocol).
| Agent-readable | Descriptions, input schemas, output schemas, and behavioral metadata give automated callers a structured contract. Model interpretation remains a caller responsibility. |
| Schema-driven | Strict input/output contracts on every interface — predictable, validatable, self-documenting. |
| Governed execution | Identity, ACL, approval gates, call-chain guards, middleware, and validation run before and after application logic. |
| Protocol-neutral | Use the native SDK directly, or project registered modules through maintained MCP, A2A, CLI, and framework adapters. |
| Cross-language | Maintained Python, TypeScript, and Rust SDKs implement one normative protocol and shared conformance fixtures, with language-idiomatic APIs. |
| Open source | Apache-2.0. The protocol, SDKs, conformance fixtures, and governance documents are all public. |
pip install apcore # Python
npm install apcore-js # TypeScript
cargo add apcore # RustNew to the project? Read What is apcore? first — it explains the module standard before any SDK detail.
Adopt incrementally. Define and test one application operation in the native SDK. Add an MCP or CLI adapter only after its validation, ACL, approval, and evidence paths are clear. One governed capability is a better starting point than a full migration.
apcore is a protocol specification. Each language is an independent implementation, kept honest by a shared cross-language conformance suite rather than by shared code.
| Repository | Role |
|---|---|
| apcore | Specification, schemas, conformance fixtures, documentation |
| apcore-python | Python SDK — pip install apcore |
| apcore-typescript | TypeScript SDK — npm install apcore-js |
| apcore-rust | Rust SDK — cargo add apcore |
One module, projected onto a different protocol. Each surface is specified once and implemented three times.
| Surface | Specification | Python | TypeScript | Rust |
|---|---|---|---|---|
| MCP | apcore-mcp | python | typescript | rust |
| A2A | apcore-a2a | python | typescript | rust |
| CLI | apcore-cli | python | typescript | rust |
Scan the code you already have. No rewrite, no parallel definition to keep in sync.
| Repository | Ecosystem |
|---|---|
| fastapi-apcore · django-apcore · flask-apcore | Python |
| nestjs-apcore · tiptap-apcore | TypeScript |
| axum-apcore | Rust |
| apcore-toolkit (py · ts · rs) | Shared scanner and schema-extraction logic behind all of the above |
| Repository | What it does |
|---|---|
| apexe | Wraps an existing CLI binary into a governed module by scanning its help output — no source access required |
| apflow | Distributed task orchestration where every capability in the graph is an apcore module |
| mcp-embedded-ui | A lightweight browser-based tool explorer that any MCP server can embed |
| Repository | What it does |
|---|---|
| apdev | Character validation, circular-import detection, and other repo hygiene checks |
| unirelease | One release pipeline across Rust, Go, Node, Bun, and Python |
| apcore-skills | Cross-language SDK synchronization, multi-repo audits, coordinated releases |
| apcore-refinery | Module metadata quality assessment for MCP, A2A, and CLI consumption |
apcore is open source and maintainer-led. The contributions that help most are the ones that strengthen conformance, the supported adoption path, or verified documentation.
| Implement an SDK | Port apcore to a new language. The conformance fixtures are your spec — pass them and you have a compliant SDK. |
| Build an adapter | Expose apcore modules over a new surface — a web framework, a protocol, a runtime. One guide, one registry to read from. |
| Pick a good first issue | Small, scoped tasks across the SDKs and docs, labeled for newcomers and ready to claim. |
| Join the discussion | Ask questions, propose spec changes, and shape the roadmap in the open. |
Every repository is Apache-2.0. The core project follows OpenSSF Best Practices.
The most useful contributions are the uncomfortable ones: a conformance case where two languages disagree, an authorization semantic the spec left ambiguous, or a surface where the governance guarantees quietly do not hold. Open an issue.