Pymss Studio MCP
README.md
# Pymss Studio MCP
[简体中文](README.zh-CN.md)
A local STDIO MCP adapter for **Pymss Studio**. It exposes five general-purpose tools instead of loading a separate tool definition for every audio operation. Discover catalogs in pages, fetch only the schema you need, and run audio jobs or workflows through Studio's native Python Worker.
This is an independent community adapter, not an official Pymss release. It requires an existing **Windows Pymss Studio installation**. It does not bundle Studio, model weights, Python inference runtimes, or user configuration.
## Features
| MCP tool | Purpose |
| --- | --- |
| `pymss_query` | Runtime, downloaded models, plugins, operations, nodes and native Worker commands; search, pagination and revision-based unchanged responses |
| `pymss_describe` | Fetch one audio Operation's exact schema on demand |
| `pymss_submit` | Submit an audio operation, single-model separation, workflow, or explicitly selected native command |
| `pymss_job` | Read status/results or request cancellation of a submitted job |
| `pymss_workflow` | Validate a workflow definition without running inference |
Catalog pages default to 20 items and are capped at 50. A 30-second cache can be bypassed with `refresh=true`. Large results stay in local JSONL files. This reduces schema and result volume without hiding native Worker capabilities; it does not promise a fixed token saving.
## Install
Requirements: Windows, Python 3.10+, and a working Pymss Studio runtime with the models you plan to use. The MCP host only installs the `mcp` SDK; audio dependencies remain in Studio's selected environment.
From this repository:
```powershell
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install .
.\.venv\Scripts\pymss-bridge.exe init --app-root 'C:\Apps\Pymss-Studio-0.1.4-windows-x64-cuda'
.\.venv\Scripts\pymss-bridge.exe doctor
```
Alternatively, install the wheel from [GitHub Releases](https://github.com/aztksilence111/pymss-studio-mcp/releases). The project has not been published to PyPI.
`init` writes `~/.pymss-studio-mcp/config.json` and refuses to overwrite an existing configuration. Set `PYMSS_BRIDGE_CONFIG` to use another JSON file. See [examples/config.example.json](examples/config.example.json). Set `dataRoot` to the actual Studio data directory when it is not `appRoot/data`; the app's settings supply the model and output directories. `runtimeState` can explicitly select an active-runtime pointer for a custom installation.
## Connect an MCP client
For Codex, run from the repository after installation:
```powershell
codex mcp add pymss_studio -- "$PWD\.venv\Scripts\pymss-studio-mcp.exe"
```
Any STDIO MCP client can start the absolute path to that executable. A generic client configuration is:
```json
{
"mcpServers": {
"pymss_studio": {
"command": "C:/Tools/pymss-studio-mcp/.venv/Scripts/pymss-studio-mcp.exe",
"env": {"PYMSS_BRIDGE_CONFIG": "C:/Tools/pymss-studio-mcp-settings.json"}
}
}
}
```
Restart/reload your client if needed and check its actual tool list. Server registration is different from a running chat having loaded the tools. The service uses standard input/output and does not listen on a TCP port.
## Use
1. `pymss_query(kind="doctor")`, then query downloaded models or installed operations.
2. Fetch a relevant Operation schema with `pymss_describe`.
3. Submit a request, retain the returned `jobId`, and poll `pymss_job`.
4. Read the terminal result and verify the generated files. Submission alone is not success.
See [docs/usage.md](docs/usage.md) for requests, workflow semantics and native dispatch. The same bridge is available as a CLI:
```powershell
.\.venv\Scripts\pymss-bridge.exe query operations --search timing
.\.venv\Scripts\pymss-bridge.exe validate examples\six-stem-workflow.json
.\.venv\Scripts\pymss-bridge.exe submit workflow --payload request.json
.\.venv\Scripts\pymss-bridge.exe status JOB_ID
```
## Operational boundaries
- Jobs created by this bridge are serialized. GUI jobs do not participate in that lock; avoid competing GPU jobs yourself.
- Each job receives a unique output subdirectory. Some native/plugin-specific output parameters may still specify other locations; inspect their schema before use.
- Ordinary separation/workflow requests disable missing-model downloads and set common model-hub offline flags. **Native management commands retain their native behavior** and may download, install, update, or delete data when explicitly invoked. This is not a network sandbox or authorization system.
- Direct ASR/GAME operation submissions require separately verified backends and weights and are rejected by the convenience route. Verified local configurations can use native dispatch. Plugin installation alone does not provide tool weights.
- Cancellation stops only the Worker process tree started by the job. It preserves partial output files and does not close Studio.
- A job is capped at six hours. No automatic retries. A forcibly killed runner can leave a stale lock: inspect its process identity and logs before recovery.
- Workflows execute through a separate Worker. They do not edit the GUI canvas, save into Studio's workflow library, or necessarily appear in its queue.
- Separation labels are model predictions, not proof of instrument identity or transcription accuracy. Keep original audio and compare short excerpts first.
## Validation and compatibility
Developed against Studio 0.1.4, pymss 2.4.2, Python 3.12 and PyTorch 2.7.1+cu128 on Windows. The adapter resolves the active runtime instead of importing pymss into the MCP host. Worker interfaces can change: recheck schemas after an application update.
Tests cover the standard MCP handshake, pagination/revisions, background execution, duplicate blocking, cancellation, and missing-model failures. A live local check also ran a CUDA six-stem workflow and checked the output sample rate, duration and finite samples; it did not assess separation quality on real music.
```powershell
.\.venv\Scripts\python.exe -m pip install '.[dev]'
.\.venv\Scripts\python.exe -m pytest
```
## License
This adapter is MIT licensed. [Pymss Studio](https://github.com/pymss-project/pymss-studio), its inference engine, plugins, models and media tools retain their own licenses. They are not included in this package.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues