MCP server SDK for Oomol Cloud Task API v3. This package now aligns with oomol-cloud-task-sdk: it re-exports the full Cloud Task TypeScript SDK surface and adds MCP server support on top.
English | 简体中文
- Full MCP server support based on
@modelcontextprotocol/sdk - Re-exports the full
oomol-cloud-task-sdkAPI, types, and errors - Uses the same serverless task model as the Cloud Task TS SDK
- Provides MCP tools for task creation, execution, querying, queue control, and upload
- Keeps backward-compatible aliases for
create_block_taskandexecute_block_task
npm install oomol-cloud-mcp-sdkexport OOMOL_API_KEY="your-api-key"
oomol-mcp-serverIf you want MCP task tools to default to a package, also set:
export OOMOL_PACKAGE_NAME="@oomol/your-package"
export OOMOL_PACKAGE_VERSION="1.0.0"{
"mcpServers": {
"oomol-cloud": {
"command": "npx",
"args": ["-y", "oomol-cloud-mcp-sdk"],
"env": {
"OOMOL_API_KEY": "your-api-key-here",
"OOMOL_PACKAGE_NAME": "@oomol/your-package",
"OOMOL_PACKAGE_VERSION": "1.0.0"
}
}
}
}import { OomolTaskClient } from "oomol-cloud-mcp-sdk";
const client = new OomolTaskClient({
apiKey: process.env.OOMOL_API_KEY,
});
const { taskID, result } = await client.createAndWait({
packageName: "@oomol/my-package",
packageVersion: "1.0.0",
blockName: "main",
inputValues: { text: "hello" },
});import { OomolMcpServer } from "oomol-cloud-mcp-sdk";
const server = new OomolMcpServer({
apiKey: process.env.OOMOL_API_KEY,
packageName: process.env.OOMOL_PACKAGE_NAME,
packageVersion: process.env.OOMOL_PACKAGE_VERSION,
});
await server.run();server.taskClient exposes the underlying OomolTaskClient instance.
Core tools aligned with the Cloud Task TS SDK:
create_taskexecute_tasklist_tasksget_latest_tasksget_taskget_task_resultawait_resultget_dashboardset_tasks_pausepause_user_queueresume_user_queueupload_file
Backward-compatible aliases:
create_block_task->create_taskexecute_block_task->execute_task
Uses the same request shape as OomolTaskClient.createTask(), with optional packageName and packageVersion defaults from server config.
{
"name": "create_task",
"arguments": {
"blockName": "main",
"inputValues": {
"text": "hello"
}
}
}Uses the same task payload as create_task, plus polling controls:
{
"name": "execute_task",
"arguments": {
"blockName": "main",
"inputValues": {
"text": "hello"
},
"intervalMs": 2000,
"timeoutMs": 300000
}
}list_tasksaccepts the same filters aslistTasks(query?)get_latest_tasksacceptsworkloadIDs: string[] | stringawait_resultacceptstaskID,intervalMs, andtimeoutMsset_tasks_pauseaccepts{ "paused": true | false }
Accepts a base64-encoded file payload:
{
"name": "upload_file",
"arguments": {
"fileName": "example.txt",
"fileData": "SGVsbG8gd29ybGQ=",
"mimeType": "text/plain"
}
}This package exports:
OomolMcpServerServerOptionsToolResponse- Everything from
oomol-cloud-task-sdk
That includes OomolTaskClient, all Cloud Task types, BackoffStrategy, and error classes such as ApiError, TaskFailedError, TimeoutError, and UploadError.
| Variable | Description | Required |
|---|---|---|
OOMOL_API_KEY |
Oomol Cloud API key, typically required for MCP server usage in Node.js | Usually |
OOMOL_BASE_URL |
Cloud Task API base URL | No |
OOMOL_PACKAGE_NAME |
Default package name for MCP task tools | No |
OOMOL_PACKAGE_VERSION |
Default package version for MCP task tools | No |
MCP_SERVER_NAME |
MCP server name | No |
MCP_SERVER_VERSION |
MCP server version | No |
ServerOptions extends ClientOptions from oomol-cloud-task-sdk and adds:
interface ServerOptions extends ClientOptions {
name?: string;
version?: string;
packageName?: string;
packageVersion?: string;
maxPollIntervalMs?: number;
}npm install
npm run buildMIT