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.3

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.3
File Size Uploaded Provenance Actions
1102_mcp-0.1.3.tar.gz 4.5 kB Without provenance Details for 1102_mcp-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for 1102-mcp 0.1.3
File Interpreter ABI Platform Actions
1102_mcp-0.1.3-py3-none-any.whl Python 3 none any Details for 1102_mcp-0.1.3-py3-none-any.whl

Total release size: 8.8 kB

Release files / 1102_mcp-0.1.3.tar.gz

Download URL 1102_mcp-0.1.3.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bdffef1b9dadff398068be24a0d0c58e519ba30a48eb55456109caf3604d76c1
BLAKE2b-256 checksum
How to use checksums
257696fdf9ac24b4dfacd55698d28245a8bb46638c705c9bb0ab333f8179d3ab
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}

Release files / 1102_mcp-0.1.3-py3-none-any.whl

Download URL 1102_mcp-0.1.3-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7864d75e202238f131bc06a56fdd243ab14d855524794549e371f608efa71d53
BLAKE2b-256 checksum
How to use checksums
36be5c2164bb789c0a2fa4496cb8f9ee60be8c0916b4ecdde94fd24ea3bb71a8
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.3

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