Skip to main content

oceanalt-mcp

OceanAlt pre-payment check for AI agents: before your agent pays, ask whether the payment should proceed. Returns allow, review or decline with reasons and evidence.

from oceanalt_mcp import decide
r = decide("0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b", network="ethereum")
print(r["decision"])  # decline: a known mixer

Amazon Bedrock AgentCore payments

AgentCore calls pre_sign_policy before it signs a payment and signs only if the policy returns exactly True. Set this policy on the config of every AgentCore payments integration you want gated. Installing or importing this package changes nothing by itself.

Install this version and the SDK for your framework. The pins are the combination this release was verified with; other versions may also work:

pip install "oceanalt-mcp==0.1.3" "bedrock-agentcore==1.26.0" "strands-agents==1.64.0"                      # Strands
pip install "oceanalt-mcp==0.1.3" "bedrock-agentcore==1.26.0" "langchain==1.4.10" "langgraph==1.2.20"   # LangGraph

This client needs Python 3.8+ and has no third-party dependencies. The AgentCore SDK and the frameworks have their own requirements (Python 3.10+ for the versions verified below).

Strands:

from strands import Agent
from bedrock_agentcore.payments.integrations.strands import AgentCorePaymentsPlugin, AgentCorePaymentsPluginConfig
from oceanalt_mcp import agentcore_pre_sign_policy

config = AgentCorePaymentsPluginConfig(
    payment_manager_arn="arn:aws:...",
    user_id="user-123",
    payment_instrument_id="instrument-456",
    payment_session_id="session-789",
    pre_sign_policy=agentcore_pre_sign_policy,
)
agent = Agent(tools=[...], plugins=[AgentCorePaymentsPlugin(config)])

LangGraph (LangChain create_agent):

from langchain.agents import create_agent
from bedrock_agentcore.payments.integrations.langgraph import AgentCorePaymentsMiddleware, AgentCorePaymentsConfig
from oceanalt_mcp import agentcore_pre_sign_policy

config = AgentCorePaymentsConfig(payment_manager_arn="arn:aws:...", user_id="user-123",
                                 payment_instrument_id="instrument-456", payment_session_id="session-789",
                                 pre_sign_policy=agentcore_pre_sign_policy)
agent = create_agent(model=..., tools=[...], middleware=[AgentCorePaymentsMiddleware(config)])

What the policy checks: the payee address and network of each offer, and nothing else. It does not check the amount, the asset, the merchant's origin or any other payment condition, so True means every payee passed this check, not that the whole payment is approved.

How it decides:

  • Returns True only when the request is an unambiguous x402 v1 request (JSON body, x402Version 1) or x402 v2 request (base64 Payment-Required header, x402Version 2, CAIP-2 networks), and OceanAlt answers allow for every payee offered in it.
  • Returns False, so nothing is signed, for: MPP challenges, a request carrying both v1 and v2 requirements, any entry without a payee or network, a v2 network that is not a valid CAIP-2 id, a duplicate JSON key, base64 that is not strictly valid, a version that does not match, more than 10 offers, a decline or review, a timeout, an HTTP error and any other exception.
  • Checks every offered payee, because AgentCore may pick any of them (a conservative choice). An identical (payTo, network) pair is looked up once.
  • Each lookup uses an 8-second network timeout. The policy uses a 20-second deadline for accepting lookup results: it returns False if the deadline has expired before the final approval check, even if a late lookup would have answered allow. Lookup waits use the remaining budget, but parsing and thread scheduling can delay the return. A timed-out lookup may continue in the background; its late result cannot authorize signing. Both values are arguments of the policy (timeout, budget).
  • Requests that name a testnet or an unsupported network are not cleared by this policy.
  • Sends each offered payee address and its network to https://oceanalt.com/api/decide. Nothing else from the request is sent.
  • The free tier needs no key. It has a monthly anonymous allowance and per-IP rate limits; agents behind one shared IP share them. When either is used up the policy returns False.

Verified against bedrock-agentcore 1.26.0 (strands-agents 1.64.0, langchain 1.4.10, langgraph 1.2.20) with a mock signer: 0 signer calls on decline, review, unreadable, ambiguous or MPP input, timeout, exception and an allow that arrives after the budget; 1 on allow. Not yet tested end to end in a live AWS account.

Free to use. Docs: https://oceanalt.com/en/api-docs · Hosted MCP server: https://oceanalt.com/api/mcp

Metadata

Release files for oceanalt-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oceanalt-mcp 0.1.3
File Size Uploaded Provenance Actions
oceanalt_mcp-0.1.3.tar.gz 6.8 kB Without provenance Details for oceanalt_mcp-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oceanalt-mcp 0.1.3
File Interpreter ABI Platform Actions
oceanalt_mcp-0.1.3-py3-none-any.whl Python 3 none any Details for oceanalt_mcp-0.1.3-py3-none-any.whl

Total release size: 14.4 kB

Release files / oceanalt_mcp-0.1.3.tar.gz

Download URL oceanalt_mcp-0.1.3.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
259fbcf54c53caf2615abfb07e52f14bb7a4dec98d9318f0c9d80a595d8fc367
BLAKE2b-256 checksum
How to use checksums
623a6c5a9566aa0b9fdf4010c649c10fc3ace4f0af562624a474d3b25c2f154a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / oceanalt_mcp-0.1.3-py3-none-any.whl

Download URL oceanalt_mcp-0.1.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6520767c763f1544308c26488d735d1a57591e35c300788403d70fe8e49bc320
BLAKE2b-256 checksum
How to use checksums
726389f310f5128ce7f68df8b878cc75d2912a4eaacb558e29733f1c3e14ab5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for oceanalt-mcp 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page