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

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.0
File Size Uploaded Provenance Actions
1102_mcp-0.1.0.tar.gz 3.8 kB Without provenance Details for 1102_mcp-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / 1102_mcp-0.1.0.tar.gz

Download URL 1102_mcp-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e3aa3d47fe66965e1d3f7829ba7d2a9769ce2fe12a58b13324caf3d15aa8bbb9
BLAKE2b-256 checksum
How to use checksums
b5b512a55e9ab1ec554d8ac9f426d1cacf28c9f6dc8f447b566bab53299fe2d7
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.0-py3-none-any.whl

Download URL 1102_mcp-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f71760ec7fa5ba9d3f8eaa73d6f49f3d8a2acf944a44d962fcdb20a376bc2f4
BLAKE2b-256 checksum
How to use checksums
c4e4bc0eeec1c45bf6d309eb2e68ee9fe22de3ee03f2ad673ac0067daddea85c
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.0

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