Skip to main content

ctext.org 古典文献检索与研究整理 MCP 工具 - 面向数字人文研究的中国哲学书电子化计划公开文献检索、关键词定位、文本获取与结果导出

Project description

mcp-ctext

ctext.org 古典文献检索与研究整理 MCP 工具 — 面向数字人文研究的中国哲学书电子化计划(ctext.org)公开文献检索、关键词定位、文本获取与结果导出。

功能概述

本 MCP Server 提供 6 个标准化工具,服务于古典文献学、古典文学和数字人文研究:

工具 功能
search_work 文献查询 — 检索 ctext.org 中的相关文献条目
get_work_metadata 获取文献元数据与章节目录结构
search_keyword_in_work 文献内关键词全文检索(精确/正则/模糊)
get_chapter_text 获取指定章节的公开文本内容
export_results 检索结果多格式导出(JSON/CSV/TXT/Markdown)
get_work_full_text 获取一部文献的全部公开文本内容

安装

需要 Python ≥ 3.10。

pip install dhcckb-mcp-ctext

配置 Claude Desktop

在 Claude Desktop 配置文件中添加:

{
  "mcpServers": {
    "mcp-ctext": {
      "command": "uvx",
      "args": ["dhcckb-mcp-ctext"]
    }
  }
}

核心设计原则

  1. 合法合规:仅访问 ctext.org 公开页面和文本;请求间隔 ≥ 2 秒
  2. 研究友好:输出含书名、篇章、章节、URL 等完整引用信息
  3. 可复核:所有结果保留来源链接
  4. 可导出:支持 JSON/CSV/TXT/Markdown 四种格式
  5. 容错设计:无 OCR 文本或仅有扫描件时返回提示而非中断

环境变量

变量 默认值 说明
CTEXT_EXPORT_DIR 当前工作目录 导出文件默认目录
CTEXT_FULL_TEXT_INTERVAL 3.0 全量获取时的章节间请求间隔(秒)

许可

MIT License

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

dhcckb_mcp_ctext-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

File details

Details for the file dhcckb_mcp_ctext-0.1.0.tar.gz.

File metadata

  • Download URL: dhcckb_mcp_ctext-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Bun/1.3.13

File hashes

Hashes for dhcckb_mcp_ctext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 759b967d81b6bf619505b0bf151df297cdcfb6843d8e7830808f12af354fb659
MD5 1e09d5d843c6d5bb9fcf545da7db067f
BLAKE2b-256 689ee2f3132840fb44254a43f78e7cedf7a8167cc319474820b1bc942867d6de

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