AANCER Developers

REST API and MCP server

The AANCER REST API for packs, agents, dashboards, hooks and apps, and the MCP server that lets Claude, ChatGPT and others use your agents.

REST API and MCP

AANCER has two programmable surfaces. The REST API under /api manages everything on these pages: packs, agents, templates, skills, dashboards, hooks and embedded apps. The MCP server at /mcp/v1 lets external AI clients, such as Claude, ChatGPT or your own agent, find and ask AANCER agents and use tools an administrator has approved. AANCER can also act as an MCP client: administrators register external MCP servers and approve their tools one by one, so agents and workflows can use them.

Packs are always created on your machine, signed with the aancer-pack CLI, and installed through the REST API or the admin screens. No MCP tool creates, validates or installs a pack.

Quick start

Import and activate a pack:

export AANCER=https://aancer.example.com
curl -X POST "$AANCER/api/extensions/packs/import" \
  -H "Authorization: Bearer $TOKEN" \
  --data-binary @acme.business-skills-1.0.0.ancpack

curl -X POST "$AANCER/api/extensions/packs/acme.business-skills/activate" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"version":"1.0.0"}'

Ask an AANCER agent over MCP:

curl -X POST "$AANCER/mcp/v1" \
  -H "Authorization: Bearer $MCP_TOKEN" -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'

REST API basics

  • Base address: https://<your installation>/api.
  • Authentication: the browser session, or a bearer token issued by the identity provider your installation uses for sign-in.
  • Bodies are JSON unless stated. Pack import takes the raw .ancpack bytes.
  • Errors have the shape { "error": "<message>", "code": "<CODE>", "details"?: [...] }. Validation details are { itemId?, path, message } with paths like /items/<itemId>/spec/<field>.
  • Every call checks the caller's permissions in the workspace. A missing permission returns 403 { "error": "Permission denied", "permission": "<name>" }, without a code.

Endpoint reference

Packs and extensions

Method and pathPermissionBody and answer
POST /api/extensions/packs/importextensions.manageraw .ancpack bytes. Add ?activate=1 to activate in the same call. 201 new or 200 known, with { packId, version, title, state, signer, items[], parameters[], upgradeFrom, warnings[], certification?, revocation?, keptBehind? }
POST /api/extensions/packs/{packId}/activateextensions.manage or extensions.manage_own{ version, parameters?: { <id>: "<value>" or null } }. null unbinds an optional parameter. Answer { packId, activeVersion, previousVersion, objects, warnings? }
POST /api/extensions/packs/{packId}/rollbackextensions.manage{ version }
POST /api/extensions/packs/{packId}/retireextensions.manage
GET /api/extensions/packsextensions.viewfilter with state, kind, workspaceId
GET /api/extensions/packs/{packId}extensions.viewdetail with every version
GET /api/extensions/objectsextensions.viewinstalled objects; filter with kind, workspaceId, state, packId
GET /api/extensions/schemasextensions.viewsupported kinds and schema versions
GET /api/extensions/export-keysigned in{ available }: whether this installation can sign exports
POST /api/extensions/packs/{packId}/revocation-overrideextensions.manage{ version, reason }: keep a withdrawn version running
DELETE /api/extensions/packs/{packId}/revocation-overrideextensions.manage{ version }: end that decision
GET /api/extensions/trust-keysextensions.viewlist of trusted keys
POST /api/extensions/trust-keysextensions.manage{ keyId, label?, publicKeyPem }, answers 201
DELETE /api/extensions/trust-keys/{keyId}extensions.manageanswers 204
POST /api/extensions/packs/scan-dirextensions.manageimport packs from the server folder

To test a pack, import it into an EVAL or test installation: import is installation-wide, checks everything and changes nothing until you activate. A pack that contains workflow templates also passes the template permission check on activate and rollback.

Other areas

AreaBase pathDetails
Agents/api/agentsAgents
Workflow templates/api/automations/templates/authoredTemplates
Workflows/api/automationsTemplates
Skills/api/skillsSkills
Datasets, models, widgets, dashboards/api/models, /api/widgets, /api/dashboards, /api/charts/pinDashboards
Event hooks/api/event-hooks, /api/events/catalogHooks
Embedded apps/api/appsEmbedded apps
Connectors/api/admin/connectorsConnectors
Themes and branding/api/extensions/themes, /api/brandingThemes

MCP server

This section is about the MCP server of your own AANCER installation, which gives assistants access to your workspace. For building extensions, use the public AANCER Builder server at https://aancer.ai/mcp instead (see the overview).

AANCER speaks the Model Context Protocol over Streamable HTTP, JSON-RPC 2.0, protocol version 2025-06-18.

  • Endpoint: POST https://<your installation>/mcp/v1
  • Header: Authorization: Bearer mcp_<64 hex characters>
  • After initialize, send the Mcp-Session-Id header you received.
  • Methods: initialize, notifications/initialized, tools/list, tools/call, resources/list, resources/read.
  • DELETE /mcp/v1 ends the session. GET /mcp/v1 answers 405.

Tools

ToolArgumentsWhat it does
find_agent{ query }finds agents the token may use
ask_agent{ agent, message, conversationId? }runs an agent and returns its answer
list_agent_runs{ agent? }lists recent runs
approved toolsas approvedexternal MCP tools that an administrator approved and marked as shareable

Governance stays in force. When an agent wants to write and the write needs a person's approval, ask_agent returns status: "approval_required" with an approvalUrl. Answers above the workspace's data classification are withheld and only the run id is returned.

Resources: knowledge sets the token may read, as aancer://kb/<setId>.

Tokens

