Machine endpoint
https://aigx.dev/mcp/ This path is reserved for MCP JSON-RPC. Use this guide for humans, and use /mcp/ for agents.
Connect flow
- Create or open your AIGX Brain.
- Generate a connect code for your agent.
- Exchange the connect code for a scoped bearer token.
- Configure your MCP client with endpoint
https://aigx.dev/mcp/and the bearer token.
Tools
aigx_recall({ task, budget_tokens? })
-> { context_pack, ids, scope, gaps }
# context_pack is <context_pack version="0.2"> with contract, items, and gaps
aigx_remember({ observation })
-> { status: "written" | "proposed", id?, reason? } Context pack contract
aigx_recall does not return a Markdown dump. It returns a bounded AIGX context pack: a compact,
XML-like memory contract that tells the agent what it may use, what is missing, and when it should write back.
<context_pack version="0.2" format="aigx.context_pack" task="Write an investor email about Feex" scope="work.comms" budget_tokens="900" item_count="2" gap_count="1">
<contract>
<rule>Use only the selected items as memory evidence for this task.</rule>
<rule>Do not treat gaps as facts; ask, infer cautiously, or proceed without the missing memory.</rule>
<rule>After the task, call aigx_remember only for durable new facts, preferences, decisions, or corrections.</rule>
</contract>
<items>
<item id="work.feex.positioning" type="project" sens="low" conf="0.92" file="work.aigx" source="owner">
<fact>Feex is the AI intelligence layer for computers.</fact>
</item>
<item id="preferences.communication.direct" type="preference" sens="low" conf="0.9" file="preferences.aigx">
<fact>User prefers direct, pragmatic answers with no corporate speak.</fact>
</item>
</items>
<gaps>
<gap id="gap.investor_history" severity="medium">No remembered relationship history with this investor.</gap>
</gaps>
</context_pack> Why AIGX beats Markdown for agents
Markdown is great for human explanation. AIGX is better for agent memory because each memory is addressable, typed, scoped, auditable, and governed by policy. The agent does not need to guess whether a paragraph is a rule, preference, temporary note, sensitive fact, or stale project detail.
- Stable ids make memories updateable instead of merely quotable.
- Typed tags separate facts, preferences, projects, people, rules, procedures, and episodes.
- Scope-aware retrieval prevents full-brain prompt dumps.
- Confidence, sensitivity, source, and expiry travel with the fact.
- Explicit gaps reduce hallucinated personal context.
Agent config
Use this shape in any MCP client that supports remote HTTP servers:
{
"mcpServers": {
"aigx-brain": {
"url": "https://aigx.dev/mcp/",
"headers": {
"Authorization": "Bearer AIGX_TOKEN_HERE"
}
}
}
} Why scoped tokens
The default token only grants context.read and memory.propose. That lets an agent
retrieve context and suggest memory updates, but it cannot export the brain or silently perform sensitive
writes.
Local development
The reference server is in the repository and can be run locally while the hosted endpoint is deployed:
node tools/aigx-brain/src/server.mjs --brain templates/brain --port 8787 --require-auth
# MCP endpoint:
http://localhost:8787/mcp/ Full implementation details live in tools/aigx-brain on GitHub.