IMF is agent-ready
Connect an agent to verified V2 reads and exact planning through the local IMF MCP server and TypeScript SDK—without giving it wallet authority.
1. Connect the IMF MCP server
Use Node 22 and keep dogeforex-sdk-ts, dogeforex-mcp and dogeforex-protocol as sibling directories. Build the SDK first, then test and build the MCP server:
cd dogeforex-sdk-ts
npm install
npm run build
cd ../dogeforex-mcp
npm install
npm run typecheck
npm test
npm run buildAdd the following server to an MCP client. Replace only /absolute/path/to/dogeforex-mcp:
{
"mcpServers": {
"imf": {
"command": "npm",
"args": [
"--prefix",
"/absolute/path/to/dogeforex-mcp",
"run",
"start:v2"
]
}
}
}The client launches @dogeforex/mcp over local stdio. The start:v2 command selects the real artifacts in dogeforex-protocol/scripts/deployment/deployments/chikyuV2 and the public DogeOS testnet RPC. It loads all 12 currency systems and needs no private key or signer environment variable. This is not a hosted remote MCP endpoint. See the MCP repository and complete README.
2. Give the agent a safe first job
Use v2_verify for USD and CHF. Report the chain, source block, and any failed check.Use list_instances to compare all 12 systems in native units. Do not total unlike currencies.Use v2_savings for CHF and explain the current and next rate without treating it as a quote.Use position_state for this explicit position address and preserve unknown eligibility as unknown.
During MCP initialization, the server instructs agents to verify registry identity, preserve exact units and source blocks, distinguish failed or unknown state from zero, and keep every plan non-executable. Only V2 read/plan tools are advertised; legacy writes, fee sampling and legacy log enumeration are not registered.
3. Use the 14 V2 read/plan tools
- Discover and verify:
list_instances,instance_state,position_stateandv2_verify. - Plan borrowing:
v2_new_position,v2_clone_positionandv2_position_mint. - Plan management:
v2_repayment,v2_withdrawalandv2_challenge. - Read participation:
v2_bridge,v2_savings,v2_equityandv2_governance.
Amount inputs are unsigned human decimal strings. Outputs retain raw integer strings and exact formatted views. Local currency debt and supply use 18 decimals; collateral and source assets use their actual contract decimals; liquidation prices use 36 − collateralDecimals. One currency is one independent system: never add native K9USD, K9CHF or other unlike units into a synthetic total.
4. Keep provenance in every answer
Run v2_verify(code) before relying on current reads. Preserve protocolGeneration, network, chainId, code and sourceBlock with conclusions. Deployment evidence is historical evidence, not current chain state. Loading, failed, unknown, stale, wrong-chain and missing-code states are not zero balances, zero rates, no challenge or available capacity. Caller-dependent eligibility can be true, false or null; omitting a caller never proves eligibility.
5. Verify the integration
The default MCP suite is offline and covers registry loading, MCP initialization/tool discovery, exact arithmetic, read tools and disabled-write barriers. The opt-in live suite verifies all 12 real registries and their current source-block reads without signing or broadcasting:
cd dogeforex-mcp
DOGEOS_LIVE_V2_TESTS=1 npm test -- test/v2-live.test.tsSDK, plans and human authority
The TypeScript SDK supplies the same exact V2 read and planning models used by MCP and the app. Human and agent workflows use the same currency identity, registry evidence, caller, recipient, raw amounts, decimals and timestamps. Browser exports such as imf.position-plan.v1 and imf.v2-read-plan.v1 are review documents, not calldata, MCP execution requests or spending authority. Drafts stay in storage local to the app origin and are not cloud-synchronized.
On the approved runtime, the app verifies current state, runs a fresh static call and gas estimate, shows exact calldata and requires separate explicit wallet confirmation. Guided writes are USD-only on DogeOS Chikyū testnet. The MCP itself never signs, simulates a transaction, broadcasts, runs a keeper or resubmits. tUSDC and tDOGE are test assets; production readiness and inherited audit coverage are not claimed. See V2 architecture, borrowing costs and participant responsibilities.