Skip to content

Epic: StarkZap Execution Parity (SDK -> MCP -> CLI) #80

@omarespejel

Description

@omarespejel

PR #21 proved the model: thin MCP wrappers over StarkZap SDK calls with strong validation and write gating.
Now SDK surface has grown, and MCP/CLI are behind.

This epic closes that gap and makes StarkZap the canonical execution surface for both developers and agents.

Current status

Decision boundary

  • starkzap owns execution (SDK + MCP + CLI).
  • starknet-agentic owns policy/safety and agent-runtime context (session lifecycle, ERC-8004 identity/metadata, attestation/provenance, x402 policy/preflight, plus Cairo coding skills/knowledge packs for agent development workflows).

Scope (parity targets)

P0 MCP parity

P1 MCP parity

  • starkzap_get_allowance
  • starkzap_approve_exact
  • starkzap_approve_if_needed
  • starkzap_revoke_approval
  • Bridge tools once bridge SDK module is merged:
    • starkzap_bridge_quote
    • starkzap_bridge_execute
    • starkzap_bridge_status
    • starkzap_bridge_routes

CLI parity (same core, no duplicate logic)

  • Add starkzap-cli commands for all P0 MCP tools.
  • CLI and MCP must call the same shared action handlers + schemas.
  • CLI should follow after the MCP surface stabilizes unless a PR already touches the same shared action layer.

PR slicing policy

  • Keep reviewable PRs small.
  • MCP read tools can land separately from write tools.
  • Write tools require extra review for amount caps, write gating, tx tracking, sponsored mode, and retry/reconciliation behavior.
  • Avoid broad CLI/action-layer refactors in the same PR as new state-changing tools unless the refactor is required for safety.

Implementation rules

  • No business logic in MCP/CLI adapters.
  • Shared action layer: parse/validate -> SDK call -> normalized output.
  • MCP tool names must use the starkzap_ namespace prefix to avoid collisions with other MCP servers.
  • Keep existing safety rails:
    • --enable-write
    • --enable-execute
    • amount caps
    • batch caps
    • rate limits
    • strict address/token validation
  • Read-only tools must still validate provider ids, token ids, addresses, and SDK response shape before returning output to the agent.

Drift prevention (required)

  • Add conformance test in CI:
    • execution action manifest -> MCP tool registry (must match)
    • execution action manifest -> CLI commands (must match)

Migration note

  • During migration window, starknet-agentic can keep compatibility aliases for moved execution tools.
  • New execution capability should land in StarkZap first.

Acceptance criteria

  • All P0 tools implemented in MCP with tests.
  • Matching CLI commands implemented with tests.
  • Conformance test active in CI and failing on parity drift.
  • README/docs updated with tool/command matrix and examples.
  • No breaking changes to existing MCP tool names in starkzap-mcp.

Metadata

Metadata

Assignees

Labels

cliCommand-line interface surfaceenhancementNew feature or requestepicCross-cutting initiative spanning multiple issuesmcp-serverModel Context Protocol server surfacesdkSDK public API surface

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions