
Websharp
io.github.jgador由 GitHub 账号 jgador 发布vv0.99.0-rc2更新于 Oct 24, 2026
Search the web and extract article text for LLMs.
概览
一个本地 MCP 服务器,让助手通过 SearXNG 实例进行网页搜索,并从网页中提取可读的文章正文。
- 可以做什么
- 通过 SearXNG 元搜索后端搜索网页,支持结果数量、分类和语言筛选,返回文本摘要以及结构化结果元数据和相关建议。抓取并解析一个或多个网页 URL,提取可读正文,包含标题、摘要、识别语言和逐页错误信息。
- 适用场景
- 适合助手需要最新网页结果或干净文章正文来做依据支撑、事实核查和研究的场景,前提是你愿意同时运行一个 SearXNG 实例。
- 运行要求
- 以本地 Docker 容器运行(推荐 Docker Compose),或用 .NET 9 SDK 从源码运行。需要可访问的 SearXNG 端点;不使用自带 Docker 服务时,通过环境变量 Searxng__BaseUrl 指定。MCP 端点默认监听 8081 端口,可用 ASPNETCORE_URLS 更改。
安装
在 SourceWeft 中
- 打开 控制台中的 Websharp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
WebSharp MCP HTTP Server
WebSharp is a Model Context Protocol (MCP) server written in C# (.NET 9) that exposes web search and readable page extraction tools over the streamable HTTP transport. It pairs a SearXNG metasearch instance with the SmartReader content extraction library and ships with Docker assets so you can run everything locally with one command.
Highlights
- Streamable HTTP MCP endpoint served by ASP.NET Core via
ModelContextProtocol.AspNetCore. - SearXNG-backed metasearch tool that returns both a readable summary and structured JSON metadata.
- SmartReader-powered page reader tools for single URLs or batches, ideal for grounding and fact checking workflows.
- Container-first development story with Docker Compose and an inspector-ready
.mcp.jsonprofile.
Available MCP tools
web_search
Response
- Text summary showing the top results, related suggestions, and any unresponsive engines.
structuredContentcontains a JSON object with:query: echo of the evaluated query string.items: array of result objects (title,url,content,engine/engines,category,positions,parsed_url).suggestions: related queries returned by the backend (SearXNG surfaces them when available).unresponsive_engines: list of engines that timed out or failed, with optional messages.error: present when the search could not be completed.
web_page_read
Response
- When a single URL is provided, returns the article title, excerpt, a preview of the readable text (~800 characters), and footer metadata (source URL, detected language).
- When multiple URLs are provided, the summary includes overall success/failure counts, per-page details (title, URL, full text, language), and error messages for any failures. Requests run concurrently and honor the MCP cancellation token.
structuredContentis not populated; all data is returned in the text block.
Run everything with Docker Compose
- Install Docker Desktop (or another OCI-compatible runtime) and ensure it is running.
- From the repository root, start both the SearXNG dependency and the MCP server:
docker compose -f docker-compose.yaml --project-name websharp up -d(add--buildon the first run or whenever the Dockerfile changes). - Wait until the
websharp-mcpcontainer reportsNow listening on: http://0.0.0.0:8080. - The MCP server is now reachable at
http://localhost:8081(mapped from container port 8080). SearXNG is available athttp://localhost:8080/for inspection.
Build the Docker image manually
Run the server image build without Docker Compose from the repository root:
Update -t to match the image registry and tag you plan to publish.
Connect with the MCP Inspector
- Start (or keep running) the compose stack above.
- Launch the Inspector with the included client profile:
npx -y @modelcontextprotocol/inspector --config .\.mcp.json --server websharp-mcp - Copy the printed token into the Inspector UI by opening
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<token>in your browser. - In the Inspector UI, pick the
websharp-mcpserver to explore the available tools and try calls right away.
Running from source
- Install the .NET 9 SDK.
- Ensure you have access to a SearXNG endpoint. The easiest option is to keep using the Docker Compose service and export
Searxng__BaseUrltohttp://localhost:8080before starting the app. - Launch the server:
dotnet run --project src/WebSharp.Mcp.Http/WebSharp.Mcp.Http.csproj --urls http://localhost:8081 - The MCP endpoint listens on
/. InDEBUGbuilds you can hit/__routesto inspect the configured ASP.NET endpoints.
Configuration
All configuration values can also be supplied via appsettings.json/appsettings.Development.json. The Docker Compose definition mounts the correct defaults for local experimentation.
Using a different SearXNG instance
- Point
Searxng__BaseUrlat your hosted SearXNG deployment (for examplehttps://searxng.example.com). - Make sure the endpoint you target exposes the SearXNG Search API and permits the categories/languages you request.
- Consider adjusting the bundled
searxng/settings.ymlto tune activated engines, safe search, or rate limits before publishing to the MCP registry.
Security notes
- The HTTP transport does not include authentication. Run behind a reverse proxy, tunnel, or VPN when exposing beyond localhost.
- CORS defaults to permissive settings for debugging. Tighten them before deploying to shared environments.
- The server respects MCP cancellation tokens, and page fetches enforce short HTTP timeouts to avoid hanging client sessions.
Registry metadata
- Name:
websharp-mcp - Transport:
streamable-http - Endpoint:
/ - See
.mcp.jsonfor a ready-to-use inspector profile.
License
This project is available under the MIT license (see LICENSE).
来源:README.md,提交 43ba586
工具
0版本历史
1- vv0.99.0-rc2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分