YuniKorn MCP Server
Provides tools for querying partitions, queues, applications, nodes, user usage, and scheduler health of an Apache YuniKorn scheduler instance.
Allows AI agents to observe and reason about Kubernetes batch workload resource management, queue hierarchies, and application states through the YuniKorn scheduler.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YuniKorn MCP Servershow queues in default partition"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YuniKorn MCP Server
A Model Context Protocol (MCP) server that interfaces with the Apache YuniKorn Scheduler, allowing AI agents to observe and reason about Kubernetes batch workload resource management, queue hierarchies, and application states.
Screenshots
Inspecting Yunikorn tools using MCP inspector

Querying the Yunikorn scheduler via MCP using Opencode

Features
7 MCP Tools: Query partitions, queues, applications, nodes, user usage, and scheduler health
2 MCP Resources: Static data access for partitions list and node utilization
Async HTTP: Non-blocking API calls using
httpxProper Error Mapping: YuniKorn HTTP errors mapped to standard MCP error responses
Resource Awareness: Handles YuniKorn's raw bytes and millicore values
CORS Enabled: Allows connections from any origin for browser-based MCP Inspector
Streamable HTTP: Default transport with stdio fallback for IDE integration
Installation
uv pip install -r requirements.txtIf you are using a virtual environment, make sure it is activated first:
source .venv/bin/activate
uv pip install -r requirements.txtUsage
Running the Server
The default transport is Streamable HTTP on port 8000:
Run locally
uv run python -m mainRun with Docker
docker run -p 8000:8000 -e YUNIKORN_BASE_URL="http://<REPLACE_ME>/ws/v1" docker.io/frenoid/yunikorn-mcp-server:latestCommand line options
Option | Description | Default |
| Transport protocol ( |
|
| Host to bind (HTTP transport only) |
|
| Port to listen on (HTTP transport only) |
|
| Logging level |
|
Examples:
# Streamable HTTP on custom port
uv run python -m main --transport streamable-http --host 127.0.0.1 --port 8080
# Stdio mode for Claude Code / IDE integration
uv run python -m main --transport stdioEnvironment Variables
Variable | Description | Default |
| Base URL of the YuniKorn REST API |
|
| Disable HTTPS certificate verification ( |
|
# Connect to a remote YuniKorn instance
YUNIKORN_BASE_URL=http://yunikorn.example.com:9089/ws/v1/ uv run python -m main
# Connect to an HTTPS endpoint with a self-signed certificate
YUNIKORN_BASE_URL=https://yunikorn.example.com:9089/ws/v1/ TLS_INSECURE=true uv run python -m mainConnecting with MCP Inspector
The Streamable HTTP endpoint is exposed at the /mcp path:
http://localhost:8000/mcpTesting
Run the test suite against a live YuniKorn instance:
YUNIKORN_BASE_URL=http://your-yunikorn-host:9089/ws/v1/ uv run python test_server.pyTo run a quick compliance check:
YUNIKORN_BASE_URL=http://your-yunikorn-host:9089/ws/v1/ uv run python test_updated_server.pyData Format Notes
Memory: Represented in raw bytes (64-bit signed integers).
CPU (vcore): Represented in millicores (thousandths of a core, i.e. 1000m = 1 core).
Other resources: No specific unit assigned.
Active applications: The virtual "active" state represents New, Accepted, Running, Completing, and Failing statuses.
allocationID vs uuid:
uuidis deprecated.allocationIDcontains the same base value asuuidwith a hyphen-counter suffix (e.g.,-0,-1).allocationDelay: The difference between
allocationTimeandrequestTimefor an allocation.
API Conformance
This MCP server conforms to the Apache YuniKorn Scheduler REST API (v1.8.0). Each tool maps directly to a documented endpoint.
Tool | YuniKorn Endpoint |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Resources:
Resource | YuniKorn Endpoint |
|
|
|
|
Error Mapping
YuniKorn HTTP Code | MCP Error |
|
|
|
|
|
|
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/frenoid/yunikorn-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server