M
Mstream MCP Server
作者 @dmussaku
An MCP implementation for mstream
创建于 1/2/2026
更新于 about 9 hours ago
README
Repository documentation and setup instructions
mstream-mcp-server
An MCP server for https://github.com/makarski/mstream
Prerequisites
- Python 3.11 or later
- Recommended: a virtual environment (
python -m venv .venv)
Available Tools
This MCP server provides the following tools for managing mstream jobs and services:
Job Management
list_jobs- List all configured mstream jobs with their current status, metadata, and configurationcreate_job- Create a new mstream job with input/output schemas and batch configurationstop_job- Stop a running mstream job by job IDrestart_job- Restart a stopped mstream job by job ID
Service Management
list_services- List all registered mstream servicesget_service- Get details of a specific service by service IDcreate_service- Register a new service with mstream, including endpoint and schema definitionsdelete_service- Remove a service from mstream by service ID
Usage Examples
# List all jobs
list_jobs()
# Create a new job with schema
create_job({
"name": "data-processing-job",
"input_schema": {
"name": "input",
"fields": [
{"name": "data", "type": "string", "required": true}
]
},
"batch_config": {
"batch_size": 100,
"max_concurrency": 5
}
})
# Stop a job
stop_job("job-123")
# Create a service
create_service({
"name": "my-service",
"endpoint": "http://localhost:8080/process",
"schemas": [{
"name": "request",
"fields": [{"name": "input", "type": "string", "required": true}]
}]
})
Setup
- Clone the repository and create/activate your virtual environment.
python -m venv .venv . ./.venv/bin/activate - Install the package along with development dependencies:
pip install -e ".[dev]"
Development
- Format and lint the codebase:
ruff check . black . - Type checking:
mypy . - Run tests:
pytest
Running the server
The HTTP transport entrypoint is accessible via python -m mstream_mcp_server. Example:
python -m mstream_mcp_server --host 0.0.0.0 --port 8000 --api-base-url http://localhost --api-port 8700
Configuration may also be provided via environment variables:
MSTREAM_SERVER_HOST/MSTREAM_SERVER_PORT: bind address for the MCP HTTP server.MSTREAM_API_BASE_URL/MSTREAM_API_PORT: address of the upstream mstream API.MSTREAM_API_TOKEN: bearer token for API authentication.MSTREAM_API_TIMEOUT,MSTREAM_API_MAX_RETRIES,MSTREAM_API_BACKOFF_FACTOR: HTTP client tuning.MSTREAM_LOG_LEVEL: logging verbosity for the server and transport.
VS Code Configuration
Add the following to your VS Code settings.json to connect to the mstream MCP server:
{
"mcp.servers": {
"mstream": {
"type": "http",
"url": "http://localhost:<PORT>/mcp",
"transport": {
"type": "http"
}
}
}
}
快速设置
此服务器的安装指南
安装包 (如果需要)
uvx mstream-mcp-server
Cursor 配置 (mcp.json)
{
"mcpServers": {
"dmussaku-mstream-mcp-server": {
"command": "uvx",
"args": [
"mstream-mcp-server"
]
}
}
}