pypddlengine
Click on "Deploy 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., "@pypddlengine Initialize the planning problem from domain and problem files"
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.
pypddlengine
A Python PDDL engine and MCP (Model Context Protocol) server that enables AI agents to interactively explore PDDL planning problems.
Features
Standalone PDDL engine — parse, validate, and execute PDDL domains and problems
Interactive plan exploration — step through plans, query reachable actions, inspect world state
MCP server — expose the engine as tools to any MCP-compatible AI agent (Claude Desktop, VS Code, etc.)
Python API — direct programmatic access with structured JSON responses
Session logging — record agent interactions to CSV/JSON for analysis
Supported PDDL Features
Feature | Requirement | Notes |
STRIPS |
| Basic actions, positive/negative preconditions & effects |
Typing |
| Typed objects/parameters, type hierarchies |
Equality |
|
|
Negative preconditions |
|
|
Disjunctive preconditions |
|
|
Existential preconditions |
|
|
Universal preconditions |
|
|
Conditional effects |
|
|
Implication |
|
|
Numeric fluents |
|
|
Action costs / metric |
|
|
Constants | — |
|
Unsupported PDDL Features
Feature | Notes |
Durative actions ( | Raises an explicit error with a descriptive message |
Derived predicates ( | Not parsed; will fail on load |
Maximize metric | Only |
Arithmetic in conditions | Numeric expressions like |
Related MCP server: LLMMO Game Server
Installation
git clone https://github.com/kgoe-ait/pypddlengine
cd pypddlengine
uv syncOr install from PyPI (once published):
pip install pypddlengineUsage
Python API — Simulator
from pypddlengine.engine import Simulator
sim = Simulator(domain_str, problem_str, plan_str)
sim.step_all()
print(sim.is_goal_reached())Step through manually:
sim = Simulator(domain_str, problem_str)
sim.step(("move", ("loc1", "loc2")))
print(sim.get_executable_actions())
print(sim.is_goal_reached())Python API — Exploration API
Higher-level API with structured JSON responses, designed for AI agent tool use:
from pypddlengine.api import PDDLExplorationAPI
api = PDDLExplorationAPI(domain_str, problem_str)
actions = api.get_available_actions() # {"count": 4, "actions": [...]}
result = api.execute_action("move", ("a", "b")) # {"success": true, ...}
api.is_goal_reached() # {"goal_reached": false, ...}
api.reset()Session Logger
Wraps the exploration API and logs every interaction to CSV/JSON:
from pypddlengine.session_logger import PDDLSessionLogger
session = PDDLSessionLogger(domain_str, problem_str, session_id="experiment_1")
session.execute_action("move", ["loc1", "loc2"])
session.export_to_csv("session.csv")
session.export_to_json("session.json")
session.print_summary()MCP Server (Claude Desktop)
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"pddl-engine": {
"command": "uv",
"args": ["run", "python", "-m", "pypddlengine.server"],
"cwd": "/path/to/pypddlengine"
}
}
}MCP Server (VS Code)
Already configured in .vscode/mcp.json — works out of the box when opening this project.
MCP Tools
Once connected, the AI agent can use these tools:
Tool | Description |
| Initialize session with domain and problem PDDL strings |
| Initialize session from domain and problem file paths |
| Get all executable actions in current state |
| Execute an action by name and arguments |
| View all true predicates and fluents |
| Check if goal conditions are met |
| Reset to initial state |
| Review actions taken so far |
| Re-read the PDDL domain definition |
| Re-read the PDDL problem definition |
Running Tests
uv run pytestProject Structure
pypddlengine/
├── server.py # MCP server
├── api.py # Exploration API (structured JSON responses)
├── session_logger.py # Session logging wrapper
└── engine/ # Core PDDL engine
├── simulator.py # Plan simulation
├── parser/ # PDDL lexer & parser
├── interpreter/ # Domain/problem interpretation
└── execution/ # State management & action executionLicense
Apache 2.0 — see LICENSE.
Available Tools
10 toolspddl_execute_actionB
Execute a PDDL action with given arguments. Returns success status, new state summary, and whether goal is reached.
Inputs: action_name (required), args.
pddl_get_action_historyA
Get the history of all actions taken so far in this session.
Inputs: no named parameters.
pddl_get_available_actionsA
Get all actions that can be executed in the current state. Returns action names and arguments.
Inputs: no named parameters.
pddl_get_current_stateA
Get the complete current state, including all true predicates and fluents.
Inputs: no named parameters.
pddl_get_domainA
Get the PDDL domain string used to initialize this session. Useful for re-reading action schemas, predicates, and types.
Inputs: no named parameters.
pddl_get_problemA
Get the PDDL problem string used to initialize this session. Useful for re-reading objects, initial state, and goal conditions.
Inputs: no named parameters.
pddl_initA
Initialize a PDDL exploration session with a domain and problem. Must be called first before using other tools.
Inputs: domain (required), problem (required).
pddl_init_from_filesA
Initialize a PDDL exploration session by reading domain and problem from files. Use this instead of pddl_init when the PDDL definitions are available as files, to avoid duplicating large strings in the conversation.
Inputs: domain_path (required), problem_path (required).
pddl_is_goal_reachedB
Check if the goal state has been reached.
Inputs: no named parameters.
pddl_resetA
Reset to the initial state and clear action history. Use this to try a different approach.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct aspect of PDDL exploration: initialization, action querying, execution, state inspection, goal checking, history, and domain/problem retrieval. There is no overlap or ambiguity.
All tools follow a consistent 'pddl_<verb>_<object>' pattern (e.g., pddl_init, pddl_get_available_actions, pddl_execute_action). The naming is uniform and predictable.
With 10 tools, the server is well-scoped. Each tool provides a necessary function for exploring PDDL problems without superfluous or missing functionality.
The tool set covers the full lifecycle of a PDDL exploration session: initialization, action enumeration, execution, state queries, goal detection, reset, history, and retrieval of domain/problem definitions. No obvious gaps remain.
Maintenance
Related MCP Connectors
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control a Minecraft bot for movement, building, crafting, and instant schematic-based structure spawning via MCP tools.2Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables LLM-driven text game state management by exposing MCP tools for managing players, locations, items, entities, and abstract concepts.MIT
- AlicenseCqualityCmaintenanceEnables AI-driven game development by providing MCP tools to interact with the Godot editor, including scene editing, node manipulation, script attachment, and scene execution.28MIT
- FlicenseNot gradedqualityBmaintenanceEnables reproducible evaluation of AI coding agents by exposing repository inspection, code editing, test running, and deterministic verification through MCP tools.-