mcp-my-site

io.github.pournasserian由 GitHub 账号 pournasserian 发布v0.4.0更新于 Oct 29, 2026

Search and fetch tools for one website, served from an index you build with the mcpmysite crawler.

已验证Streamable HTTP可网页运行网页搜索与抓取知识与记忆

概览

AI 生成的概览

为单个网站提供可搜索索引,让助手检索其页面并以 Markdown 获取整页内容。

可以做什么
  • 用问题或关键词搜索已索引的网站,返回匹配页面及其 URL 和摘要
  • 按 id 或 URL 获取单个页面,返回包含标题、描述、语言和最后修改日期的完整 Markdown 内容
  • 以只读方式访问网站已发布页面的快照,服务器指令由网站自身内容生成
适用场景
适合需要让回答基于某个特定网站而非通用知识的场景,例如个人站点、文档站或不超过约 1000 页的小型网站。托管实例只覆盖 pournasserian.com;其他网站需用爬虫自行构建索引。
运行要求
可连接托管端点,也可自行运行:需要 .NET 10 SDK 安装 mcpmysite 命令行工具并构建索引,或使用 Docker 镜像并挂载索引目录、设置 Index__Path。混合语义搜索还需兼容 OpenAI 的嵌入服务及 AI_API_KEY;仅关键词索引无需密钥。
安装前请注意
索引是快照,之后网站的变化不会被覆盖。混合搜索会把页面文本发送给嵌入服务提供方(默认 OpenRouter)并需要 AI_API_KEY,小型网站费用仅为几分钱的一小部分。工具本身只读,但服务器还提供公开搜索 API 和可选遥测,查询文本默认不记录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 mcp-my-site,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.pournasserian%2Fmcp-my-site/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "my-site": {
      "type": "http",
      "url": "https://ai.pournasserian.com/mcp"
    }
  }
}

README

mcp-my-site

[CI] [License: MIT] [.NET 10]

Point it at your website and ChatGPT, Claude and any other MCP client can search and read it.

A command-line indexer crawls the site and builds a hybrid keyword and vector index. A small ASP.NET Core app serves that index as an MCP server with search and fetch tools, and as a JSON search API for the site's own search box. One site per server, built for sites under 1,000 pages.

Try it now

A live instance indexes pournasserian.com:

MCP endpointhttps://ai.pournasserian.com/mcp
Search APIhttps://ai.pournasserian.com/api/search?q=mcp%20caching
API referencehttps://ai.pournasserian.com/docs
bash
claude mcp add --transport http pournasserian https://ai.pournasserian.com/mcp

Then ask Claude Code something about the site. For ChatGPT, add the endpoint as a connector; the tools follow the search and fetch contract its connectors expect.

Quick start

You need the .NET 10 SDK. Nothing else: the first index is keyword-only, so no API key is involved.

bash
dotnet tool install --global mcpmysitemcpmysite init https://example.com --keyword-only   # writes appsettings.jsonmcpmysite build                                     # crawls the site into ./indexmcpmysite search "how can I contact you"            # checks the indexdocker run --rm -p 5000:8080 -v "$PWD/index:/index:ro" -e Index__Path=/index ghcr.io/pournasserian/mcp-my-site:latest

Without Docker, clone the repository and run the server from source with Index__Path=index dotnet run --project src/McpMySite.Server from the clone, or publish it (user guide). The indexer also runs from a clone as dotnet run --project src/McpMySite.Indexer -- ..., which is how to try unreleased changes.

The server is now at http://localhost:5000: /mcp for agents, /api/search?q=contact for JSON, /healthz for the loaded index. The landing page at / shows how to connect each client and how to test the server with the MCP Inspector.

bash
claude mcp add --transport http mysite http://localhost:5000/mcp

Upgrade to hybrid search. Keyword search matches words; hybrid search also matches meaning, and is what the live instance runs. It needs an API key for an OpenAI-compatible embeddings endpoint, OpenRouter by default or another provider; the key is read from AI_API_KEY and never written to a file. A small site embeds for a fraction of a cent.

bash
export AI_API_KEY=sk-...# in appsettings.json, under Embeddings, change "Enabled": false to true, then rebuild and servemcpmysite builddocker run --rm -p 5000:8080 -v "$PWD/index:/index:ro" -e Index__Path=/index -e AI_API_KEY ghcr.io/pournasserian/mcp-my-site:latest

Windows PowerShell and cmd, Docker without .NET on the host, and other MCP clients (VS Code, Cursor, Claude Desktop) are in the user guide.

Features

  • Hybrid search. BM25 keyword search and vector search over embeddings, fused per query, with a keyword-only fallback when the embedding provider is unavailable.
  • Works without a key. A keyword-only index needs no embeddings provider at all; switch to hybrid search later with one setting and a rebuild.
  • ChatGPT and Claude ready. Streamable HTTP MCP endpoint with search and fetch tools in the shape ChatGPT connectors use, and server instructions generated from the site itself. Works with Claude Code, Claude Desktop, VS Code, Cursor and the MCP Inspector.
  • Discoverable. /mcp/server-card serves the MCP server card (SEP-2127) with the endpoint, the protocol versions and whether a key is needed, and /llms.txt lists the indexed pages for language models.
  • Listable in directories. Set Maintainers and the server serves /.well-known/mcpbundles.json and /.well-known/security.txt so a directory such as MCP Bundles can verify a maintainer before publishing (user guide).
  • Search API for your own site. GET /api/search with CORS, rate limiting, offset paging, an OpenAPI 3.1 document and an interactive reference. Drop-in snippet for a search box in the user guide.
  • Docker image. docker pull ghcr.io/pournasserian/mcp-my-site:latest; mount the index or point it at a URL.
  • Hot swap. The server polls the index source and swaps in a new build without a restart.
  • Telemetry. OpenTelemetry traces, metrics and logs to Application Insights or any OTLP collector. Query text is not logged unless you turn it on.
  • Any embeddings provider. OpenRouter by default; any OpenAI-compatible endpoint works.

Documentation

Repository

PathWhat
src/McpMySite.CoreIndex model and manifest, JSON and SQLite stores, hybrid search, embedding client
src/McpMySite.IndexerThe mcpmysite CLI: crawl, extract, chunk, embed, write
src/McpMySite.ServerASP.NET Core app: MCP endpoint, search API, index loading, telemetry
tests/McpMySite.TestsUnit and integration tests
bash
dotnet builddotnet test

Questions and ideas go to Discussions; bugs to Issues. Changes land on master through pull requests only. MIT licence.

来源:README.md,提交 f70c715

工具

2

fetch

Fetch a page

Returns the full content of one page of the website as Markdown in text, with its title, description, language and last modified date. Pass the id (or url) of a search result.

输入参数idurl

版本历史

4
  1. v0.4.0最新Oct 29, 2026
  2. v0.3.0Oct 24, 2026
  3. v0.2.2Oct 18, 2026
  4. v0.2.1Oct 17, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分