Built in C# on .NET 9, this server pairs SearXNG metasearch with SmartReader content extraction to give your LLM structured web results and clean article text. The web_search tool hits SearXNG with query, limit, categories, and language parameters, returning both a readable summary and full JSON metadata including suggestions and engine status. The web_page_read tool fetches one or more URLs concurrently and strips them down to article content using SmartReader. Ships with Docker Compose so you can spin up both the MCP endpoint and a local SearXNG instance together. CORS is wide open by default and there's no auth on the HTTP transport, so treat this as a localhost tool or put it behind a proxy.
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.
ModelContextProtocol.AspNetCore..mcp.json profile.web_search| Parameter | Type | Default | Notes |
|---|---|---|---|
query | string | required | Free-form search string submitted to the configured search backend (defaults to SearXNG). |
limit | integer | 10 | Maximum number of results to surface in the text summary. When set to 0 or negative, the parameter is omitted and the backend decides the result count. |
categories | string | "general" | Comma-separated categories forwarded to the backend (for SearXNG, examples include general,it,science). |
language | string | "en" | Language tag forwarded to the backend. When using the default SearXNG instance, see its language list. |
Response
structuredContent contains 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| Parameter | Type | Default | Notes |
|---|---|---|---|
urls | array | required | One or more absolute HTTP/HTTPS URLs to fetch and parse. |
Response
structuredContent is not populated; all data is returned in the text block.docker compose -f docker-compose.yaml --project-name websharp up -d (add --build on the first run or whenever the Dockerfile changes).websharp-mcp container reports Now listening on: http://0.0.0.0:8080.http://localhost:8081 (mapped from container port 8080). SearXNG is available at http://localhost:8080/ for inspection.Run the server image build without Docker Compose from the repository root:
docker build -f .\src\WebSharp.Mcp.Http\Dockerfile -t jessegador/websharp-mcp:v0.99.0-rc2 --no-cache src
Update -t to match the image registry and tag you plan to publish.
npx -y @modelcontextprotocol/inspector --config .\.mcp.json --server websharp-mcphttp://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<token> in your browser.websharp-mcp server to explore the available tools and try calls right away.Searxng__BaseUrl to http://localhost:8080 before starting the app.dotnet run --project src/WebSharp.Mcp.Http/WebSharp.Mcp.Http.csproj --urls http://localhost:8081/. In DEBUG builds you can hit /__routes to inspect the configured ASP.NET endpoints.| Environment variable | Default | Description |
|---|---|---|
ASPNETCORE_URLS | http://0.0.0.0:8080 (Docker) | Listening address(es) for the HTTP server. Override to change the exposed MCP port. |
Searxng__BaseUrl | http://searxng:8080 | Base URL of the SearXNG instance. Required if you are not running the bundled Docker service. Must be an absolute URI. |
Cors__AllowAnyOrigin | true | Permit all origins. Set to false when you want to limit callers via Cors__AllowedOrigins__0=<origin> style keys. |
Cors__AllowAnyHeader | true | Allow all request headers. |
Cors__AllowAnyMethod | true | Allow all HTTP methods. |
Cors__AllowCredentials | false | When true, credentials are accepted and you must explicitly enumerate origins. |
Cors__AllowedOrigins__{n} | (empty) | Optional origin allowlist entries when AllowAnyOrigin is false. |
Cors__AllowedHeaders__{n} | (empty) | Optional header allowlist. |
Cors__AllowedMethods__{n} | (empty) | Optional method allowlist. |
All configuration values can also be supplied via appsettings.json/appsettings.Development.json. The Docker Compose definition mounts the correct defaults for local experimentation.
Searxng__BaseUrl at your hosted SearXNG deployment (for example https://searxng.example.com).searxng/settings.yml to tune activated engines, safe search, or rate limits before publishing to the MCP registry.websharp-mcpstreamable-http/.mcp.json for a ready-to-use inspector profile.This project is available under the MIT license (see LICENSE).
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp