alexar76

aimarket-mcp — ecosystem MCP gateway

Community alexar76
Updated

Ecosystem MCP gateway — web fetch/search + Metis verify behind one SSRF-hardened MCP endpoint (Streamable-HTTP). Consumed by Metis and ARGUS via the aimarket-web preset.

📖 Read-only mirror. aimarket-mcp is published from the canonical AI-Factory monorepo.Pull requests are not accepted — any commit pushed here is overwritten byscripts/mirror_satellites.sh on the next sync.🐞 Found a bug or have a request? Please open an issue.

aimarket-mcp — ecosystem MCP gateway

The alexar76 AICOM / AIMarket ecosystem's shared MCP gateway: one hardened server thatgives every agent (Metis, ARGUS, …) the generic capabilities they were missing — webfetch, web search, and Metis verification — behind a single MCP endpoint.

It speaks MCP over Streamable-HTTP (JSON-RPC 2.0 POST, SSE-data:-framed responses,Mcp-Session-Id) — the exact protocol Metis's MCP client and ARGUS already talk, so noexternal SDK is required.

Tools

Tool What it does Hardening
web_fetch Fetch a URL, return its main text (readability-lite) SSRF-guarded (scheme allow-list, private-IP block, per-redirect re-validation, size cap); output sanitized + <untrusted>-wrapped
web_search Live DuckDuckGo search → top snippets output sanitized
metis_verify Run Metis's cognition + verification envelope on an input returns answer + machine-readable verify_score/verified

Why a gateway (not per-agent tools): generic capabilities are written once and everyecosystem agent gets them; the security core lives in one audited place. Ecosystem-specificcapabilities already live in their own MCP servers (aimarket-oracle-gateway,aimarket-plugins); MNEMOSYNE-search and on-chain tools are the next additions here.

Security

  • SSRF: web_fetch validates the scheme (http/https only), blocks localhost/private/reserved IPs, and re-validates on every redirect hop (vendored from Metis's auditedsecurity/ssrf.py).
  • Untrusted output: every web result is length-capped, has forged role markers strippedto a fixpoint, and is wrapped in <untrusted>…</untrusted> before it can reach a model.
  • Auth: optional bearer (AIMARKET_MCP_KEY); fail-closed in production(AIMARKET_MCP_PRODUCTION=1 requires a key).
  • Rate limit: per-key/IP token bucket (AIMARKET_MCP_RATE, default 120/min).

Run

pip install -e .
AIMARKET_MCP_KEY=sk-... AIMARKET_MCP_PRODUCTION=1 aimarket-mcp   # :9090
# or: docker compose up -d

Env: AIMARKET_MCP_PORT (9090) · AIMARKET_MCP_KEY · AIMARKET_MCP_PRODUCTION ·AIMARKET_MCP_RATE · AIMARKET_METIS_URL (for metis_verify) · AIMARKET_METIS_KEY ·AIMARKET_SEARCH_URL.

Consumers

  • Metis — enable the preset:
    enable_mcp_tools: true
    mcp_ecosystem_presets: [aimarket-web]
    
  • ARGUS — add the server to argus.config.json mcpServers (see that repo).

Test

pip install -e '.[dev]' && pytest -q

MCP Server · Populars

MCP Server · New

    frontman-ai

    frontman

    The AI agent that lives in your framework/browser

    Community frontman-ai
    Laksh-star

    Screenward

    Movie and TV discovery, watch planning, and streaming availability—for browsers and MCP clients.

    Community Laksh-star
    codescene-oss

    CodeHealth MCP Server

    The CodeScene MCP Server exposes CodeScene’s Code Health analysis as local AI-friendly tools.

    Community codescene-oss
    Fan-Pier-Labs

    OpenRecord

    Let Claude read and manage your Epic MyChart health records — labs, meds, messages, refills, imaging. Claude Desktop extension (MCP server), iOS app, and CLI. Runs on your device.

    Community Fan-Pier-Labs
    video-db

    skills

    Server-side video workflows for agents: ingest, understand, search, edit, stream.

    Community video-db