{"$schema":"https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json","name":"io.github.barneywohl/bay-run","title":"Bay Run","description":"Parse PDFs 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.3.0","websiteUrl":"https://huggingbay.xyz","serverInfo":{"name":"bay-run","version":"1.3.0"},"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 client secret or browser, then send Authorization: Bearer <token>. Persist the refresh token to retain the same private memory principal. A 401 carries RFC 9728 protected-resource discovery links."}}],"tools":[{"name":"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."},{"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 LIST a namespace when key is omitted. Scoped to your principal; expired entries are never returned. Pairs with remember/forget."},{"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":"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."},{"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."}],"capabilities":{"tools":{"listChanged":false}},"_meta":{"openai_compatible_base_url":"https://run.huggingbay.xyz/v1","discovery":{"try":"/v1/try","a2a":"/a2a","llms_txt":"/llms.txt","llms_full_txt":"/llms-full.txt","agent_card":"/.well-known/agent-card.json","oauth_protected_resource":"/.well-known/oauth-protected-resource","oauth_authorization_server":"/.well-known/oauth-authorization-server","oauth_token":"/oauth/token","x402":"/.well-known/x402","pricing":"/.well-known/pricing"},"auth_note":"MCP discovery (initialize + tools/list) is UNAUTHENTICATED; tools/call needs a bearer token, except the fixed no-argument try_bay_run activation proof. Autonomous clients can use OAuth client_credentials with no client secret or browser; persist the refresh token so private memory follows the agent across renewals. RFC 9728 and RFC 8414 discovery are linked above. The optional x402 pay-per-call rail publishes its exact live readiness at /.well-known/x402.","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."}}