Skip to content

Commit 1817838

Browse files
Update PeasyAI README with prerequisites and installation improvements
Point users to the P installation guide for .NET SDK 8.0, Java, and the P compiler. Add Quick Start section, troubleshooting table, upgrade instructions, and reorganize development sections. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8ad9ae9 commit 1817838

File tree

1 file changed

+72
-12
lines changed

1 file changed

+72
-12
lines changed

Src/PeasyAI/README.md

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,65 @@ PeasyAI exposes an MCP (Model Context Protocol) server that works with **Cursor*
1515

1616
---
1717

18+
## Quick Start
19+
20+
> **Prerequisite:** Install Python ≥ 3.10, .NET SDK 8.0, Java ≥ 11, and the P compiler first.
21+
> See the [P installation guide](https://p-org.github.io/P/getstarted/install/) for details.
22+
23+
```bash
24+
# 1. Install PeasyAI
25+
pip install https://github.com/p-org/P/releases/latest/download/peasyai_mcp-0.1.0-py3-none-any.whl
26+
27+
# 2. Configure LLM credentials
28+
peasyai-mcp init # creates ~/.peasyai/settings.json — edit with your keys
29+
30+
# 3. Add to Cursor or Claude Code (pick one)
31+
# Cursor: add the snippet below to ~/.cursor/mcp.json
32+
# Claude: claude mcp add peasyai -- peasyai-mcp
33+
```
34+
35+
---
36+
1837
## Installation
1938

2039
### Prerequisites
2140

22-
| Dependency | Install |
23-
|------------|---------|
24-
| **Python ≥ 3.10** | [python.org](https://www.python.org/downloads/) |
25-
| **.NET SDK** | [dotnet.microsoft.com/download](https://dotnet.microsoft.com/download) |
26-
| **P compiler** | `dotnet tool install -g P` |
41+
PeasyAI relies on the P toolchain at runtime to compile and model-check your programs. Make sure the following are installed **before** using PeasyAI:
42+
43+
| Dependency | Why it's needed | Install |
44+
|------------|-----------------|---------|
45+
| **Python ≥ 3.10** | Runs the PeasyAI MCP server | [python.org/downloads](https://www.python.org/downloads/) |
46+
| **.NET SDK, Java, and P compiler** | Compiles and model-checks P programs | [**Follow the P installation guide**](https://p-org.github.io/P/getstarted/install/) |
47+
48+
> P requires a specific version of .NET SDK (8.0) and Java (≥ 11). The [P installation guide](https://p-org.github.io/P/getstarted/install/) has platform-specific instructions for macOS, Ubuntu, Amazon Linux, and Windows.
49+
50+
Verify your setup:
51+
52+
```bash
53+
python3 --version # ≥ 3.10
54+
dotnet --list-sdks # must show 8.0.*
55+
java -version # ≥ 11
56+
p --version # P compiler is on PATH
57+
```
2758

2859
### Install PeasyAI
2960

30-
Install the latest release directly (no git clone required):
61+
Install the latest release directly **no git clone required**:
3162

3263
```bash
3364
pip install https://github.com/p-org/P/releases/latest/download/peasyai_mcp-0.1.0-py3-none-any.whl
3465
```
3566

36-
> Check the [Releases page](https://github.com/p-org/P/releases) for the latest version URL.
67+
> Check the [Releases page](https://github.com/p-org/P/releases) for the latest version and URL.
68+
69+
To upgrade to a newer release, run the same command with `--force-reinstall`:
70+
71+
```bash
72+
pip install --force-reinstall https://github.com/p-org/P/releases/download/peasyai-v<VERSION>/peasyai_mcp-<VERSION>-py3-none-any.whl
73+
```
3774

3875
<details>
39-
<summary><strong>Alternative: install from source</strong></summary>
76+
<summary><strong>Alternative: install from source (for development)</strong></summary>
4077

4178
```bash
4279
git clone https://github.com/p-org/P.git
@@ -46,7 +83,7 @@ pip install .
4683

4784
</details>
4885

49-
### Create your configuration
86+
### Configure
5087

5188
```bash
5289
peasyai-mcp init
@@ -243,7 +280,21 @@ The `peasy-ai-fix-compile-error` and `peasy-ai-fix-checker-error` tools try up t
243280

244281
---
245282

246-
## Running the MCP Server Standalone
283+
## Troubleshooting
284+
285+
| Problem | Fix |
286+
|---------|-----|
287+
| `peasyai-mcp: command not found` | Make sure the pip install location is on your `PATH`. Try `python -m site --user-base` to find it, or use `pipx install` instead. |
288+
| `p: command not found` | Install the P compiler following the [P installation guide](https://p-org.github.io/P/getstarted/install/) and ensure `~/.dotnet/tools` is on your `PATH`. |
289+
| `dotnet: command not found` | Install .NET SDK 8.0 following the [P installation guide](https://p-org.github.io/P/getstarted/install/#step-1-install-net-core-sdk). |
290+
| MCP server not showing in Cursor | Restart Cursor after editing `~/.cursor/mcp.json`. Check the MCP panel for error messages. |
291+
| LLM calls failing | Run `peasyai-mcp config` to verify your credentials are loaded correctly. |
292+
293+
---
294+
295+
## Development
296+
297+
### Running the MCP Server Standalone
247298

248299
```bash
249300
# Installed
@@ -254,18 +305,27 @@ cd Src/PeasyAI
254305
.venv/bin/python -m ui.mcp.entry
255306
```
256307

257-
## Streamlit Web App
308+
### Streamlit Web App
258309

259310
```bash
260311
cd Src/PeasyAI
261312
pip install ".[streamlit]"
262313
streamlit run src/app.py
263314
```
264315

265-
## Running Tests
316+
### Running Tests
266317

267318
```bash
268319
cd Src/PeasyAI
269320
make test-contracts # MCP contract tests
270321
make regression # full regression suite
271322
```
323+
324+
### Releasing a New Version
325+
326+
Tag the commit and push — GitHub Actions will build the wheel and create a release:
327+
328+
```bash
329+
git tag peasyai-v<VERSION>
330+
git push origin peasyai-v<VERSION>
331+
```

0 commit comments

Comments
 (0)