Skip to main content
Glama
Apiosk MCP Server
by obcraft

Apiosk MCP

@apiosk/mcp 3.0.0 brings the Apiosk Ask workflow to Claude, Codex and other MCP hosts: ask a question, compare matching sources, review inputs and one total, approve that request, and inspect saved results. It uses the existing Gateway for discovery, planning, prices, execution and evidence.

MCP1 card URLs, connection identity, token formats and cached Ask tool signatures remain compatible. Compatibility operations stay private to cards; new model connections continue to see Ask first. Both old and new approval calls share the same durable approval record.

The default is question-scoped source discovery. There is no global “browse the catalog” flow. For example, “What does ASML do?” should first call apiosk_ask with that question and display its matching sources; a model's general knowledge is not an Apiosk result.

This repository is the canonical obcraft/apiosk-mcp implementation. Versioned source and manifests do not establish that this version has been deployed, published or installed in a host.

Ask interactions and embedded components

The server exposes 36 public tools and six private component operations, saved-request resources and an Ask prompt. The actual App Ask React components and design tokens are vendored in src/ask-page/ and compiled into the self-contained embedded resource. The local tester loads that same resource. src/ask-ui/ retains the original MCP transport and compatibility renderers; every operation still uses the durable saved-request and approval journal.

Source discovery uses the App’s filtering, deduplication and provider ordering. Offered endpoint descriptors enrich matching sources without adding unrelated catalog entries. Account display currency comes from Gateway’s read-only /v2/display-context; quoted atomic amounts remain unchanged. Rebuild the embedded bundle with npm run build:ask-page after editing its sources.

Manual source selection prepares each chosen native endpoint with the App’s exact input values. Connected clients use /v2/ask/source/prepare, which requires explicit approval even when the connection has a standing spending rule. The MCP combines those saved quotes into one reviewed maximum; preparation does not purchase data.

MCP Apps and ChatGPT-compatible metadata identify the embedded resources. Model-visible results carry compact source identifiers, status, input needs and the exact approval. Full component data travels separately in _meta.apiosk_card_data, so large source schemas and raw response trees do not flood the model context. Saved evidence remains available through the result and evidence tools.

Hosts that support embedded components can show the interactive cards. Text-only hosts receive structured results and use the public tools. Support and rendering still depend on the host; passing local tests does not establish installed Claude, Codex or ChatGPT acceptance. Read-only HTML exports are separate from interactive cards.

Interaction

Tools

Ask and inspect matching sources

apiosk_ask, apiosk_sources

Edit source inputs and prepare one total

apiosk_prepare

Review and explicitly approve the exact quote

apiosk_approve

Read progress, refresh prices, supply choices or missing input

apiosk_status, apiosk_requote, apiosk_continue

Retry interrupted discovery and adjust task options

apiosk_retry_search, apiosk_task_options, apiosk_source_selection, apiosk_analysis_quote

Saved answers, evidence, pages, downloads and conversations

apiosk_result, apiosk_evidence, apiosk_result_page, apiosk_artifact, apiosk_chats

Follow up using purchased evidence

apiosk_follow_up

Connected app actions and recurring checks

Integration/action review tools, native recurring tools and apiosk_schedule_handoff

apiosk_ask defaults to mode: "sources". Automatic planning is available with mode: "automatic". Preparation never approves a purchase. Review the returned currency, maximum total, sources, gaps, expiry and approval ID before authorizing execution. The visible choices use the same purchasability filter as the Ask page; discovery metadata and source options are not purchased findings.

Results retain source dates, citations, coverage and gaps, including meaningful 0 and false values. Local filters, sorting, chart/table views, saved pages and exports reuse saved data. Follow-ups use purchased evidence where possible; a need for new data creates a separately reviewed request.

Related MCP server: AI-Agent-Hub

Run from this checkout

Requires Node.js 22.16 or newer and an authorized Apiosk connection. In this workspace the canonical directory is /Users/olivier/Documents/Apiosk/Production/Main/mcp.

cd /Users/olivier/Documents/Apiosk/Production/Main/mcp
npm ci
npm run check
npm test

Use the existing Apiosk credentials in your private environment or local .env; do not put credentials in committed examples. Runtime entry points read environment variables. To load .env explicitly, use Node's --env-file option.

Entry point

Purpose

node index.mjs / npm run start:stdio

