-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description
The Aptos MCP create_gas_station_application and create_aptos_build_api_key tools consistently fail with a deserialization error, preventing automated gas station setup and breaking the "MCP only" developer workflow that the tool promises to provide. This forces developers to abandon the streamlined MCP workflow and manually create gas stations through the web UI, defeating the purpose of having automated MCP tooling for infrastructure setup.
The bug affects every developer attempting to use MCP for complete gas station configuration, creating a significant barrier to adoption and forcing workarounds that undermine the MCP value proposition. Additionally, the failed creation attempts create orphaned API Gateway resources that trigger infrastructure incidents requiring manual cleanup by the platform team.
Reproduction Steps
- Install and configure Aptos MCP following standard guidance
- Successfully create organization and project using MCP tools (this works correctly)
- Attempt to create gas station application using
create_gas_station_applicationtool - Tool consistently fails with error:
"Failed to create api key: {"code":400,"message":"error deserializing procedure arguments"}" - Attempt alternative approach using
create_aptos_build_api_keytool - Same deserialization error occurs
Multi-system confirmation: Reproduced on Mac+Claude Code by me (in China with VPN and also when using mobile hotspot) across 3 projects and by Jenks (Korea) once more independently today using identical reproduction steps.
Environment independence: Other MCP functions (organization creation, project creation, resource retrieval) work correctly, proving this is not a network, authentication, or environment configuration issue.
Proposed Solution
Investigation should focus on parameter serialization in the gas station creation workflow, specifically the frontend_args parameter handling that appears in the error chain. The bug likely exists in how the MCP tools serialize complex objects before sending them to the Aptos Build API.
Immediate fix needed: Correct parameter serialization in gas station creation tools
Secondary fix: Improve error handling to prevent orphaned resource creation when API calls fail
Files that might require updates
- src/services/GasStation.ts - API parameter serialization for gas station creation
- src/tools/aptos_build/applications.ts -
createGasStationApplicationToolerror handling and parameter formatting - src/tools/aptos_build/apiKey.ts -
createApiKeyTool(create_aptos_build_api_key) parameter handling - src/services/AptosBuild.ts -
createApiKeymethod parameter handling and validation
Additional Context
Infrastructure Impact: This bug connects directly to infrastructure incident #inc-9028 where orphaned API Gateway resources caused taint worker failures. The MCP deserialization error creates partial resources in API Gateway without corresponding upstream gas stations, leading to billing collection failures and system alerts.
Developer Workaround: Developers must manually create gas stations via geomi.dev web UI, then manually configure API keys in their projects. The resulting configuration functions correctly (as demonstrated by empty-event project), but this defeats the automated workflow that MCP is designed to provide.