MCP语料库模板(建筑涂料演示)
此存储库是 入门套件 用于托管与模型上下文协议兼容的公共 建筑涂料文章集 GitHub页面.
运作原理
- 跑
python build_corpus.py\
→ 创造 mcp-corpus/ 包含抓取的文章文本、块和元数据。
- 承诺与推动 一切为了
gh-pages分支(或让CI来做)。\
GitHub将提供 _site → https://.github.io//mcp-corpus/….
- 然后,任何MCP客户端都可以查询:
GET https://.github.io//mcp-corpus/manifest.json要发现文档路径,请拉取 chunks.jsonl,并构建自己的嵌入。
本地设置
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt # or pip install -r
python build_corpus.py需求 *(把这些放在你的requirements.txt中)*:
beautifulsoup4
sentence_splitter
requests
tqdm
pyyamlGitHub页面部署
现成的GitHub Actions工作流包含在 .github/workflows/deploy.yml. 每一次推 main,它将:
- 跑
build_corpus.py - 提交生成的
mcp-corpus/到gh-pages分支 - 通过GitHub页面发布。
运行完成后,您的语料库将上线:
https://.github.io//mcp-corpus/manifest.json提示模板
看 prompt_templates/general_prompt_template.md 例如系统 提示,通过MCP检索相关块,将其注入ChatGPT,以及 引用来源。
______________________________________________________________________
*模型上下文协议文档:* https://modelcontextprotocol.io/introduction