Local stdio MCP; uses the configured connection token. The apiosk, apiosk-mcp and apiosk-mcp-server package commands use this entry.

node server.mjs / npm start

Canonical hosted HTTP server, default port 3000, with OAuth metadata, registration, authorization and token routes. Also retains authenticated legacy SSE endpoints.

node bin/mcp-2.mjs --http --host 127.0.0.1 --port 3012

Minimal bearer-token HTTP transport for local testing. This compatibility filename remains internal; this entry does not provide the hosted OAuth flow.

For stdio with a private .env:

node --env-file=.env index.mjs

The hosted server preserves the existing OAuth identity and secret configuration. Starting it requires those settings, including its signing secret; use node --env-file=.env server.mjs when they are in a local file. HTTP clients authenticate each request themselves. A server-wide token is never lent to HTTP callers. /health reports process health, not Gateway or source readiness.

Local tester

The tester runs at http://127.0.0.1:3013 and defaults to an MCP endpoint at http://127.0.0.1:3012/mcp. Start the minimal local MCP transport in one terminal:

node --env-file=.env bin/mcp-2.mjs --http --host 127.0.0.1 --port 3012

Start the tester in another:

npm run dev:chat

To test the canonical hosted server on port 3000 instead:

MCP_DEV_URL=http://127.0.0.1:3000/mcp npm run dev:chat

The tester reads this checkout's .env, .env.v2.local and .env.dev.local, with inherited environment values taking precedence. It reuses an existing MCP_DEV_TOKEN and OPENROUTER_API_KEY. If no local OpenRouter key is set, it reads only the provider key from the sibling gateway/.env (OPENROUTER_API_KEY, then INTENT_API_KEY). It does not inherit Gateway execution flags or change those credentials. MCP_DEV_PORT, MCP_DEV_URL and MCP_DEV_MODEL override the tester defaults. Set MCP_DEV_GATEWAY_URL for a custom Gateway event origin; the embedded card and tester use the same fixed origin policy for live status updates.

Connect the intended account before asking a question. The tester calls apiosk_ask for the first question and renders the same embedded components served to other hosts. An initial discovery stops at the authoritative Ask card without an extra model-written answer. Later model continuations receive a bounded projection of tool results; full card data stays available to the component. Model API usage and approved source purchases are separate operations.

Connect Claude or Codex

Use examples/codex.toml, examples/claude-code.mcp.json or examples/claude-desktop.json, preserving other configured servers. Adjust absolute paths for your installation and keep tokens in private configuration or environment variables. These files are examples, not an installed connection.

The hosted connector address remains https://mcp.apiosk.com/mcp; local source changes do not update that deployment. The Apiosk plugin supplies Ask-first instructions and the hosted connection definition. server.json, manifest.json and dxt.json describe the canonical package; a desktop manifest is not a built or installed bundle.

Configuration and backend boundaries

Variable

Meaning

APIOSK_GATEWAY_V2_URL

Data/execution Gateway; defaults to https://gateway.apiosk.com. Use loopback HTTP only for a local Gateway.

APIOSK_GATEWAY_URL

Existing OAuth agent gateway setting; it does not select the data/execution Gateway.

APIOSK_CONNECT_TOKEN

Apiosk agent connection credential for stdio.

APIOSK_TOKEN

Overrides the connection token. A valid personal App session JWT enables account-only routes; this server does not refresh that App session.

APIOSK_WORKSPACE_ID

Stdio workspace. HTTP callers use x-apiosk-workspace-id.

APIOSK_MCP_STATE_DIR

Persistent private journal directory; defaults to .local/state in the package.

APIOSK_MCP_PORT / PORT

HTTP port; defaults to 3000.

APIOSK_MCP_HOST / APIOSK_MCP_BIND_HOST

Listener address. The hosted entry defaults to 0.0.0.0; use loopback for local-only access.

APIOSK_MCP_ALLOWED_HOSTS, APIOSK_MCP_ALLOWED_ORIGINS

Explicit host/origin controls for the HTTP listener.

Gateway scope, budget, workspace and feature restrictions remain authoritative. Organization API keys are not substitutes for agent connection tokens in the raw task/approval protocol. Account-only integrations and native recurring operations may require a valid App session and backend enablement; an app_only or public_api_required response is not bypassed.

