Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.3 instead.
Reason given by maintainers: Superseded by 0.1.3

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:

pip install "oceanalt-mcp==0.1.2" bedrock-agentcore strands-agents        # Strands
pip install "oceanalt-mcp==0.1.2" bedrock-agentcore langchain langgraph   # 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). A repeated payee is looked up once. Each lookup times out after 8 seconds and the whole check after 20; both are arguments of the 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, langgraph 1.2.20) with a mock signer: 0 signer calls on decline, review, unreadable, ambiguous or MPP input, timeout and exception; 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.2

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.2
File Size Uploaded Provenance Actions
oceanalt_mcp-0.1.2.tar.gz 5.9 kB Without provenance Details for oceanalt_mcp-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 12.5 kB

Release files / oceanalt_mcp-0.1.2.tar.gz

Download URL oceanalt_mcp-0.1.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ab87c6b975aa797bbaf64c9d1f1991cbc1ae023cce7eee029638ead06bbf1554
BLAKE2b-256 checksum
How to use checksums
13d1c642d3a400ab89fe64a19bf4181c34df45fe9cb1c88d6dd8d4b63f4c63c3
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.2-py3-none-any.whl

Download URL oceanalt_mcp-0.1.2-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cce409358a5a32c66543c797cfacfacd8f6c882e954974c5e31acd45b0713fc1
BLAKE2b-256 checksum
How to use checksums
7315ea5d3e1d6ad1c3b4163330c6254ca0bbeaba23db8aa762b7976a6102f339
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.2

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.2 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