Second Wind AI
AWS diagnostic and recovery playbooks and infrastructure troubleshooting tools exposed over MCP and x402 micro-payments
Hosted MCP Server
npx add-mcp 'https://secondwindai.com/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
Second Wind
Second Wind sells AWS fix services to agents. Post the evidence of a failing deployment or integration and receive a repair plan worked out for that exact case. Payment is x402 on Base, requested only after the case is solved.
Fix services (8)
Each service solves one AWS failure for your exact case. Match your error text against use_when below, then POST the JSON input to the service url. input_schema and input_example for each service are in https://secondwindai.com/api/tools and https://secondwindai.com/openapi.json.
The response status tells you what to do next:
- 400 incomplete_configuration: the input does not match input_schema. errors names each field. Fix it and POST again. Cost: none.
- 422 no_actionable_finding: your case is not solved. reason names the evidence to add. Add it and POST again. Cost: none.
- 402 payment_required: your case is solved. The body has preview (what was found), price_usdc, content_hash (SHA-256 of the result you will receive) and next. Repeat the same POST with PAYMENT-SIGNATURE (x402 v2, scheme exact, USDC on Base) within 5 minutes.
- 200: result has verdict, diagnosis, steps and verify, then service specific detail. Execute result.steps in order, then run result.verify. Save paymentId and recoveryToken: GET https://secondwindai.com/api/purchases/{paymentId}/delivery with X-Recovery-Token returns the same result again at no cost.
You pay only for a 200. The result you receive hashes to the content_hash shown in the 402 (SHA-256 of its canonical JSON: keys sorted, no whitespace).
- cfn-export-in-use-update-plan: deploy refuses to update export — $2 USDC per solved case — POST https://secondwindai.com/api/x402/cfn-export-in-use-update-plan — v1 use when: Export cannot be deleted as it is in use by | Export cannot be updated as it is in use by | Cannot delete export as it is in use by Send the deployed and target templates of the exporting stack and its importers. Returns which exports are blocked and why, the exact deploy order that clears the deadlock, the outputs to pin in the interim deployment, and generated CDK or CloudFormation pin code that reproduces each deployed export unchanged. not covered: Same account and Region stacks linked by Outputs.Export and Fn::ImportValue, supplied as JSON templates. Does not cover CDK crossRegionReferences custom resources or Terraform consumers.
- iam-access-denied-layer-analysis: cross account access denied — $10 USDC per solved case — POST https://secondwindai.com/api/x402/iam-access-denied-layer-analysis — v1 use when: AccessDenied | is not authorized to perform: on resource: | with an explicit deny in a policy | because no policy allows the action | User: is not authorized to perform: sts:AssumeRole | KMS.AccessDeniedException Send the denied call and every policy around it: identity policies, resource or trust policy, KMS key policy, permissions boundary, SCP and RCP levels. Evaluates them together the way IAM does, same account or cross account, including the hidden KMS request. Returns the blocking layer and statement, statements that almost matched and why, and the minimal statement to add at each layer. not covered: Evaluates supplied JSON policies for one principal, action and resource. Does not read live accounts and does not evaluate VPC endpoint policies, S3 ACLs, KMS grants or Lake Formation.
- eventbridge-cross-account-delivery-trace: cross account events never arrive — $8 USDC per solved case — POST https://secondwindai.com/api/x402/eventbridge-cross-account-delivery-trace — v1 use when: events sent to another account never arrive | rule shows Invocations but target never runs | FailedInvocations metric above zero | rule on the receiving bus never triggers Send one sample event, the sending rule, the receiving bus policy, the receiving rules and target policies. Walks the event through all five places cross account delivery stops silently, with real EventBridge pattern matching, and returns the first blocking stage, the exact field or statement responsible, and the command or statement that fixes it. not covered: Bus to bus delivery between two accounts with supplied rules and policies. Lambda, SQS and SNS target policies are evaluated; role based targets are reported as unchecked. API destinations and Pipes are not covered.
- codepipeline-cross-account-artifact-access: cross account pipeline artifact denied — $8 USDC per solved case — POST https://secondwindai.com/api/x402/codepipeline-cross-account-artifact-access — v1 use when: Access Denied (Service: Amazon S3) in a cross account action | The ciphertext refers to a customer master key that does not exist | is not authorized to perform: sts:AssumeRole on resource: | Insufficient permissions: unable to access the artifact Send the pipeline definition plus the artifact bucket policy, artifact key policy and the roles involved. Checks every cross account action for the seven things that must line up across both accounts: Regional artifact store, customer managed key named by ARN, key policy, bucket policy, action role permissions, trust, and the pipeline role's permission to assume. Returns each failing item with the generated statement or pipeline change. not covered: Pipelines with S3 artifact stores and actions that name a roleArn in another account. Evaluates supplied policies only. Does not check the deployment's own permissions inside the target account.
- cfn-stuck-stack-recovery-plan: stack stuck rollback failed — $5 USDC per solved case — POST https://secondwindai.com/api/x402/cfn-stuck-stack-recovery-plan — v1 use when: UPDATE_ROLLBACK_FAILED | Stack is in UPDATE_ROLLBACK_FAILED state and can not be updated | DELETE_FAILED | ROLLBACK_FAILED | ROLLBACK_COMPLETE state and can not be updated Send the stack events of a stack stuck in UPDATE_ROLLBACK_FAILED, DELETE_FAILED or ROLLBACK_FAILED, including nested stack events. Separates the failure that started the rollback from the ones that blocked it, classifies each blocker, and returns the exact continue-update-rollback or delete command with only the resources that are safe to skip, plus how to reconcile each skipped resource afterwards. not covered: Works from supplied stack events for one stack and its nested stacks. Does not call AWS. StackSets operations are not covered.
- cdk-stack-dependency-cycle-fix: stacks form dependency cycle — $5 USDC per solved case — POST https://secondwindai.com/api/x402/cdk-stack-dependency-cycle-fix — v1 use when: '' depends on '' (...). Adding this dependency (...) would create a cyclic reference | cyclic reference between stacks at cdk synth Send the CDK cyclic reference error and the resource types of the two construct paths it names. Identifies which edge was added silently by a grant, an origin access control or a bucket notification, explains why, and returns replacement CDK code in TypeScript or Python that keeps the access but removes the back reference. Covers CloudFront OAC with a bucket in another stack, grants into KMS, S3, Secrets Manager, SQS, SNS and ECR policies, and S3 notifications. not covered: Two stack cycles reported by CDK synth where the error names both construct paths and their resource types are supplied. Three or more stack cycles and nested stack cycles are not covered.
- security-group-delete-dependency-plan: security group will not delete — $4 USDC per solved case — POST https://secondwindai.com/api/x402/security-group-delete-dependency-plan — v1 use when: DependencyViolation: resource sg- has a dependent object | aws_security_group: Still destroying... for many minutes | Security group deletion fails in a stack delete Send the network interfaces that carry a security group and the groups whose rules reference it. Identifies the owner of every dependent object (Bedrock AgentCore, Lambda, VPC endpoints, load balancers, EKS, ECS, RDS, EFS and more), which ones you can delete now, which need the owning service to release them, and which AWS holds for hours. Returns the ordered commands and how to keep Terraform or CloudFormation from failing meanwhile. not covered: Works from supplied describe-network-interfaces and describe-security-groups output for one group in one Region. Does not call AWS and does not inspect peered VPCs in other accounts.
- lambda-vpc-egress-path-trace: lambda in vpc times out — $4 USDC per solved case — POST https://secondwindai.com/api/x402/lambda-vpc-egress-path-trace — v1 use when: Task timed out after seconds in a VPC attached function | connect ETIMEDOUT | Connect timeout on endpoint URL | timeouts on only some invocations Send the function's VPC configuration and the VPC's subnets, route tables, NAT gateways, endpoints and security groups. Traces the call to the internet, an AWS service or a VPC resource from every function subnet separately, so intermittent timeouts caused by one misrouted subnet are identified. Returns each broken hop (public subnet without public address, NAT in the wrong subnet, blackhole route, endpoint without private DNS, group rules) with the command that fixes it. not covered: IPv4 paths inside one VPC from supplied describe output. Network ACLs, DNS, endpoint policies, peering and transit gateway hops beyond the VPC are not evaluated.
MCP and A2A
The same services, with the same free until solved rule and the same x402 payment:
- MCP (Streamable HTTP): POST https://secondwindai.com/mcp. One tool per service. A solved case returns isError with the x402 PaymentRequired; repeat tools/call with the signed payment in _meta["x402/payment"]. Server card: https://secondwindai.com/.well-known/mcp/server-card.json
- A2A (JSON-RPC): POST https://secondwindai.com/a2a with message/send and a data part {"service":"","input":{...}}. Payment uses the a2a-x402 extension metadata. Agent card: https://secondwindai.com/.well-known/agent-card.json
- No accounts or login: https://secondwindai.com/auth.md
Whole-product purchases and payment
- GET https://secondwindai.com/api/tools and https://secondwindai.com/api/proof.
- Choose the whole product and configure it. For a configured-language product, POST its endpoint with {"config":{"language":"..."}}; otherwise use its declared HTTP method. You can also POST https://secondwindai.com/rpc with {"slug":"...","config":{...}}. There is no separate price-request stage.
- The official x402 middleware returns PAYMENT-REQUIRED; review the exact amount and retry with PAYMENT-SIGNATURE. Keep the accepted purchase URL unchanged.
- Save paymentId, recoveryToken, content_hash, and receipt.tx_hash.
Supply a cryptographically random 32-byte base64url X-Recovery-Token before the first paid attempt if a disconnected response must be recoverable immediately. A completed retry requires the same private token. Never treat a payment ID or on-chain signature as a recovery secret.
Cap'n Web
https://secondwindai.com/capnp supports HTTP batch and bidirectional WebSocket RPC. Free methods: describe, search, select, configure. select(slug) returns a product capability; pipeline select(slug).configure(config).configuration(). configure accepts an optional buyer callback with clarify(questions). getGrant(paymentId,recoveryToken) and recoverSession(paymentId,recoveryToken) return purchase-scoped capabilities with info() and deliver(). Execution grants can replay their one purchased invocation with execute(invocationId,code,"javascript",callback). New transport sessions reacquire capabilities from D1; promise pipelining does not make a disconnected session durable.
Recovery
GET https://secondwindai.com/api/purchases/{paymentId}/delivery with X-Recovery-Token is free. If a token was lost, POST the recovery-challenge endpoint and then POST its wallet-signed response to recover. For a pending purchase without a saved receipt, POST /api/purchases/{paymentId}/reconcile with X-Recovery-Token and {"transaction":"0x..."}, or call reconcilePurchase(paymentId,recoveryToken,transaction) over Cap'n Web. The transaction hash may be omitted only when already recorded. This reads finalized Base evidence and repairs the original purchase; it never submits a transfer. Then use delivery or getGrant as usual. An uncertain settlement is never retried as a new charge.