国防科技大学图书馆 MCP 服务器 - 提供学术资源检索功能
Project description
library-nudt-mcp
国防科技大学图书馆 MCP 服务器 - 提供学术资源检索功能
功能特性
- 🔍 专业的学术资源检索
- 📚 支持多种文献类型(图书、期刊、专利、标准等)
- 🎯 精确的检索表达式验证
- 🔐 安全的 Cookie 管理
- 🚀 基于 FastMCP 框架
安装
pip install library-nudt-mcp
快速开始
1. 作为 MCP 服务器使用
在 VS Code 的 MCP 配置中添加:
{
"servers": {
"libnudt": {
"command": "uv",
"args": [
"run",
"--with",
"library-nudt-mcp",
"library-nudt-mcp"
]
}
}
}
2. 作为 Python 库使用
from library_nudt_mcp import nudt_search, nudt_get_help
# 获取帮助信息
help_info = nudt_get_help()
print(help_info)
# 执行检索
result = nudt_search(expression="A='张三'", page=1, size=20)
print(result)
检索表达式语法
字段代码
T- 标题A- 作者K- 关键词S- 摘要O- 作者单位Y- 年份
逻辑运算符
AND- 与(并且)OR- 或(或者)NOT- 非(不包含)
示例
# 简单检索
nudt_search("A='张三'")
# 多条件检索
nudt_search("A='张三' AND K='水资源'")
# 年份范围
nudt_search("A='张三' AND 2000<Y<2020")
# 复杂检索
nudt_search("JN(A=杨振宁|周培源 AND O=清华大学)")
开发
# 克隆仓库
git clone https://github.com/yourusername/library-nudt-mcp.git
cd library-nudt-mcp
# 安装开发依赖
pip install -e ".[dev]"
# 运行测试
pytest
# 代码格式化
black library_nudt_mcp
发布到 PyPI
# 安装构建工具
pip install build twine
# 构建分发包
python -m build
# 上传到 PyPI
twine upload dist/*
许可证
MIT License
作者
Your Name your.email@example.com
贡献
欢迎提交 Issue 和 Pull Request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
library_nudt_mcp-1.2.0.tar.gz
(22.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file library_nudt_mcp-1.2.0.tar.gz.
File metadata
- Download URL: library_nudt_mcp-1.2.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a2fd39c3450bfad0ba09c01959361319f2e16abc8bb5683858c9e82b001c22c
|
|
| MD5 |
639894ff3ef61782a2632ab01246fad0
|
|
| BLAKE2b-256 |
d5329115f44b8adebb81a38fde2aca1758eb87b236fdf2aa4865f5c7fd09f1aa
|
File details
Details for the file library_nudt_mcp-1.2.0-py3-none-any.whl.
File metadata
- Download URL: library_nudt_mcp-1.2.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb8f1d379a68c53a10666f802bea599f9cad48c71269a0f97920b80cde6732ef
|
|
| MD5 |
634b229139a89c27884ef6b8808db252
|
|
| BLAKE2b-256 |
34f1593292341c7e3284b8330b8ee284864358597cc3fdd3b81c6b2cdf0131c5
|