Deep Learning with Python MCP Knowledge Base
Deep Learning with Python — MCP 知识库
一个 MCP(Model Context Protocol)服务器,将《Deep Learning with Python》(François Chollet)一书变成可搜索的知识库,让 Claude 能够基于书中的内容充当深度学习/机器学习专家。
服务器通过 stdio 在本地运行。它读取 input/ 中的 PDF,并根据 PDF 自带的书签大纲,在内存中构建该书约 200 个叶节点章节(细到 3.4.3 这样的子节)的索引。书籍 PDF 需要手动放置到位。
路线图
创建 MCP MVP
连接并验证
添加错误处理
添加 MCP inspector
设置
# from the project root
pip install -r requirements.txt需要将书籍 PDF 放在 input/Deep_Learning_with_Python_Chollet.pdf
独立运行
.venv\Scripts\python.exe server.py这会阻塞运行,通过 stdio 进行 MCP 通信——它旨在由 MCP 客户端启动,而不是交互式运行。按 Ctrl+C 停止。
连接到客户端
Claude Code(在项目根目录下):
claude mcp add dl-python-expert -- "C:\Users\leowa\Projekte\mcp_deepLearning\.venv\Scripts\python.exe" "C:\Users\leowa\Projekte\mcp_deepLearning\server.py"Claude Desktop — 添加到 claude_desktop_config.json:
{
"mcpServers": {
"dl-python-expert": {
"command": "C:\\Users\\leowa\\Projekte\\mcp_deepLearning\\.venv\\Scripts\\python.exe",
"args": ["C:\\Users\\leowa\\Projekte\\mcp_deepLearning\\server.py"]
}
}
}已注册内容
工具
search_book(query, top_k=5)— 对所有书籍章节进行关键词排序搜索;返回 id、标题、面包屑、页码和摘要片段。get_section(section_id)— 按 id(例如3.4.3、6.2.2)获取某个章节的完整文本,id 由search_book或list_sections返回。只有叶节点章节可被寻址;带有子章节的标题(例如5.1)本身不可获取——请改用其子章节。list_sections(chapter=None)— 不带参数时列出各章/附录;传入其中一个确切字符串时,列出该章/附录的章节和 id。
资源
book://toc— 完整的目录,包含章节 id 和页码,无需调用工具即可浏览结构。
提示词
explain_concept(topic)— 指示 Claude 搜索书籍,为论断引用章节 id 和页码,并在相关处包含书中的 Keras 代码示例。
使用示例
连接后,可以这样向 Claude 提问:
使用深度学习知识库,结合书中的代码示例,解释 dropout 如何对抗过拟合。
Claude 会调用 search_book,通过 get_section 拉取相关章节,并引用例如 [4.4.3] Adding dropout (p. 130) 来作答。
设计说明 / 已知限制
搜索 采用简单的关键词/词项重叠评分(仅用标准库)——没有嵌入。对于先检索再解释的流程已经足够;实际推理由 Claude 完成。
章节粒度 仅到叶节点。位于父标题与其第一个子节之间的少量“章节引言”文本不归属于任何章节,实际上会被跳过。
每次服务器启动时都会从 PDF 重新构建索引(384 页约 3 秒);按设计没有持久化缓存,因此书籍内容永远不会落入可能被意外提交的文件中。
索引范围仅限于书籍的技术内容(第 1–9 章 + 附录 A/B)——前置部分和书末索引被排除在外。
文件
server.py— 入口点;创建MCPServer,注册来自tools.py的工具,通过 stdio 运行。tools.py— 工具/资源/提示词定义。knowledge_base.py— PDF 加载、基于大纲的章节索引和搜索。input/— 源 PDF(已被 gitignore)。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LeoW19/deepLearning_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server