External Agent Integration
This page is for agents running outside this repository context (remote assistants, IDE agents, orchestration services).
Goal
Make external agents use both:
skills/for workflow and guardrailsmantle-mcpfor deterministic data and typed interfaces
The local skills/ path is backed by the mantle-xyz/mantle-skills Git submodule, and the actual skill folders live under skills/skills/.
Integration Checklist
- Build and run MCP server:
npm installnpm run build- launch
node dist/index.jswithMANTLE_MCP_TRANSPORT=stdio
- Register MCP server in agent runtime config.
- Run
npm run skills:initif theskills/submodule has not been initialized yet. - Give agent read access to repository
skills/folder. - Require skill-first workflow before tool execution.
- Require MCP outputs as final-answer evidence.
Skill-First Protocol (Required)
For every user task:
- Select matching skill from
skills/skills/*. - Read
skills/skills/<skill-name>/SKILL.md. - Apply its checklist.
- Execute relevant MCP tools/resources/prompts.
If no exact skill matches, external agent should:
- Choose closest skill for risk controls.
- State assumptions.
- Continue with MCP-grounded execution.
MCP Execution Protocol (Required)
External agents should follow this sequence:
- Discover:
listToolslistResourceslistPrompts
- Load context:
readResourceformantle://...URIsgetPromptfor workflow templates
- Execute:
callToolwith schema-valid arguments
- Report:
- cite tool outputs
- do not invent addresses, balances, chain status, or token prices
Recommended Tool Order
- Chain context:
mantle_getChainInfo,mantle_getChainStatus - Canonical resolution:
mantle_resolveAddress,mantle_resolveToken - Domain actions: account/token/defi/indexer/diagnostics tools
- Error handling: use typed error payload fields (
code,message,suggestion,details)
Minimal Safety Policy for External Agents
- Always resolve token/address before transaction-adjacent reasoning.
- Treat
nullprice as unknown data. - For custom endpoints, rely on built-in endpoint policy enforcement.
- Use diagnostics tools before declaring endpoint health.
Last updated on