yade-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
YADE (Yet Another Dynamic Engine) MCP server. Provides tools for browsing YADE Python API documentation and for executing DEM simulations and managing long-running tasks through a yade-mcp-bridge HTTP service running inside a YADE process.
Architecture: this MCP server and the YADE process are separate. Documentation tools query a local knowledge base and work independently. Execution tools communicate with a live YADE process through yade-mcp-bridge — an HTTP service the user starts inside YADE. When execution tools return a bridge connectivity error, the user needs to start the bridge, not retry.
Execution tool responses may include a _context field — runtime state from the YADE process (e.g. user console history, simulation status). Use this to stay aware of what is happening in YADE beyond this session.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| yade_browse_apiA | Browse YADE's Python API as a YADE-native class tree. The tree is rooted in YADE's real inheritance hierarchy: paths mirror the class's mro up to its category root. No shortcuts — always drill through parents. |
| yade_query_apiA | Search YADE API documentation by keywords (like grep). Returns matching class/function names with descriptions ranked by relevance. Use yade_browse_api for full documentation of a specific class. When to use:
Related tools:
|
| yade_execute_taskA | Submit a Python script for asynchronous execution in YADE. Returns a task_id immediately; the script is queued and runs in the background. Tasks run one at a time in submit order (they share the YADE process and its single simulation state), so a multi-stage pipeline can be submitted in one go — each stage starts when the previous one finishes. Use the companion tools to manage the task lifecycle:
Use this for production simulation runs, long O.run() cycles, and any operation that may take minutes or longer. For quick queries and REPL-style testing, use yade_execute_code. O.engines[0] holds a PyRunner that belongs to the bridge (its command calls _mcpPyrunnerTick). The script does not need to keep it: assign O.engines as usual, the bridge re-adds the PyRunner before every O.run(). |
| yade_check_task_statusC | Check status and output for a submitted YADE task. |
| yade_list_tasksA | List tracked YADE tasks with pagination. Tasks are listed newest first. Queued (pending) tasks run one at a time in submit order, so among the pending entries the one furthest down the list runs next. |
| yade_interrupt_taskA | Stop a running YADE task, or cancel one still waiting in the queue. A task that has not started yet is simply removed from the queue
and ends in status
The response Namespace after interrupt: the YADE |
| yade_execute_codeA | Execute Python code synchronously in the running YADE process. Returns stdout immediately. Code runs in the YADE Python environment where yade modules are already imported; side effects persist. This tool remains responsive EVEN WHILE a simulation task is running (submitted via yade_execute_task). Use it as a live REPL to inspect simulation state in real time — no need to pre-script print statements. Typical uses:
O.engines[0] holds a PyRunner that belongs to the bridge (its command calls _mcpPyrunnerTick). Ignore it: assign O.engines as usual, the bridge re-adds the PyRunner before every O.run(). Unlike yade_execute_task, this tool is fire-and-return: the response contains the full output. It is NOT tracked by yade_list_tasks and cannot be interrupted or polled. Timeout behaviour: on timeout the bridge attempts to abort the
running code. The response is an error envelope (
WARNING: For anything expected to take more than a few seconds,
use yade_execute_task instead — it has proper cancellation via
yade_interrupt_task and does not leave state drift on timeout.
Also, do NOT write |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
The two execution tools are explicitly contrasted: yade_execute_task is async long-running tracked work, while yade_execute_code is a synchronous fire-and-return REPL, and both descriptions spell this out. The API tools are likewise distinct: yade_query_api is keyword search, yade_browse_api drills into the class tree, and the lifecycle tools (status/list/interrupt) each handle a clearly separate concern.
All seven tools share a uniform yade_ prefix followed by snake_case verb_noun (execute_task, execute_code, check_task_status, interrupt_task, list_tasks, browse_api, query_api). The pattern is predictable and readable throughout.
Seven tools is well-scoped for a simulation bridge: two execution modes, three async-lifecycle operations, and two API-discovery helpers. Each tool earns its place with no redundancy or filler.
The surface covers the core lifecycle (submit, poll, list, cancel) plus API discovery and live REPL inspection, which is a coherent workflow. Minor gaps exist — no explicit task cleanup/deletion or a dedicated bulk-output retrieval beyond status polling — but these are workable around.