Skip to content

Gas Station Creation Tools Fail with Deserialization Error - Blocks Automated Developer Workflow #46

@tippi-fifestarr

Description

@tippi-fifestarr

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

  1. Install and configure Aptos MCP following standard guidance
  2. Successfully create organization and project using MCP tools (this works correctly)
  3. Attempt to create gas station application using create_gas_station_application tool
  4. Tool consistently fails with error: "Failed to create api key: {"code":400,"message":"error deserializing procedure arguments"}"
  5. Attempt alternative approach using create_aptos_build_api_key tool
  6. 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

  1. src/services/GasStation.ts - API parameter serialization for gas station creation
  2. src/tools/aptos_build/applications.ts - createGasStationApplicationTool error handling and parameter formatting
  3. src/tools/aptos_build/apiKey.ts - createApiKeyTool (create_aptos_build_api_key) parameter handling
  4. src/services/AptosBuild.ts - createApiKey method 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions