Agent integration

The MCP contract for reading CrowdAlpha with an agent.

The tools let an approved agent find an entity, read a record, fetch its sources, and see when access or evidence is missing. The contract is verified locally. Hosted access is not generally available.

Tool categories

Clear tools. Clear limits.

world.read

Entity discovery

Resolve the entity or package before requesting a record.

world.read

Gap discovery

Find stale assumptions, missing evidence, and contradictions inside approved context.

world.read

Planetary Model reads

Read records, recent changes, domain context, and visible blockers.

evidence.read

Evidence reads

Fetch the source trail before citing a claim.

decision.read

Decision inputs

Read typed records prepared for an approved workflow.

stream.read

Subscribed updates

Read updates for records and packages included in the caller's access.

simulate.run

Scenarios

Run a clearly labeled scenario when the caller has explicit access.

webhook.manage

Webhook visibility

Inspect delivery records. External webhook creation and customer secret rotation are not currently approved.

Read-first

Agents query context, evidence, packages, and updates before considering any downstream workflow.

Scoped

Sensitive capabilities require explicit authorization and may return redacted outputs.

Inspectable

Responses preserve enough context for a human, system, or auditor to understand what was used.

Bounded

Scenarios are separate from observed records and require explicit access.

Connection shape

Connection details come from CrowdAlpha.

The configuration below shows the expected shape. It is not a production configuration. Approved clients receive a base URL, token, scopes, and package instructions for their specific use.

Illustrative MCP config

{
  "mcpServers": {
    "crowdalpha-agentlayer": {
      "command": "python",
      "args": ["-m", "services.agentlayer.mcp_server"],
      "env": {
        "CROWDALPHA_API_BASE": "BASE_URL_FROM_APPROVED_HANDOFF",
        "CROWDALPHA_API_TOKEN": "TOKEN_FROM_APPROVED_HANDOFF"
      }
    }
  }
}

Local verification

# local contract checks, not a hosted service probe
python -m py_compile services/agentlayer/mcp_server.py
python -m pytest services/agentlayer/test_mcp_contract.py -q
pnpm agent:discovery-check

An agent should carry the record and its source trail together.

AgentLayer MCP Contract | CrowdAlpha