EG

episkey-g/groksearch-rs

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

462 stars 51 forks 质量 80 趋势 28MIT

episkey-g/groksearch-rs 是从 https://github.com/episkey-g/groksearch-rs. 导入的 MCP 服务器候选

概览

episkey-g/groksearch-rs 是从 https://github.com/episkey-g/groksearch-rs. 导入的 MCP 服务器候选

概述(AI 翻译)

一个轻量级的Rust MCP服务器,支持Grok / OpenAI兼容的网页搜索,并由有序源链支持——Tavily、Exa、TinyFish、Firecrawl——用于补充源码、取源和地图。

grok-search-rs 是一个 MCP 服务器——通过 stdio 本地运行(客户端启动,你不直接运行),或者作为远程可流式 HTTP 服务,用于移动/多设备访问(参见自托管)。它暴露了一套工具(web_search、get_sources、web_fetch、web_map、doctor),并支持两个上游传输,因此你可以插入 xAI 官方 API 或任何兼容 OpenAI 的中继。


特色

  • 🔎 实时网络搜索,包含引用来源,缓存以便后续调用get_sources。选择加入include_content在一次调用中完整提取文本丰富顶级来源。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

GrokSearch-rs

A lightweight Rust MCP server for Grok / OpenAI‑compatible web search, backed by an ordered source chain — Tavily, Exa, TinyFish, Firecrawl — for supplemental sources, fetch, and map.

grok-search-rs is an MCP server — run it locally over stdio (your client launches it; you do not run it directly) or as a remote Streamable HTTP service for mobile / multi‑device access (see self-hosting). It exposes one set of tools (web_search, get_sources, web_fetch, web_map, doctor) and supports two upstream transports so you can plug into either xAI’s official API or any OpenAI‑compatible relay.


Features

  • 🔎 Live web search with cited sources, cached for follow‑up get_sources calls. Opt‑in include_content enriches the top sources with full extracted text in one call.
  • 📏 Response budgeting — web_search keeps responses inside agent context limits: only the top max_inline_sources carry inline text, a whole‑response char budget (response_max_chars, default 45k — sized to stay under the MCP client token ceiling after JSON serialization) trims tail sources with recovery notes, response_format: "concise" | "detailed" picks the payload size, and get_sources pages through cached sources with offset/limit. The session cache always keeps full content.
  • 🧩 Structured web_fetch — GitHub issues/PRs/releases, StackExchange/MathOverflow, arXiv, and Wikipedia URLs are parsed by specialist extractors into clean Markdown (title, state/labels, release notes, accepted‑answer ordering, abstracts, vote‑sorted answers). Specialist extractors need no API key. Anything else falls back to the generic source chain (Tavily → Exa → TinyFish → Firecrawl, as configured) — so with no source provider configured, ordinary URLs cannot be fetched at all, only the specialist families above. Output carries source_type and a fallback_reason when a specialist was skipped.
  • 🔀 Two transports — native xAI Responses (/v1/responses) or any OpenAI‑compatible chat‑completions gateway (/v1/chat/completions). Pick by env vars; no flag.
  • 🔐 Optional Grok OAuth mode — login/status/logout commands store a local xAI OAuth token for Responses auth, so the MCP server can run without GROK_SEARCH_API_KEY.
  • 🌐 Optional remote mode — build with --features http to serve the same tools over Streamable HTTP (multi‑tenant, bring‑your‑own‑key via request headers) for mobile / multi‑device access. See self-hosting.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →