Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,76 @@ MIT © [RitualDev Lab](https://ritualdev.in)

---

## MCP Server (`poly-mcp`) JSON-RPC Examples

`poly` includes an MCP server (`src/mcp/`) that exposes workspace graph and package management tools over JSON-RPC 2.0 for Cursor, Claude Code, and Windsurf.

### 1. Detect workspace (`poly_detect_workspace`)

```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "poly_detect_workspace",
"arguments": {
"cwd": "/path/to/workspace"
}
}
}
```

### 2. Resolve a package (`poly_resolve_package`)

```json
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "poly_resolve_package",
"arguments": {
"spec": "npm:zod@^3.23.0"
}
}
}
```

### 3. Audit workspace security (`poly_audit_security`)

```json
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "poly_audit_security",
"arguments": {
"cwd": "/path/to/workspace"
}
}
}
```

### 4. Verify lockfile (`poly_verify_lock`)

```json
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "poly_verify_lock",
"arguments": {
"cwd": "/path/to/workspace"
}
}
}
```

---

---

## 💖 Sponsor & Support
Expand Down