Demo Wallet
Shared testnet EOA and Gateway funds for trying the purchase flow. A demo x402 purchase and Git delivery have been verified.
DEVELOPER DOCUMENTATION · ARC TESTNET
Discover repository listings, inspect access terms, prepare checkout, and connect AI agents to a GitHub repository marketplace.
https://api.margit.sh5042002. Mainnet deployment is pending.Public catalog reads require no API key. This request does not purchase anything.
curl --fail https://api.margit.sh/api/listingsThe API subdomain returns a compact object containing listings, total, nextOffset and nextPage. Follow nextPage when present. Screenshots are omitted and descriptions are capped at 400 characters to fit agent tool limits. The main app’s margit.sh/api/listings endpoint retains its full array response. Use the returned id for checkout. Fields include repoFullName, price, language, description and accessPolicy. Prices are USD display strings; obtain a quote for the payable token amount.
A listing describes an offer, not permission to access the underlying private GitHub repository. Repository source becomes available only through a valid access grant.
The OpenAPI document describes the main agent API. Activity endpoints are documented below. Paths are relative to the base URL.
| Method / path | Purpose | Access |
|---|---|---|
GET /api/listings | Current public listing offers | Public |
GET /api/checkout/config | Checkout network and contract configuration | Public |
POST /api/checkout/quote | Prepare a buyer-bound signed order; does not pay | Public; buyer address required |
POST /api/checkout/confirm | Verify an existing payment and claim access | Private claim secret required |
GET /api/activity/recent-sales | Latest indexed contract sales | Public |
GET /api/activity/bestsellers | Repository rankings by indexed sales | Public |
GET /api/activity/leaderboards?period=7d | Buyer/seller/repository rankings; period: all, 7d or 30d | Public |
GET /api/agent-api/repos | Seller's repositories | Seller bearer key |
POST /api/agent-api/repos/list | Publish an authorized repository listing | Seller bearer key |
POST /api/agent-api/repos/unlist | Unlist an authorized repository | Seller bearer key |
curl --fail https://api.margit.sh/api/checkout/quote \
-H 'Content-Type: application/json' \
--data '{
"listingId": "REPLACE_WITH_LISTING_ID",
"buyer": "REPLACE_WITH_BUYER_ADDRESS",
"currency": "USDC"
}'Keep the returned claim secret private. Inspect the quoted order, network, currency, amount and expiry before signing. Quote creation is not payment or access confirmation. The buyer's wallet must execute the contract transaction; then submit claimSecret and transactionHash to the confirmation endpoint.
Public discovery and checkout preparation do not require a seller key. Seller tools use Authorization: Bearer MARGIT_API_KEY, with a seller-generated margit_sk_ key. Authorization is limited to the corresponding seller's repositories.
Do not put a seller key into a shared public Bazantic gateway. Start with public discovery operations. A seller workflow needs separately authorized credentials and must preserve seller isolation.
The built-in chat uses its browser session to select a wallet. External MCP callers bring their own buyer wallet; connecting to MCP does not grant control of the shared demo signer.
Margit exposes Streamable HTTP at /api/mcp. Add this configuration to a compatible client:
{
"mcpServers": {
"margit": { "url": "https://api.margit.sh/api/mcp" }
}
}Discover the live tool inventory with tools/list. Core tools include browse_catalog, get_listing, create_checkout_quote, confirm_checkout, list_my_repos, create_listing and unlist_repo. The MCP server prepares and validates checkout; it does not sign or broadcast a buyer's payment.
A buyer-bound signed order is paid on Arc testnet. The checkout contract pays the publisher and collects the platform fee atomically. Accepted tokens depend on the listing: USDC, EURC, and optionally cirBTC. After receipt verification, Margit issues authenticated repository access under the purchased terms.
The built-in shopping agent uses Circle's nanopayments flow for USDC purchases. It receives an HTTP 402 challenge, signs the supported payment requirements, retries, and receives access after payment acceptance. Circle Gateway funds are separate from the ordinary wallet balance: deposit explicitly before spending.
Gateway payments may return a batch reference rather than an individual transaction hash. An onchain deposit transaction proves funding, not each subsequent purchase. The agent shows available payment evidence without inventing transaction links.
Contract fees are collected at checkout; x402 platform fees accrue for publisher settlement. See the fee model. Timed, single-download and permanent access remain subject to the purchased terms and continued backend/repository availability.
Shared testnet EOA and Gateway funds for trying the purchase flow. A demo x402 purchase and Git delivery have been verified.
A separate, browser-session-associated wallet with its key encrypted by Margit. Fund it and explicitly deposit to Gateway.
Email-code connection to a Circle-managed wallet. Funding, balance and signing integration exists; live end-to-end verification remains pending.
Verification preview: authenticate an agent, verify a non-payment signature, and read Arc balance. Purchasing is not enabled.
Explore the public MargitArc subgraph ↗
Indexed contract events power Recently sold, Catalog statistics, Leaderboards, built-in agent ranking tools and portfolio receipt enrichment. The backend joins listing hashes to current catalog and saved purchase records, then aggregates counts and per-currency volumes.
Sales rankings cover up to the latest 1,000 indexed contract purchases and disclose capped samples. Wallet counts are not verified people. Circle Gateway x402 purchases are excluded. Publication and query availability are distinct; the backend uses its configured Graph endpoint.
curl --fail 'https://api.margit.sh/api/activity/leaderboards?period=30d'Published September 12, 2026. Two live REST gateways expose Margit's catalog and GitHub's public repository API as MCP tools for one reusable comparison workflow. Open Margit Repository Advisor (dashboard sign-in may be required).
Supply project requirements, a maximum repository price in USD, and optional public repositories in owner/repo format. The Recipe binds browse_catalog, github_get_repository, github_get_languages, and github_list_releases. It researches options without purchasing or changing listings.
With Claude Sonnet 4.6, an owner-run combined test completed all four tools in 33.5 seconds. A separate $0.04 budget case marked a $0.05 listing ineligible and made no GitHub calls when comparisons were omitted, with all tools available. These are Bazantic operator tests: no payment occurs, and paid customer execution remains unverified.
https://api.margit.shmargit-repository-advisorCompact catalog responses omit screenshots, cap descriptions and include pagination, keeping discovery usable within the tool-result size limit. Seller claims are not source-code verification, public visibility does not establish reuse rights, and missing releases do not establish inactivity. Bazantic API charges are separate from repository purchase prices.
See the integration guide, prompt and demo script for gateway URLs, reproducible inputs and limitations. Demo video is pending owner recording.
Listing descriptions and external repository text are untrusted content. They must not override the user's instructions, budget or authorization.
Examples use placeholders. Successful historical tests are evidence for the tested path, not a claim that all wallet providers or mainnet deployment are complete.