TokenWho creates itCallScope
Personalany user with mcp.tokens_own in the workspace; the installation needs the licence features chatSurfaces and mcpServerFacadePOST /api/me/mcp-tokens { workspaceId, name, expiresInDays } (name required, up to 100 characters; 1 to 365 days, default 90) returns 201 { id, token, expiresAt }the agent tools
Facadean administrator with mcp.facade.issue_tokenPOST /api/admin/mcp/facade/tokens returns 201 { id, token }chosen tools and resources

The token value is shown once. Store it like a password.

Facade token body:

{
  "displayName": "Claude for the finance team",
  "workspaceId": "ws-finance",
  "allowedOrigins": ["https://claude.ai"],
  "scope": {
    "tools": ["mcp.crm.lookup_account"],
    "resources": ["aancer://kb/ks_policies"]
  },
  "dataClassification": "internal"
}

GET /api/admin/mcp/facade/exposable?workspaceId=ws-finance lists the tools and resources you can put in scope. If you set allowedOrigins, browser requests must send a matching Origin header. dataClassification is sovereign, internal or permitted.

Connect an MCP client

Most clients take a server address and a header. For example:

{
  "mcpServers": {
    "aancer": {
      "type": "http",
      "url": "https://aancer.example.com/mcp/v1",
      "headers": { "Authorization": "Bearer mcp_0123456789abcdef..." }
    }
  }
}

Then ask the client: "Use find_agent to find the invoice agent, then ask it to summarise this week's open invoices."

AANCER as an MCP client

Administrators register external MCP servers under /api/admin/mcp/servers with { displayName, endpointUrl, transport: "streamable-http", authMode: "bearer" or "none", credential?, openEgress? }. The rate limit is not part of the body; a new server starts at 60 calls per minute. They then approve each tool with a data classification ceiling, an approval requirement, the workspaces that may use it and a budget per call. Approved tools appear as mcp.<serverId>.<toolName> and can be used in agents and workflows. Network access to the server goes through the installation's allow-list.

Full example: build, sign, install and use

# 1. write manifest.json and content/ (see the page for your extension type)
# 2. sign
aancer-pack sign manifest.json content/ -o acme.invoice-desk-1.0.0.ancpack --key acme.key
aancer-pack verify acme.invoice-desk-1.0.0.ancpack --pubkey acme.pub

# 3. import into a test installation and read the summary
curl -s -X POST "$AANCER/api/extensions/packs/import" \
  -H "Authorization: Bearer $TOKEN" --data-binary @acme.invoice-desk-1.0.0.ancpack | jq '.items, .warnings'

# 4. activate
curl -s -X POST "$AANCER/api/extensions/packs/acme.invoice-desk/activate" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"version":"1.0.0","parameters":{"target_workspace":"ws-test","policies":"ks_booking_rules"}}'

# 5. create an agent from the blueprint
curl -s -X POST "$AANCER/api/agents" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"workspaceId":"ws-test","name":"Invoice clerk","blueprintId":"pack:acme.invoice-desk:invoice-clerk"}'

Common errors

CodeStatusMessageFix
PACK_UNSIGNED422This pack is not signed (MANIFEST.sig is missing).Sign with aancer-pack sign
PACK_SIGNATURE_INVALID400This pack could not be verified, the signature is invalid.Re-sign after every change
PACK_SIGNER_UNKNOWN422This pack was signed by an unknown key (...).Add the trust key
PACK_SCHEMA_INVALID422The pack failed validation: ...Fix the named path. Also used when the unzipped pack is too large
PACK_TOO_LARGE413The pack file is too large.Applies to the file size only
PACK_REVOKED403This pack version was withdrawn by the platform (...).Install the fixed version named in the message
PACK_LICENCE_REQUIRED403This connector pack needs an active licence.Activate the licence, then import again
PACK_LICENCE_MISMATCH403This connector pack was issued for a different licence.Ask for a pack issued to this installation
PACK_CONTENT_FORBIDDEN422The connector archive contains forbidden content: ...Remove the named files
PACK_PIECE_NAME_TAKEN409A connector named ... is already installed on this platform.Use another package name
EXTENSION_NOT_FOUND404... not found.Check the pack id or object id
PACK_VERSION_CONFLICT409Pack ... is already imported with different content. Bump the version.Bump the version
PACK_PARAMETER_MISSING422Required parameters are missing: ...Send them on activate
EXTENSION_REFERENCED409Other active extensions still reference objects in this pack: ...Retire dependants first
FORBIDDEN403You are not allowed to do that.Check the permission in the answer
(no code)403Permission deniedThe answer names the missing permission
VALIDATION400version is requiredSend version on activate
MCP401Authorization: Bearer mcp_… requiredSend the Authorization header
MCP401Invalid token format — expected mcp_… tokenUse an MCP token, not a session or API token
MCP401Invalid or revoked tokenIssue a new token
MCP_FACADE_REQUIRES_APPROVALJSON-RPC errorThe tool call needs a person's approval before it runsApprove it in AANCER, then call again
MCP403The MCP Server facade is not included in your current license.The installation needs the MCP server licence feature
MCP403Origin not in token allow-listMatch allowedOrigins, or issue a token without it for server use
INVALID_TOKEN_SCOPE400 on issue, 403 on /mcp/v1scope must be { tools: string[], resources: string[] }Fix the token body, or use a tool inside the token's scope

Limits and editions

  • The MCP server and personal MCP tokens need licence features of your installation. Registering external MCP servers is available to administrators with the MCP permissions.
  • Pack import and activation are controlled by permissions, with per-type licence features listed on each page.
  • Check your edition on aancer.ai/pricing.