{"$schema":"https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json","name":"io.github.barneywohl/bay-run","title":"Bay Run","description":"Parse PDFs and common documents into RAG-ready text, then discover, prove, and instantly serve small open specialist models. Search a 147K-model catalog for the right embedding/reranker/classifier/extractor for a narrow task, bake candidates off on YOUR labeled data, then serve the winner via an OpenAI-compatible endpoint. Cheaper per-call than a frontier API for high-volume specialist jobs.","version":"1.7.2","websiteUrl":"https://huggingbay.xyz","serverInfo":{"name":"bay-run","version":"1.7.2"},"remotes":[{"type":"streamable-http","url":"https://run.huggingbay.xyz/mcp/","authentication":{"type":"bearer","tokenMintUrl":"https://run.huggingbay.xyz/oauth/token","description":"OAuth 2.1 bearer authentication. Autonomous clients POST {\"grant_type\":\"client_credentials\"} to https://run.huggingbay.xyz/oauth/token with no secret for free demo access. Paid Stripe balances require one-time client_secret_post registration at /oauth/register so the same machine client can remint its durable billing identity. A 401 carries RFC 9728 protected-resource discovery links."}}],"tools":[{"name":"try_bay_run","title":"Start here: Try Bay Run","description":"Zero-credential fixed activation proof: no arguments, no model work, always evaluates 6 * 7 and returns 42 plus OAuth/MCP/A2A next steps.","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"_meta":{"io.github.barneywohl/first-call":{"schema":"bay-run.first-call.v1","kind":"activation_proof","authRequired":false,"transport":{"url":"https://run.huggingbay.xyz/mcp/","contentType":"application/json","accept":"application/json, text/event-stream"},"request":{"jsonrpc":"2.0","id":"bay-run-first-call","method":"tools/call","params":{"name":"try_bay_run","arguments":{}}},"success":{"isError":false,"structuredContent":{"schema":"bay-run.activation-trial.v1","ok":true,"proof":{"result":42}}},"usageCredit":false}}},{"name":"find_specialist_for_task","description":"ONE call: discover -> eval -> serve pointer. Searches a 147K-model catalog, bakes the top candidates off on YOUR labeled examples, and returns the WINNER model id + scorecard + a ready-to-call serving block. Default entry point."},{"name":"discover_models","description":"Search a 147K-model catalog for candidate small open specialist models for a narrow task (embedding|llm|vision|audio|tool|agent|any), ranked mirrored-first. Candidates, NOT proven winners — pass them to eval_models."},{"name":"eval_models","description":"Prove which candidate wins on YOUR data — a head-to-head bake-off, not a public leaderboard (MTEB rank does not predict your-domain fit). Returns the single winner model id. task = embedding|rerank|extraction|generation."},{"name":"embed","description":"Turn text into embedding vectors with ANY open embedding / sentence-transformers id, served instantly on demand (OpenAI /v1/embeddings-compatible). Drops into any RAG / semantic-search pipeline; cheaper per-call than a frontier API at volume."},{"name":"rerank","description":"Reorder candidate documents by true relevance to a query using an open cross-encoder/reranker, served on demand (Cohere/Jina-rerank-shaped). The standard move to sharpen RAG/search precision after a noisy vector top-k."},{"name":"extract","description":"Turn messy HTML/text (e.g. a scraper/Firecrawl dump) into schema-guided STRUCTURED JSON using a small CPU-served generative specialist. BEST-EFFORT: returns {data, json_valid, raw} — always CHECK `json_valid` before trusting `data`. Deterministic (greedy)."},{"name":"route","description":"RUNTIME auto-router: infer the task family and use its curated warm small specialist, retaining the catalog candidate for evaluation. Zero-example and latency-first — unlike find_specialist_for_task (which PROVES a winner on labeled data). Optionally serves in the same call. HEURISTIC: returns the pick + why; prove it with find_specialist_for_task."},{"name":"classify","description":"Classify text with a small CPU-served specialist — the guardrail / safety / moderation / sentiment / intent / NLI layer agents need. FIXED-LABEL (any HF sequence-classification id, e.g. prompt-injection or toxicity) OR ZERO-SHOT (pass candidate_labels + an NLI model like facebook/bart-large-mnli, or model='auto'). Returns {labels:[{label,score}]}."},{"name":"request_specialist","description":"Serve-or-capture: if a specialist for your task EXISTS, chains discover -> (eval if you pass examples) -> a ready-to-call serve pointer; if NONE exists yet, RECORDS your demand as a pull signal and returns {status:'recorded'}. Never a dead end — your safe default entry point when unsure Bay Run already covers the task."},{"name":"memory_context","description":"FAST one-call durable working context: load with no args, or atomically update/delete and receive a refreshed, byte-budgeted snapshot in the same round trip. Defaults to namespace='default'; follows a refreshable OAuth agent identity across harnesses."},{"name":"speed_test","description":"Run a fixed, bounded benchmark through the warm embedding, reranking, and classification specialists. Returns per-stage model/latency/cold-load plus total server wall time; no caller-controlled workload. Network/TLS excluded."},{"name":"remember","description":"DURABLE cross-call agent MEMORY: upsert a small (namespace, key) -> JSON value scoped to YOUR bearer-token principal (no other caller can read it), optional TTL. Cloud SQL-backed so it survives restarts/scale — the context agents keep losing between calls."},{"name":"recall","description":"Read back durable agent memory: one key, or a bounded cursor page when key is omitted. Scoped to your principal, with stable entry receipts and database-clock TTL enforcement."},{"name":"search_memory","description":"Search keys and JSON values in YOUR durable memory using literal case-insensitive text. Principal-isolated, newest-first, row+byte bounded, with a signed next_cursor."},{"name":"export_memory","description":"Export a versioned, bounded JSON page of YOUR live memory across one or all namespaces. Every item includes a stable entry receipt and content digest; cursor pagination supported."},{"name":"set_memory_ttl","description":"Set, refresh, or clear TTL on one live memory entry without replacing its value or stable entry receipt. Expired entries are not resurrected."},{"name":"forget","description":"Delete durable agent memory: one key, or the whole namespace when key is omitted. Scoped to your principal so it can never touch another agent's memory."},{"name":"calculate","description":"Exact, instant arithmetic/math evaluation (no code exec — a hardened whitelist parser, not eval). + - * / // % **, parentheses, sqrt/log/sin/exp/floor/factorial, pi/e. The calculator agents need because LLMs botch multi-step arithmetic. Sub-millisecond."},{"name":"validate_json","description":"Validate a JSON string/object, optionally against a JSON Schema (Draft 2020-12); returns {valid, errors[]}. The layer for checking tool args / LLM-generated JSON before acting. No model, deterministic, sub-millisecond."},{"name":"resolve_link","description":"Check whether a URL is alive; if it's dead AND names a model Hugging Bay has MIRRORED, return the mirrored copy's serve pointer — a fallback UNIQUE to Bay Run. Repairs dead Hugging Face model links. SSRF-safe (http(s) only, no internal targets)."},{"name":"verify_provenance","description":"Authenticate a signed Bay Run result receipt and optionally match its output, source artifacts, document chunks, and citations. Bounded and side-effect-free; never echoes evidence or exposes prompts, private memory, credentials, URLs, or paths."},{"name":"parse_pdf","description":"FAST native PDFium text extraction with no model load. Give it a public PDF URL or small base64 PDF; get page-aligned text plus rag_documents ready for RAG. Strict SSRF, byte, page, character, timeout, and concurrency bounds; scanned PDFs are flagged needs_ocr instead of silently returning empty text. Local files up to the PDF byte cap can use the discovered raw-binary upload REST twin."},{"name":"parse_document","description":"FAST deterministic DOCX/HTML/Markdown/CSV/TSV ingestion with no model load. MIME/extension/byte/archive/XML/markup/row/time/concurrency guarded; returns normalized text, stable SHA-256/chunk metadata, and rag_documents guaranteed to fit the existing RAG limits. Inline UTF-8 or base64; DOCX uses base64."},{"name":"summarize","description":"EXTRACTIVE summarization, FAST — pull the most central (and optionally query-relevant) sentences verbatim from a document, in original order. No generative model, no hallucination. Embed-by-sentence + centrality + MMR. Condense scraped pages / long tool outputs / transcripts before feeding an LLM (cuts tokens). Sub-second."},{"name":"rag_search","description":"Turnkey RETRIEVE for RAG, FAST — hand it a query + your documents (or one long string to auto-chunk) and get back the most relevant passages, ranked, with scores + indices. Warm embedder cosine top-N, then a warm cross-encoder rerank. Retrieval only by default (your LLM answers); answer=true opts into the slow generative lane. Sub-second for dozens of docs."},{"name":"submit_job","description":"Submit a durable asynchronous batch of up to the advertised maxItems. Exact idempotency while retained, principal/global job+item quotas, byte/retention caps, and a free-operation allowlist; paid chat and shared demo/open principals are unsupported."},{"name":"get_job","description":"Read principal-scoped queued/running/completed/failed/cancelled status and bounded item progress without returning stored inputs or results."},{"name":"cancel_job","description":"Atomically cancel a job only while queued. Once claimed/running it cannot be interrupted; repeated cancellation of a cancelled job is idempotent."},{"name":"get_job_result","description":"Retrieve a terminal batch result with per-item succeeded/failed outcomes and machine-readable errors, bounded by result bytes and retention TTL."}],"capabilities":{"tools":{"listChanged":false}},"_meta":{"io.github.barneywohl/first-call":{"schema":"bay-run.first-call.v1","kind":"activation_proof","authRequired":false,"transport":{"url":"https://run.huggingbay.xyz/mcp/","contentType":"application/json","accept":"application/json, text/event-stream"},"request":{"jsonrpc":"2.0","id":"bay-run-first-call","method":"tools/call","params":{"name":"try_bay_run","arguments":{}}},"success":{"isError":false,"structuredContent":{"schema":"bay-run.activation-trial.v1","ok":true,"proof":{"result":42}}},"usageCredit":false},"openai_compatible_base_url":"https://run.huggingbay.xyz/v1","discovery":{"service_root":"https://run.huggingbay.xyz/","openapi":"https://run.huggingbay.xyz/openapi.json","robots":"https://run.huggingbay.xyz/robots.txt","sitemap":"https://run.huggingbay.xyz/sitemap.xml","security":"https://run.huggingbay.xyz/.well-known/security.txt","mcp_endpoint":"https://run.huggingbay.xyz/mcp/","try":"https://run.huggingbay.xyz/v1/try","a2a":"https://run.huggingbay.xyz/a2a","llms_txt":"https://run.huggingbay.xyz/llms.txt","llms_full_txt":"https://run.huggingbay.xyz/llms-full.txt","agent_card":"https://run.huggingbay.xyz/.well-known/agent-card.json","oauth_protected_resource":"https://run.huggingbay.xyz/.well-known/oauth-protected-resource","oauth_authorization_server":"https://run.huggingbay.xyz/.well-known/oauth-authorization-server","oauth_register":"https://run.huggingbay.xyz/oauth/register","oauth_token":"https://run.huggingbay.xyz/oauth/token","pdf_upload":"https://run.huggingbay.xyz/v1/pdf/extract/upload","x402":"https://run.huggingbay.xyz/.well-known/x402","x402_buyer_recipes":"https://run.huggingbay.xyz/.well-known/x402/recipes","pricing":"https://run.huggingbay.xyz/.well-known/pricing","stripe_checkout":"https://run.huggingbay.xyz/v1/billing/stripe/checkout-session","credit_balance":"https://run.huggingbay.xyz/v1/billing/balance","credit_usage":"https://run.huggingbay.xyz/v1/billing/usage","credit_chat":"https://run.huggingbay.xyz/v1/credits/chat/completions","performance":"https://run.huggingbay.xyz/.well-known/performance.json","jobs":"https://run.huggingbay.xyz/v1/jobs","provenance_verify":"https://run.huggingbay.xyz/v1/provenance/verify"},"auth_note":"MCP JSON-RPC methods other than tools/call are UNAUTHENTICATED; tools/call needs a bearer token, except the fixed no-argument try_bay_run activation proof. Autonomous clients can use zero-secret OAuth client_credentials for the free demo. Paid Stripe balances use a client_secret_post machine registration so identity survives token loss. RFC 9728 and RFC 8414 discovery are linked above. Payment discovery advertises x402 direct pay-per-call plus Stripe prepaid credits for private OAuth principals.","sibling_mcp":{"name":"io.github.barneywohl/hugging-bay","role":"catalog recommend/verify (distinct from Bay Run's prove-on-your-data + serve)"},"note":"Bay Run remote MCP is LIVE at the remotes[0].url above."}}