PDDL MCP Server

PDDL MCP Server

A planning server that enables natural language to PDDL conversion, automatic problem generation, and batch task execution using the Fast Downward planner. It supports multi-robot coordination and provides detailed reporting and diagnostic capabilities for complex planning tasks.

Category
Visit Server

README

PDDL MCP Server

A PDDL planning server based on the FastMCP framework, providing natural language to PDDL planning conversion, execution, and batch processing capabilities.

โœจ Features

  • ๐Ÿ—ฃ๏ธ Natural Language Processing: Generate PDDL planning tasks from natural language descriptions
  • ๐Ÿค– Automatic Problem Generation: Create PDDL problem files based on task parameters
  • ๐Ÿ“ฆ Batch Task Processing: Run multiple tasks in batch and generate detailed execution reports
  • ๐Ÿ”’ Type Safety: Data validation and type checking with Pydantic
  • โš™๏ธ Configuration Validation: Built-in configuration and system info checking

๐Ÿ“ Project Structure

pddl-mcp/
โ”œโ”€โ”€ core/                   # Core modules
โ”œโ”€โ”€ templates/              # PDDL template files
โ”œโ”€โ”€ tasks/                  # Task configuration files
โ”œโ”€โ”€ output/                 # Output directory
โ”œโ”€โ”€ config.py               # Configuration management
โ”œโ”€โ”€ constants.py            # Constants
โ”œโ”€โ”€ error_handler.py        # Error handling
โ”œโ”€โ”€ server.py               # MCP server
โ”œโ”€โ”€ test_server.py          # Test suite
โ”œโ”€โ”€ .env                    # Environment variables
โ””โ”€โ”€ requirements.txt        # Dependencies

โš™๏ธ Installation & Setup

1. Install Dependencies

pip install -r requirements.txt

2. Configure Fast Downward

git clone https://github.com/aibasel/downward.git
cd downward
./build.py

3. Environment Configuration

Copy .env.example to .env and set:

FAST_DOWNWARD_PATH=/path/to/fast-downward.py
PDDL_DOMAIN_PATH=./templates/domain.pddl

๐Ÿ”ง MCP Client Configuration

Claude Desktop

  1. Find the config file:
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add server config:
{
  "mcpServers": {
    "pddl-planner": {
      "command": "python",
      "args": ["d:/PDDL/pddl-mcp/server.py"],
      "cwd": "d:/PDDL/pddl-mcp",
      "env": {
        "FAST_DOWNWARD_PATH": "/path/to/fast-downward.py"
      }
    }
  }
}
  1. Restart Claude Desktop

Trae AI IDE

  1. Open MCP Settings:
    • Click settings โ†’ MCP Servers
    • Or use shortcut Ctrl+Shift+M
  2. Add new server:
{
  "name": "PDDL Planner",
  "command": "python",
  "args": ["d:/PDDL/pddl-mcp/server.py"],
  "cwd": "d:/PDDL/pddl-mcp",
  "description": "PDDL planning and NLP server"
}
  1. Test Connection

๐Ÿš€ Running & Usage

Start the Server

python server.py

You should see:

โœ… PDDL MCP Server initialized
๐Ÿš€ Starting FastMCP server...

Run Tests

python test_server.py

Batch Task Processing

python core/batch_runner.py

๐Ÿ’ฌ Prompt Examples

Basic Planning Task

Please plan a robot task:
- Robot: robot1
- Start: room1
- Goal: room3
- Task type: delivery

Generate a complete PDDL plan.

Natural Language Planning

Robot r2 needs to move from the warehouse to the office. Please generate a complete movement plan.

Multi-Robot Coordination

I have a multi-robot coordination task:
1. Robot r1 in room1, needs to go to room5
2. Robot r2 in room3, needs to go to room2
Please generate an individual plan for each robot and analyze possible path conflicts.

Batch Task Processing

Please batch process the following robot tasks:
1. r1: room1 โ†’ room3 (delivery)
2. r2: room2 โ†’ room4 (patrol)
3. r3: room5 โ†’ room1 (maintenance)

Generate a batch execution report including execution time and success rate for each task.

System Configuration & Diagnostics

Check the configuration status of the PDDL planning system, including:
- Fast Downward path
- Environment variables
- Dependency versions
- System performance
My PDDL planning task failed with error: [error message]
Please diagnose the problem and provide a solution.

๐Ÿงช Testing Guide

Prerequisites

  • Python 3.8+
  • Dependencies installed (pip install -r requirements.txt)
  • .env configured
  • Trae IDE imported project

Server Status

  • MCP server should show as connected in Trae IDE

Testing Methods

1. Trae IDE Direct Test

  • System config check
  • Simple planning task
  • Natural language planning
  • Multi-robot coordination
  • Batch task processing

2. Command Line

  • Start server: python server.py
  • Run test suite: python test_server.py
  • Batch tasks: python core/batch_runner.py

Expected Results

  • System config check returns JSON with config path, Fast Downward path, env status, output dir
  • Planning tasks generate:
    • PDDL problem files (output/pddl/)
    • Plan files (output/plan/)
    • Explanation files (output/explanation/)
  • Batch tasks generate:
    • Batch report (output/report.json)
    • Analysis (output/report.md)
    • Individual task files

Common Test Scenarios

  • Basic move task: single robot, simple path, expect 1-3 steps
  • Complex path: robot passes multiple rooms, expect optimal path
  • Multi-robot coordination: possible path conflicts, expect conflict analysis and solution
  • Error handling: invalid task params, expect clear error message

Troubleshooting

  • Server fails to start:
    1. Check dependencies: pip install -r requirements.txt
    2. Check Python version: python --version
    3. Check .env config
  • Planning fails:
    1. Validate Fast Downward path
    2. Check templates/domain.pddl
    3. Check output directory permissions
  • MCP connection fails:
    1. Restart Trae IDE
    2. Check .mcp.json config
    3. Ensure server port is free
  • Files not generated:
    1. Check output/ directory permissions
    2. Ensure enough disk space
    3. Validate file paths

Performance Testing

  • Response time: Simple task < 2s (run multiple times)
  • Concurrency: Multiple tasks at once, expect no conflict
  • Large-scale tasks: 10+ robots, expect successful coordination

Test Checklist

  • [ ] System config check
  • [ ] Simple planning task
  • [ ] Natural language processing
  • [ ] File generation
  • [ ] Multi-robot coordination
  • [ ] Batch task processing
  • [ ] Path conflict analysis
  • [ ] Error handling
  • [ ] Response time
  • [ ] Concurrency
  • [ ] Large-scale tasks
  • [ ] Memory usage
  • [ ] Trae IDE integration
  • [ ] MCP protocol compatibility
  • [ ] File system operations
  • [ ] Config management

Test Report Template

Test Date: [date]
Environment: [OS, Python version]
Scope: [modules tested]

Results:
โœ… Passed
โŒ Failed
โš ๏ธ  Issues

Performance:
- Avg response time: [time]
- Success rate: [percent]
- Resource usage: [memory, CPU]

Suggestions:
[improvements]

Next Steps

  • Expand test cases for more complex scenarios
  • Optimize performance based on results
  • Add new planning algorithms or features
  • Improve documentation and API reference

Note: For issues during testing, check logs in the output/ directory or run python test_server.py for diagnostics.

๐Ÿ“„ License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured