Skip to main content

yade-mcp

yade-mcp header

English | 简体中文

PyPI Downloads GitHub stars Glama License: MIT Python 3.10+

O.engines += [LLM()] # yet another engine.

yade-mcp connects AI agents to YADE — the open-source discrete element method engine — through the Model Context Protocol. Browse API docs, run simulations, and execute code, all through natural conversation.

Your agent doesn't just call tools — it sits at your YADE console, runs long simulations on its own, and stays in sync with what you're doing.

yade-mcp demo

Works with any MCP client — verified with Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, OpenCode, and toyoura-nagisa.

Features

Your agent types, YADE runs

Powered by yade_execute_code

Describe what you want in plain language. The agent types commands into your YADE console — inspecting particles, tweaking parameters, stepping the engine, analyzing results. It reads each output, debugs, and iterates, the same way you do at the console yourself.

Set it running, walk away

Powered by yade_execute_task + yade_check_task_status + yade_interrupt_task

Run a full YADE script as a background task — just like firing off yade script.py, except you don't have to babysit it. The agent watches on its own: tailing the live output, catching errors as they appear, stopping the run gracefully when something looks off, fixing the script, and resubmitting — until the simulation actually finishes.

New session, no cold start

Powered by yade_list_tasks + yade_check_task_status

Every task you've submitted — the script, the live output, the final state — stays on record. When the context window fills up or you come back the next day, a fresh agent walks into a project that already remembers itself: it lists what's been run, reads what each task produced, and picks up without you re-explaining anything.

A live shell into the running simulation

Powered by yade_execute_code

While a task runs, the agent has a live shell into the simulation — ask it to inspect any variable, dump any object's state, or render a fresh plot on demand, without editing the script or stopping the run.

You type, the agent's in sync

Beyond submitted tasks, every line you type into the YADE console — the variables you peeked at, the parameters you tested, the dead ends you walked away from — flows into the agent's context too. When you turn to chat, it already has the trail of what you've been trying. Learning YADE and want feedback on what you just typed? Stuck on an unexpected error? Just ask — the agent saw what you typed and how YADE answered.

Tools (7)

Two documentation tools (no bridge) and five execution tools (bridge required):

Tool Purpose Bridge
yade_browse_api Walk the YADE Python class tree No
yade_query_api BM25 keyword search across the API No
yade_execute_code Run Python in the live YADE process; returns synchronously Yes
yade_execute_task Submit a script as a long-running background task Yes
yade_check_task_status Inspect a running or finished task (output, status) Yes
yade_interrupt_task Gracefully stop a running task Yes
yade_list_tasks List submitted tasks with metadata Yes

Quick Start

Prerequisites

  • YADE installed
  • uv installed (for uvx)

Copy this to your AI agent and let it self-configure:

Fetch and follow this bootstrap guide end-to-end:
https://raw.githubusercontent.com/yusong652/yade-mcp/master/docs/agentic/yade-mcp-bootstrap.md

Manual Setup

1. Register the MCP server in your client config:

{
  "mcpServers": {
    "yade-mcp": {
      "command": "uvx",
      "args": ["yade-mcp"]
    }
  }
}

2. Start the bridge inside YADE:

In a YADE Python console, install the bridge using YADE's own interpreter:

import sys, subprocess
subprocess.check_call([sys.executable, "-m", "pip", "install", "--user", "yade-mcp-bridge"])

On PEP 668 externally-managed environments (pip refuses --user), see the bootstrap guide for a portable form.

Restart YADE, then in the Python console:

import yade_mcp_bridge
yade_mcp_bridge.start()

Verify

Restart your AI agent (Claude Code, Codex CLI, Gemini CLI, etc.) and ask it to call yade_execute_code to verify the connection.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT — see LICENSE.

Metadata

Release files for yade-mcp 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yade-mcp 0.11.0
File Size Uploaded
yade_mcp-0.11.0.tar.gz 505.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yade-mcp 0.11.0
File Interpreter ABI Platform
yade_mcp-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / yade_mcp-0.11.0.tar.gz

Download URL yade_mcp-0.11.0.tar.gz
Size 505.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0c8e55b9bb443e4ce70fbb530fd9f4dae80f4b186e4ffe6e9ae417447f0a44d1
BLAKE2b-256 checksum
How to use checksums
4fa60f68e09e7fa101054dc11ebea2206753539eca896ed657c4d3e97ede511e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / yade_mcp-0.11.0-py3-none-any.whl

Download URL yade_mcp-0.11.0-py3-none-any.whl
Size 704.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95f3ec5e77a6168a0fb60c3ea0acf8724bd9ea096b1d086c764e5b8a7bef892f
BLAKE2b-256 checksum
How to use checksums
765897491156652049f334c60c6c756dfb1a61c285f9366e7ccce3f06acfad6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.8.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page