Skip to main content

国防科技大学图书馆 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


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-0.7.0.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

library_nudt_mcp-0.7.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file library_nudt_mcp-0.7.0.tar.gz.

File metadata

  • Download URL: library_nudt_mcp-0.7.0.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for library_nudt_mcp-0.7.0.tar.gz
Algorithm Hash digest
SHA256 fd16ea617e453aa91efdc61ac6d88955d125da03c88d87a43a9cd560c0bbe86f
MD5 33e59dfde35d06c647349a1285e680a8
BLAKE2b-256 e52e502a505dab66fb86a9bfe3a2a15ef58b89c460465fc7d4cc4b5955961ac1

See more details on using hashes here.

File details

Details for the file library_nudt_mcp-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for library_nudt_mcp-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 baf91ce5cb52356d20a7f4b345548eb136f3af03ec3793fde38f833a575a6ed7
MD5 94cfc6f76b49d4948e14ba6de75f7b11
BLAKE2b-256 7b7c971b08f95532b5866531957f6f43bec65e724be01db82bf99f5c82f97888

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page