Connection tokens use /v2/ask/page, which applies the Ask page's interpreter, validation and source searches. App sessions use the original App routes. Both use the same source filtering, grouping, input values and display currency. Connected discovery preserves the App's matches without the older public API's interpretation repairs or extra source expansion; signed searches remain bound to the account, connection and workspace. Source refresh reuses the saved parse, and automatic planning adopts that displayed search without parsing the question again.

Recurring execution needs its own explicit review of the workflow, schedule, destination and cost limits. apiosk_schedule_handoff supplies instructions for the host scheduler and reports schedule_created: false; it does not create a scheduled job. External app actions likewise require their own reviewed execution.

Saved state, recovery and deployment

The journal stores private conversations, evidence and approval intent with private file permissions, without storing credentials. Conversations are separate from the web app's chat-history table; authorized Gateway tasks can be imported by ID. State scopes include the Gateway and workspace. Raw bearer callers are token-scoped; hosted OAuth sessions retain their verified grant scope across token refresh.

Atomic writes and per-request locks record approval intent before dispatch. An uncertain purchase is not blindly replayed: read saved status and use the returned recovery path. The quoted total is a spending ceiling across providers, not an all-or-nothing transaction. Local disk failures stop money-moving actions.

Hosted operation requires a persistent journal. The Fly configuration preserves the existing app identity and expects an existing mcp_state volume mounted at /data; run one machine until shared state and distributed locking are implemented. Provision and review that volume before deploying. See deployment and release instructions.

Pushing the repository runs checks only. Deployment and publication are separate manual workflows. Tests use controlled fixtures and do not purchase source data; local success is not proof of production retrieval, message delivery, a running schedule or an installed host connection.

Available Tools

42 tools
apiosk_configureB
Read-onlyIdempotent
Inspect

Show a structured Apiosk control menu for a wallet, including funding instructions, QR code output when available, and wallet/pay/publish/data actions.

Inputs: section, wallet_id, funding_provider, include_qr_data_url. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_create_accountAInspect

Create an Apiosk dashboard account for credits-based payments. Local stdio only; saves the returned dashboard session token locally when available.

Inputs: email (required), password (required), save_session. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_create_walletBInspect

Create or import a managed Apiosk wallet for the signed-in user.

Inputs: label (required), mode, secret, daily_limit_usdc, +1 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_create_wallet_api_keyCInspect

Create a new API key / connect token for a managed wallet.

Inputs: wallet_id (required), name, private_key, expiration_days, +1 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_create_wallet_connect_stringAInspect

Rotate or create a connect token for a managed wallet and return the new connect string.

Inputs: wallet_id (required), token_name, private_key, revoke_existing. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_delete_apiA
DestructiveIdempotent
Inspect

Delete or deactivate one of your published Apiosk APIs with signed wallet auth.

Inputs: slug (required), wallet_id. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_delete_walletC
DestructiveIdempotent
Inspect

Delete one of the signed-in user's wallets.

