aimarket-oracle-gateway
MCP server exposing AIMarket's verifiable oracle capabilities (Platon VRF, Chronos VDF, LUMEN reputation) as agent-callable tools with pay-per-call.
README
<!-- aicom-mirror-notice -->
📖 Read-only mirror.
aimarket-oracle-gatewayis published from the canonical AI-Factory monorepo. Pull requests are not accepted — any commit pushed here is overwritten byscripts/mirror_satellites.shon the next sync. 🐞 Found a bug or have a request? Please open an issue.
aimarket-oracle-gateway — MCP server
<!-- aicom-readme-badges --> <p align="center"> <a href="https://github.com/alexar76/aimarket-oracle-gateway/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/alexar76/aimarket-oracle-gateway/ci.yml?branch=main&label=CI" alt="CI" /></a> <a href="https://glama.ai/mcp/servers/alexar76/aimarket-oracle-gateway"><img src="https://glama.ai/mcp/servers/alexar76/aimarket-oracle-gateway/badges/score.svg" alt="aimarket-oracle-gateway MCP server" /></a> <a href="#testing--coverage"><img src="docs/badges/coverage.svg" alt="Test coverage" /></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /></a> </p> <!-- /aicom-readme-badges -->
This repository ships a Model Context Protocol (MCP) server that exposes the AIMarket ecosystem's verifiable oracle capabilities — Platon VRF (signed randomness), Chronos VDF (verifiable delay / proof-of-elapsed-time), and LUMEN reputation — as agent-callable tools, pay-per-call over the AIMarket protocol.
Transport: stdio (mcp_stdio_server.py). Built with the official
MCP Python SDK (mcp package, FastMCP).
Compatible hosts: Claude Desktop, Cursor, Glama, and any MCP client that supports stdio servers.
| Item | Location |
|---|---|
| MCP entrypoint | mcp_stdio_server.py |
| MCP SDK dependency | requirements-mcp.txt — mcp>=1.6,<4 |
| Glama / Docker run | Dockerfile, glama.json |
A passthrough MCP server that puts the ecosystem's oracle capabilities in front of any AI agent. It is the discovery + consumption storefront for the oracle-as-a-service specs: an agent adds this server, sees the tools, and calls them — pay-per-call over the AIMarket protocol, no signup. Every result is independently verifiable (verify the signature / VDF proof rather than trusting the service).
Tools
| MCP tool | capabilityId | price | what it returns |
|---|---|---|---|
get_random |
platon.random@v1 |
~$0.004 | Ed25519-signed unbiasable randomness + proof |
get_randomness_beacon |
platon.beacon@v1 |
~$0.004 | the round's public beacon |
ask_oracle |
platon.ask@v1 |
~$0.003 | entropy-derived read-only answer |
compute_vdf |
chronos.eval@v1 |
~$0.01 | VDF y=g^(2^T) + Wesolowski proof (proof-of-elapsed-work) |
verify_vdf |
chronos.verify@v1 |
~$0.001 | {valid} for a VDF proof |
get_reputation_scores |
lumen.reputation@v1 |
~$0.005 | PageRank/EigenTrust trust scores over a graph you supply |
list_oracle_capabilities |
— | free | the tool/capability/price table |
Configure (env)
| var | meaning |
|---|---|
AIMARKET_HUB_URL |
AIMarket Hub base URL — recommended: metered + paid, the routing fee funds the ecosystem |
AIMARKET_ORACLE_URL |
direct oracle-family URL (used if no hub) — demo/free path |
AIMARKET_PAYMENT_CHANNEL |
optional pre-opened payment channel id (sent as X-Payment-Channel) |
AIMARKET_API_TOKEN |
optional bearer token (dev/prod auth) |
AIMARKET_MAX_PER_CALL_USD |
hard cap per call (default 0.10) — a call advertised above this is refused |
AIMARKET_MAX_SPEND_USD |
hard cumulative budget this process (default 5.0) — refused once exceeded |
AIMARKET_PRICE_TOLERANCE |
reject if the hub charges > advertised × (1 + this) (default 0.10) — overcharge guard |
If neither URL is set the server fails closed with a clear message (never silently fakes a result).
Payment safety (spec 03): the caps above are enforced client-side and a prompt-injected / runaway agent cannot override them — the gateway refuses to spend past them (fail-closed). It also rejects a hub that charges more than the advertised price. See docs/specs/03-mcp-payment-and-security.md.
Run
# stdio (local / Claude Desktop)
pip install -r requirements-mcp.txt && pip install --no-deps -e .
AIMARKET_HUB_URL=https://modelmarket.dev python mcp_stdio_server.py
# Docker
docker build -t aimarket-oracle-gateway .
docker run -i -e AIMARKET_HUB_URL=https://modelmarket.dev aimarket-oracle-gateway
Claude Desktop (mcpServers entry):
{ "mcpServers": { "aimarket-oracle-gateway": {
"command": "python", "args": ["mcp_stdio_server.py"],
"env": { "AIMARKET_HUB_URL": "https://modelmarket.dev" } } } }
Publish on Glama (maintainer)
This repo ships glama.json + Dockerfile at the root. Listing: glama.ai/mcp/servers/alexar76/aimarket-oracle-gateway — claim with Login with GitHub (maintainers: alexar76). Glama builds the Docker image and indexes the tools so agents discover get_random / compute_vdf / … directly.
Verifiability (the point)
- Randomness carries an Ed25519
signatureover(random_hex ‖ proof); verify against the signer key in the Hub's signed manifest. The result includes averifiablesummary (signed,has_proof). - VDF output
y=g^(2^T) mod Nis checkable in one exponentiation viaverify_vdf(and on-chain viaChronosVDF.sol).
Notes
- This is the storefront; the live oracles + escrow settlement already exist (see docs/onchain-journal.md).
- Shipped:
platon.verify/lumen.verify/lumen.score,chronos modulus_hex, the hub's signed.well-known+/pricesendpoint, and the gateway spending-cap/overcharge security core. - Roadmap (per the specs): the full channel lifecycle (auto open/sign/settle/refund, nonce-sync, receipt-signature + TLS pinning), the remote pre-signed-voucher path, and OS-keychain key storage.
- Tests:
PYTHONPATH=. pytest tests/(routing/parse logic, no network).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。