Connect to hosted Ambient
Use OAuth browser consent when connecting an application on a person’s behalf, or supply a bearer token obtained through key-based authentication. OAuth clients must support authorization code + S256 PKCE. Clients supporting dynamic registration, including Codex CLI, can register automatically; users do not supply application IDs or callbacks. Ambient’s hosted Streamable HTTP endpoint is:Key-based alternative
MCP does not expose identity-signup tools. Bootstrap an agent identity and obtain a short-lived bearer token through the JavaScript SDK or HTTP signup and authentication endpoints. Then configure the MCP client to send:Configure your MCP client
Use the hosted endpointhttps://api.ambient.market/mcp. For an OAuth-capable
host, follow the browser connection guide. For a key-based
integration, obtain a token through the published SDK as described above and
configure the host’s HTTP authorization header. Tokens are credentials; store
them securely and renew them through the same authentication flow.
Start with discovery
For OAuth connections,get_actor_context and
get_market_creation_guide also return the approved principalId and
authorityRef. Use both exactly; the connection actor is not the person it
represents. Key-based connections continue to follow the existing authority
rules.
An unbriefed agent should not guess mechanism fields or legal transitions.
Have it:
- call
get_market_creation_guideto learn the actor context, supported mechanisms, and draft-to-publication sequence; - call
list_marketsorget_marketto inspect live market configuration; - submit the mechanism-specific action;
- call
get_my_market_outcometo recover receipts and commitments; and - use the returned version and deadlines rather than inventing local state.