dashscope-agent-tools
DashScope / 阿里云百炼 capabilities as MCP tools for agent hosts (Claude Code, Codex, and any MCP-capable harness). Every tool is a thin delegation to the official dashscope Python SDK — HTTP, signing, retries, and async-task polling all live in the SDK.
Status: local development, not yet published to PyPI or any marketplace.
v1 capabilities
| Capability | Tools | SDK entry |
|---|---|---|
| Embeddings | embed_text, semantic_search |
client.embeddings.create |
| Rerank | rerank_documents |
client.rerank.create |
| Image generation | generate_image, submit_image_task, get_image_task, cancel_image_task |
client.images.generate / client.images.jobs.* |
| Speech synthesis (TTS) | synthesize_speech |
client.audio.tts.http.synthesize |
| Speech recognition (ASR) | transcribe_audio |
client.audio.asr.transcribe |
| Video generation | generate_video, submit_video_task, get_video_task, cancel_video_task |
client.videos.generate / client.videos.jobs.* |
Default models: text-embedding-v4, gte-rerank-v2, wan2.2-t2i-flash,
cosyvoice-v2 (voice longxiaochun_v2), qwen-audio-3.1-asr-flash-filetrans,
wan2.2-t2v-plus.
Image URLs are valid for 24 hours; TTS audio_url and video video_url are
temporary (see expires_at) — download them to keep the media. ASR returns a
per-file transcription_url (a JSON document); fetch it for the recognized text.
Credentials
The server reads DASHSCOPE_API_KEY from its environment. Get a key at the
Bailian console (API-KEY page).
Install in Claude Code (after publish)
Two commands, then enter your API key in the install dialog (stored masked in secure storage, injected into the MCP server env):
claude plugin marketplace add <owner>/dashscope-agent-tools-python
claude plugin install dashscope@dashscope-agent-tools
The plugin (plugin/) ships Skills that tell Claude when to use each tool
(image generation, semantic search, reranking, text-to-speech, transcription,
video generation) plus the MCP server config.
Other MCP hosts
The package is a plain stdio MCP server — no Claude-specific code. Generic config (Claude Desktop, Cursor, Cline, OpenClaw, ...):
{
"mcpServers": {
"dashscope": {
"command": "uvx",
"args": ["dashscope-agent-tools"],
"env": { "DASHSCOPE_API_KEY": "sk-..." }
}
}
}
Codex (~/.codex/config.toml):
[mcp_servers.dashscope]
command = "uvx"
args = ["dashscope-agent-tools"]
Without uv, use pip install dashscope-agent-tools and set
command to dashscope-agent-tools (or python -m dashscope_agent_tools).
Development
uv venv --python 3.12 .venv
uv pip install -p .venv/bin/python -e ".[dev]"
.venv/bin/pytest tests/ -q # offline tests, mocked SDK
.venv/bin/python tests/smoke_real.py # real API smoke (needs DASHSCOPE_API_KEY)
# video render is billed and opt-in: DASHSCOPE_SMOKE_VIDEO=1 .venv/bin/python tests/smoke_real.py
.venv/bin/python tests/plugin_structure_check.py # plugin structure (no claude CLI needed)
claude plugin validate ./plugin
claude --plugin-dir ./plugin # load the plugin for one session
For local plugin runs before PyPI publish, point plugin/.mcp.json at the
repo venv binary (.venv/bin/dashscope-agent-tools) instead of uvx.
Layout
src/dashscope_agent_tools/ # tools.py (SDK delegation), server.py (MCP), errors.py
plugin/ # Claude Code plugin: manifest, skills, .mcp.json
.claude-plugin/marketplace.json
tests/ # offline mock tests + real-API smoke
Metadata
Release files for dashscope-agent-tools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dashscope_agent_tools-0.1.0.tar.gz | 239.9 kB | With provenance | Details for dashscope_agent_tools-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dashscope_agent_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dashscope_agent_tools-0.1.0-py3-none-any.whl |
Total release size: 253.1 kB
Release files / dashscope_agent_tools-0.1.0.tar.gz
| Download URL | dashscope_agent_tools-0.1.0.tar.gz |
|---|---|
| Size | 239.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a80c5040a2a204de308596c04354d961460b2f0cd9f86d1990f599e92d22066
|
|
BLAKE2b-256 checksum How to use checksums |
7e28a6db7cf9ff58e56f7e6a5294acf4c301932e93c8289c7f382e65c3f7ae10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logRelease files / dashscope_agent_tools-0.1.0-py3-none-any.whl
| Download URL | dashscope_agent_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a01cf54ef72d38ba63f223a885390e528ef509b48ab747fc5460f9efcbccf2d
|
|
BLAKE2b-256 checksum How to use checksums |
c00379ed077978d2a0a695025072b104bea47b24ca6db1ddf9ccded7cf4a258a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logSecurity for dashscope-agent-tools 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dashscope_agent_tools-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.
Transparency logA 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.