cosplaytele-mcp
CosplayTele MCP
面向 CosplayTele 及同类图库站点的 MCP 2(Model Context Protocol,规范 2026-07-28)服务器。
需要 Python 3.14+。已发布:cosplaytele-mcp。
安装
uvx cosplaytele-mcpuvx 会临时拉取包并走 stdio 启动,适合直接接到宿主。持久安装:
uv tool install cosplaytele-mcp
# 或
pip install cosplaytele-mcp装完后命令是 cosplaytele-mcp。
接入宿主
推荐用 uvx,不必克隆仓库。若宿主找不到 uvx,把 command 换成 uvx 的绝对路径(常见是 ~/.local/bin/uvx)。
Claude Desktop / Cursor(mcpServers):
{
"mcpServers": {
"cosplaytele": {
"command": "uvx",
"args": ["cosplaytele-mcp"]
}
}
}已用 uv tool install 或 pip install 时:
{
"mcpServers": {
"cosplaytele": {
"command": "cosplaytele-mcp"
}
}
}VS Code .vscode/mcp.json:
{
"servers": {
"cosplaytele": {
"type": "stdio",
"command": "uvx",
"args": ["cosplaytele-mcp"]
}
}
}运行
stdio(给宿主用):
uvx cosplaytele-mcp
# 或已安装后
cosplaytele-mcpHTTP:
uvx cosplaytele-mcp --transport streamable-http --port 8000
# 或
cosplaytele-mcp --transport streamable-http --host 127.0.0.1 --port 8000对外绑定时必须显式列出可信的浏览器 Origin:
cosplaytele-mcp --transport streamable-http --host 0.0.0.0 --port 8000 \
--allowed-origin https://mcp.example.compopular_kind=archive 表示源站的分类或默认归档,不表示按统计热度排名。ranking_kinds
与内容 categories 分开列出。
源
id | 站点 | 热门 | 最新 | 搜索 |
| popular-posts( | WP REST | WP REST | |
|
|
|
| |
| 无 | Cosplay 等分类 REST | WP REST | |
| 无 | WP REST | WP REST | |
| 分类 |
| WP REST | |
|
|
|
| |
| 无 | WP REST | WP REST | |
| HTML | 无 |
| |
|
| 无 |
| |
|
|
|
| |
|
| 无 |
|
工具
list_sources:源目录open_url(url, offset=0, limit=20):从完整帖子 URL 按域名选源并打开图集search(query, source=all, page=1, category?, exclude_ai=true):按站点真实接口搜索。source=all时并行查全部源,结果按源交错排列browse(source, sort=popular|latest, page=1, query?, category?, period?, exclude_ai=true):排行 / 最新;只带category时按该分类列出,不走关键词搜索;带query时走该源搜索。period仅部分源的热门有效:CosplayTele 为last24hours|last7days|last30days|all,Hentai Cosplay 为day|week|month|yearbrowse_tag(source, tag, page=1, exclude_ai=true):按标签列出related(source, path, page=1, exclude_ai=true):相近套图。CosplayTele 走 Contextual Related Posts;其余源用图集第一个标签get_gallery(source, path, offset=0, limit=20):详情和图片 URL。默认只回前 20 张加image_count;limit=0只回元数据。path用列表或搜索结果里的path,也接受完整帖子 URL。可能带download_urls、has_video(有视频时只打标,不返回可播放流)
列表项在源站提供时带 tags、published_at、image_count、has_video。没有的字段为 null / 空列表,不会为凑字段再打详情。年龄语义容易被误判的制服主题词(如 JK、校服、制服、school girl、school uniform、after school)会在标题和标签中追加 (18+);路径、搜索词和源站原始标识不变。
CosplayTele 的 category 除表内 slug 外,也接受模特/作品分类 slug(如 byoru)。Hentai Cosplay 热门 category 为排行种类:like、bookmark、download、tag、keyword、images。OSOSEDKI category=cosplays 列出角色目录,再把名字交给 browse_tag。
exclude_ai 默认开启。只认明确 AI 标记,避免误伤 Ai Yamada、Ai Hoshino 这类名字:
源 | AI 标记 |
CosplayTele | 分类 |
Hentai Cosplay | 标题 |
MissKon | 标签 |
Cup2D | 分类 |
OSOSEDKI | 标题里的 |
Mitaku | 无 AI 标签页,只能靠标题/路径 |
其余新源 | 标题/路径/标签命中 |
结果里带 is_ai。get_gallery 仍会返回 AI 图集,只打标不拦截。
搜索实现:
源 | 接口 |
CosplayTele / Everia / Cup2D |
|
4KHD |
|
Hentai Cosplay |
|
MissKon | WP REST |
Kiutaku |
|
FoamGirl |
|
OSOSEDKI |
|
Mitaku |
|
资源:sources://catalog、gallery://{source}/{+path}。提示词:find_gallery。
开发
克隆仓库后用 uv:
uv sync --dev
uv run ruff check src tests
uv run ruff format --check src tests
uv run pytest
uv run mcp dev src/cosplaytele_mcp/server.py格式化:
uv run ruff format src tests
uv run ruff check --fix src tests