Skip to main content

搜韵诗词 MCP

基于搜韵网开放接口的 FastMCP 服务,通过 stdio 向 MCP 客户端提供诗词检索、韵典查询和歌词素材汇总工具。

环境准备

  • Python 3.13 或更高版本
  • uv
  • 运行时可访问 api.sou-yun.cn

在项目目录安装依赖:

uv sync

启动

MCP 服务使用 stdio,由 MCP 客户端按需启动并管理进程:

uv run python .\souyun_mcp.py

也可以直接使用项目虚拟环境:

.\.venv\Scripts\python.exe .\souyun_mcp.py

MCP 客户端配置

在客户端的 MCP 配置中添加一个 stdio server。将示例中的目录替换为本机项目的绝对路径:

{
  "mcpServers": {
    "souyun-poem": {
      "command": "D:\\path\\to\\1102-mcp\\.venv\\Scripts\\python.exe",
      "args": [
        "D:\\path\\to\\1102-mcp\\souyun_mcp.py"
      ]
    }
  }
}

可用工具

  • search_poems: 按关键词检索诗词。scope 支持 All、Author、Title、Sentence 或数字 0 到 3;也可按 dynasty、type_、rhyme 和 pageno 筛选,jsontype 控制 JSON 返回格式。
  • get_poem: 按 poem_id 查询单首诗词详情。
  • rhyme_dictionary: 按 char 查询韵典;qtype 为 0 查全部、1 查韵目、2 查词末典故、3 查词首、4 查词末、5 查句末诗例。可通过 page_no 翻页。
  • couplet_words: 查询与 word 对仗的词汇。
  • rhyme_category: 不传 rhyme 时查询平水韵总目;传入韵部时查询该韵包含的字。
  • collect_lyrics_material: 按 theme 汇总候选诗词、诗句和韵部建议。可设置 top_n、dynasty、type_;传入 rhyme_char 时还会返回相关对仗词和典故。

Metadata

Release files for 1102-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 1102-mcp 0.1.1
File Size Uploaded Provenance Actions
1102_mcp-0.1.1.tar.gz 3.9 kB Without provenance Details for 1102_mcp-0.1.1.tar.gz

Release files / 1102_mcp-0.1.1.tar.gz

Download URL 1102_mcp-0.1.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
871bd6d647f98e3c24414779719d37c357d8b634a7e4cdab081971ccf4f71225
BLAKE2b-256 checksum
How to use checksums
9d040307b01d5907d088ff7c43d87e976b5a18cef29724bc2a46f2253f7eb096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for 1102-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page