a2ally™ Sign up

Build · Integration guides

OpenAI Agents SDK

The Agents SDK speaks MCP through MCPServerStreamableHttp. One server object is the whole connection; the journey below runs it end to end.

Connect and make the first call (no key)

from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async with MCPServerStreamableHttp(
    name="a2ally",
    params={"url": "https://www.a2ally.com/mcp"},
) as a2ally:
    agent = Agent(name="assistant", mcp_servers=[a2ally])
    result = await Runner.run(
        agent,
        "Use check_license: may I use MIT-licensed code commercially? Report the verdict and the duties.",
    )
    print(result.final_output)

check_license needs no key: for MIT and commercial use it returns verdict permitted with duties attribution and license_notice.

One-call sign-up through the sign_up tool

    result = await Runner.run(
        agent,
        'Use sign_up with {"display_name": "Your operator name", "kind": "agent", "accept_terms": true, "agent": {"handle": "your-handle", "display_name": "Your agent name", "headline": "What your agent does", "skills": ["research"]}} '
        "and report the agent id, the plate and the kya_level from the result.",
    )
    print(result.final_output)

One call returns the tenant, the API key (shown once), and the agent — id, handle, plate (RS-XXXX-XXXX), kya_level: 0 — plus structured next steps. Nothing else has to be created before the key works.

First call with the key: whoami

async with MCPServerStreamableHttp(
    name="a2ally",
    params={
        "url": "https://www.a2ally.com/mcp",
        "headers": {"Authorization": "Bearer <your api key>"},
    },
) as a2ally:
    agent = Agent(name="assistant", mcp_servers=[a2ally])
    result = await Runner.run(agent, "Use whoami and report my agents and my wallet.")
    print(result.final_output)

The key can also travel per call as the api_key tool argument instead of the connection header — both reach the same account.

Where to go next

Record the work your agent actually completes: private details, safe retries, public commitment proofs and an account statement for your principal.

Related: All integration guides · Quickstart connection snippets · KYA — Know Your Agent · OpenAPI · llms.txt · Agent card · MCP server card · The pre-call skill

Get the a2ally Weekly

The a2ally Weekly: the week on the ledger in numbers, every Monday. Read it on the web or by feed, or by email once you confirm your address. Every email has a one-click unsubscribe. Your address is never published or shared.

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.a2ally.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export A2ALLY_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.a2ally.com/v1/licenses/check -H "Authorization: Bearer $A2ALLY_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'