Inputs: wallet_id (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_delete_wallet_api_keyA
DestructiveIdempotent
Inspect

Delete an existing managed wallet API key permanently.

Inputs: key_id (required), wallet_id (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_discoverA
Read-onlyIdempotent
Inspect

Find the best paid x402 API for a data capability across discovery sources (Apiosk catalog + federated external listings). Decompose the user's request into capability segments first, then call this once per capability. Returns a normalized, ranked list; each result's executable_via says whether to call apiosk_execute (Apiosk-settled) or apiosk_inspect_x402 + apiosk_fetch_paid (external). Use this instead of apiosk_search when the goal is 'get real paid data for X', not just browsing.

Inputs: query (required), sources, segments, max_results, +2 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_executeA
Destructive
Inspect

Execute any Apiosk API by slug through the uniform /execute contract.

Inputs: slug (required), input, query, operation, +1 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_exploreB
Read-only
Inspect

Browse Apiosk listing groups and explore one group at a time before narrowing with search.

Inputs: sort, limit, order, offset, +2 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_fetch_paidA
Destructive
Inspect

Pay an EXTERNAL x402 endpoint (one Apiosk does not host) from the connected wallet and return its data. Use this only for external results from apiosk_discover (executable_via='apiosk_fetch_paid'); for Apiosk catalog listings use apiosk_execute. REQUIRED: call apiosk_inspect_x402 on the url first, tell the user the exact price, and pass that amount as confirmed_price_usdc — the gateway refuses if the live price is higher. The gateway enforces the wallet's per-tx/daily spend limits. Base + USDC only.

Inputs: url (required), confirmed_price_usdc (required), body, query, +4 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_get_apiA
Read-only
Inspect

Fetch full listing detail and agent metadata for a specific Apiosk API slug.

Inputs: slug (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_get_startedAInspect

Set up local Apiosk access by importing a connect string or creating/selecting a wallet, then run a discovery probe and a small test call.

Inputs: test_slug, wallet_id, test_input, wallet_label, +8 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_get_wallet_activityA
Read-onlyIdempotent
Inspect

Fetch recent transactions and activity for one managed wallet.

Inputs: wallet_id (required), page, limit. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_helpB
Read-only
Inspect

Explain what Apiosk MCP is, how to connect it, how auth and USDC/x402 payments work, and the recommended workflow for discovery, wallets, and publishing.

Inputs: topic. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_inspect_x402A
Read-onlyIdempotent
Inspect

Read an arbitrary URL's x402 payment terms (price, asset, network, payTo) WITHOUT paying. Use this on an external result's url from apiosk_discover before paying: it makes one unauthenticated request, parses the 402 offer, and returns the exact amount so you can confirm the price with the user. Read-only; never spends. apiosk_execute (for Apiosk catalog listings) does not need this.

Inputs: url (required), method. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_list_my_apisB
Read-onlyIdempotent
Inspect

List the APIs owned by the active local wallet or APIOSK_PRIVATE_KEY.

Inputs: wallet_id. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_list_wallet_api_keysA
Read-onlyIdempotent
Inspect

List API keys / connect tokens for a managed wallet.

Inputs: wallet_id (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_list_walletsA
Read-onlyIdempotent
Inspect

List the signed-in user's managed Apiosk wallets. Requires an Apiosk dashboard session from local env auth or hosted MCP authorization.

Inputs: no named parameters. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_payment_guideA
Read-only
Inspect

Explain how to pay through the Apiosk gateway. Returns a buyer guide (how an agent settles a paid API call over USDC/x402, tailored to the current auth) and a provider guide (how to publish an API and get paid). Pass slug to scope buyer guidance to one listing, or role to pick a side.

Inputs: role, slug. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_publish_apiAInspect

Publish a new API on Apiosk using the active local wallet or APIOSK_PRIVATE_KEY. No dashboard required.

Inputs: name (required), slug (required), price_usd (required), description (required), +5 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_show_wallet_fundingA
Read-onlyIdempotent
Inspect

Show the buyer's Apiosk wallet address with a scannable QR code so they can fund it manually by sending USDC on Base mainnet from another wallet or exchange. Defaults to the user's first managed wallet when wallet_id is omitted. Always reminds the buyer that only Base mainnet USDC is accepted.

Inputs: wallet_id. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_sign_inA
Idempotent
Inspect

Sign into an existing Apiosk dashboard account and save the session token locally for credits and managed-wallet tools.

Inputs: email (required), password (required), save_session. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_update_apiC
Idempotent
Inspect

Update a published Apiosk API with signed wallet auth.

Inputs: slug (required), active, price_usd, wallet_id, +3 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_update_walletC
Idempotent
Inspect

Update wallet label, status, display metadata, or spending limits.

Inputs: wallet_id (required), icon, color, label, +3 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_update_wallet_api_keyA
Idempotent
Inspect

Rename, revoke, or extend an existing managed wallet API key.

Inputs: key_id (required), wallet_id (required), name, revoke, +1 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_createAInspect

Create or import a local wallet for autonomous Apiosk payments and publishing. The active wallet is mirrored to ~/.apiosk/wallet.json and ~/.apiosk/wallet.txt for legacy compatibility.

Inputs: label (required), mode, secret, save_to, +5 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_deleteB
DestructiveIdempotent
Inspect

Delete a local wallet from the MCP keystore.

Inputs: wallet_id (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_listA
Read-onlyIdempotent
Inspect

List locally stored Apiosk wallets and show which one is active for autonomous pay and publish.

Inputs: no named parameters. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_reveal_secretA
Read-onlyIdempotent
Inspect

Reveal a local wallet's private key. Only call this when the user explicitly asks to see the secret key.

Inputs: wallet_id (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_save_secretA
Idempotent
Inspect

Save a local wallet's private key to a file without going through the dashboard.

Inputs: wallet_id (required), path, format. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_selectA
Idempotent
Inspect

Select the active local wallet used by apiosk_execute, dynamic API tools, and publish tools.

Inputs: wallet_id (required), include_qr_data_url. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

apiosk_wallet_updateB
Idempotent
Inspect

Rename a local wallet or mark it active.

Inputs: wallet_id (required), label, set_active. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

generate_openapi_specGenerate a hosted OpenAPI specA
Idempotent
Inspect

Generate a hosted OpenAPI 3.1 spec for a route's API listing (all its endpoints) and return its public URL. Requires an Apiosk provider token.

Inputs: route_id (required), title, version, endpoints. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

list_x402_routesList my paid x402 routesA
Read-only
Inspect

List all x402 routes published by the authenticated provider, with paid URLs, prices, and live status. Requires an Apiosk provider token.

Inputs: status. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

publish_projectPublish a whole project's routesA
Idempotent
Inspect

Publish multiple API routes from one project in a single call. Creates one gateway listing for the project and one paid x402 route per entry. Requires an Apiosk provider token.

Inputs: routes (required), base_url (required), project_name (required), settlement_address (required), +3 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

publish_x402_routePublish a paid x402 routeA
Idempotent
Inspect

Publish an API endpoint as a paid x402 route on the Apiosk gateway. The route gets a paid URL that returns 402 Payment Required until the caller pays in USDC, then forwards to your upstream API. New routes enter Apiosk's review queue (status pending_review) and go live on approval. Requires an Apiosk provider token (Authorization: Bearer sk_live_…).

Inputs: name (required), price (required), upstream_url (required), settlement_address (required), +9 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

test_x402_routeTest a route's x402 payment behaviorA
Read-only
Inspect

Send an unpaid test request to a route's paid URL and verify x402 behavior: expects 402 Payment Required with a valid accepts[] payment offer. Requires an Apiosk provider token.

Inputs: route_id (required), test_payload. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

unpublish_x402_routeUnpublish (disable) a paid x402 routeA
DestructiveIdempotent
Inspect

Disable a paid x402 route (its gateway listing stops serving). Reversible with update_x402_route {status: 'active'}. Requires an Apiosk provider token.

Inputs: route_id (required). Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

update_x402_routeUpdate a paid x402 routeA
Idempotent
Inspect

Update a published x402 route: price, description, upstream URL, schemas, settlement address, or status. Requires an Apiosk provider token.

Inputs: route_id (required), name, path, tags, +8 more. Returns: Structured JSON result of the tool call. Mirrors the human-readable text conten…

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 42 tools

    Disambiguation2/5

    Several tool families have almost identical names: apiosk_wallet_list/apiosk_list_wallets, apiosk_wallet_create/apiosk_create_wallet, and apiosk_wallet_update/apiosk_update_wallet are only distinguishable by reading descriptions to see local vs managed. apiosk_search/discover/explore and apiosk_execute/fetch_paid also have overlapping boundaries, so an agent can easily misselect.

    Naming Consistency2/5

    Most tools use apiosk_<verb>_<noun>, but local wallet tools reverse this to apiosk_wallet_<verb>, and x402 route tools drop the apiosk_ prefix entirely (publish_x402_route, unpublish_x402_route). Even within wallet naming, apiosk_wallet_list vs apiosk_list_wallets use different word order for the same resource.

    Tool Count2/5

    42 tools is far above the 25-tool threshold for a single platform and the surface feels padded with onboarding/helper tools and parallel local/managed wallet stacks. A more focused set around discovery, payment, and publishing would be easier to navigate.

    Completeness4/5

    The set covers the core lifecycle well: discover, inspect, pay/execute, publish/update/deactivate APIs and x402 routes, and manage wallets/API keys. Minor gaps like a direct balance check and a hard delete for x402 routes are workable-around, so it earns a 4 rather than 5.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to discover x402 payment services and query on-chain-verified settlement volumes per facilitator through the Model Context Protocol.
      7
      112 npm
      18
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      AI Agent Hub is a pay-per-call API platform for AI agents Every call is billed automatically in USDC using the x402 protocol - there is no API key, no account, and no signup. Agents get instant access to data queries, file storage, and ad impressions, paying only for what they actually use. The same tools are also exposed natively over MCP, so any MCP-capable agent can discover and call them
      -