https://github.com/yusong652/yade-mcp
MCP server connecting AI agents to YADE — run DEM simulations through natural conversation
https://github.com/yusong652/yade-mcp
ai anthropic claude dem discrete-element-method geomechanics llm mcp mcp-server particle-simulation python scientific-computing simulation yade
Last synced: 2 months ago
JSON representation
MCP server connecting AI agents to YADE — run DEM simulations through natural conversation
- Host: GitHub
- URL: https://github.com/yusong652/yade-mcp
- Owner: yusong652
- License: mit
- Created: 2026-03-30T12:00:18.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-04-04T11:51:04.000Z (2 months ago)
- Last Synced: 2026-04-05T11:02:19.419Z (2 months ago)
- Topics: ai, anthropic, claude, dem, discrete-element-method, geomechanics, llm, mcp, mcp-server, particle-simulation, python, scientific-computing, simulation, yade
- Language: Python
- Homepage: https://pypi.org/project/yade-mcp/
- Size: 13.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - YADE MCP - MCP server for YADE open-source DEM engine: browse API docs with BM25 search, execute code via REPL or async tasks, monitor progress, task history. ([Read more](/details/yade-mcp.md)) `Dem` `Granular Simulation` `Linux` (Scientific & Research Tools)
README
# yade-mcp
[English](https://github.com/yusong652/yade-mcp/blob/master/README.md) | [简体中文](https://github.com/yusong652/yade-mcp/blob/master/README.zh-CN.md)
[](https://pypi.org/project/yade-mcp/)
[](https://pypi.org/project/yade-mcp/)
[](https://glama.ai/mcp/servers/yusong652/yade-mcp)
[](LICENSE)
[](https://www.python.org/)
`O.engines += [LLM()] # yet another engine.`
**yade-mcp** connects AI agents to [YADE](https://yade-dem.org/) — the open-source discrete element method engine — through the [Model Context Protocol](https://modelcontextprotocol.io/). Browse API docs, run simulations, and execute code, all through natural conversation.

## Tools (7)
**2 documentation tools** — browse and search the YADE Python API with BM25 keyword search. No bridge required.
**5 execution tools** — synchronous REPL, async task submission, progress monitoring, interruption, and task history. Requires bridge.
## Quick Start
### Prerequisites
- **[YADE](https://yade-dem.org/doc/installation.html)** installed
- **[uv](https://docs.astral.sh/uv/getting-started/installation/)** installed (for `uvx`)
### Agentic Setup (Recommended)
Copy this to your AI agent and let it self-configure:
```text
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:
```json
{
"mcpServers": {
"yade-mcp": {
"command": "uvx",
"args": ["yade-mcp"]
}
}
}
```
**2. Start the bridge inside YADE:**
```bash
pip install yade-mcp-bridge
```
Then in a YADE Python console:
```python
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.
## Features
- **Rich class documentation** — covers the YADE Python API, enriched with real types, defaults, and docstrings
- **Hierarchical API browsing** — agents navigate categories, subcategories, and classes with progressive disclosure, reducing hallucination
- **BM25 keyword search** — fast, ranked search across all API docs by natural language queries
- **Synchronous REPL** — rapid iteration for querying simulation state (`O.bodies`, `O.iter`, quick tests)
- **Async task lifecycle** — submit long-running simulations, monitor progress, gracefully interrupt via PyRunner, and browse history
- **Multi-client compatible** — works with Claude Code, Codex CLI, Gemini CLI, OpenCode, and other MCP clients
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
## License
MIT — see [LICENSE](LICENSE).