@plutojl/mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -0
- package/dist/cli.cjs +64072 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# @plutojl/mcp
|
|
2
|
+
|
|
3
|
+
Standalone MCP (Model Context Protocol) server for [Pluto.jl](https://plutojl.org/) notebooks. Enables AI assistants like Claude and GitHub Copilot to interact with Julia Pluto notebooks.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Start the MCP server (also starts a Pluto server)
|
|
9
|
+
npx @plutojl/mcp run
|
|
10
|
+
|
|
11
|
+
# Install MCP config for Claude Code
|
|
12
|
+
npx @plutojl/mcp install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- **Node.js** >= 18
|
|
18
|
+
- **Julia** — install from [julialang.org](https://julialang.org/downloads/) or via [juliaup](https://github.com/JuliaLang/juliaup)
|
|
19
|
+
- **Pluto.jl** — installed automatically on first run
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
### `run`
|
|
24
|
+
|
|
25
|
+
Start the MCP server (and a Pluto server if needed).
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx @plutojl/mcp run [options]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
| Option | Default | Description |
|
|
32
|
+
| ----------------------- | -------- | ---------------------------------------------------- |
|
|
33
|
+
| `--mcp-port <port>` | `3100` | MCP server port |
|
|
34
|
+
| `--pluto-port <port>` | `1234` | Pluto server port |
|
|
35
|
+
| `--pluto-url <url>` | — | Connect to existing Pluto server (skip starting one) |
|
|
36
|
+
| `--julia-version <ver>` | `1.11.7` | Julia version via juliaup |
|
|
37
|
+
|
|
38
|
+
### `install`
|
|
39
|
+
|
|
40
|
+
Add MCP configuration files for AI assistants.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx @plutojl/mcp install [options]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
| Option | Default | Description |
|
|
47
|
+
| ------------------- | ------------- | ------------------------------------------------- |
|
|
48
|
+
| `--target <target>` | `claude-code` | Config target: `claude-code`, `copilot`, or `all` |
|
|
49
|
+
| `--mcp-port <port>` | `3100` | MCP server port to configure |
|
|
50
|
+
| `--global` | — | Write to `~/.claude/` instead of `./.claude/` |
|
|
51
|
+
| `--dry-run` | — | Print config without writing |
|
|
52
|
+
| `--force` | — | Overwrite existing config |
|
|
53
|
+
|
|
54
|
+
## Configuration
|
|
55
|
+
|
|
56
|
+
Configuration is resolved in priority order:
|
|
57
|
+
|
|
58
|
+
1. CLI arguments
|
|
59
|
+
2. Environment variables (`PLUTO_MCP_PORT`, `PLUTO_PORT`, `PLUTO_SERVER_URL`, `JULIA_VERSION`)
|
|
60
|
+
3. `.plutomcp.json` in current directory
|
|
61
|
+
4. Defaults
|
|
62
|
+
|
|
63
|
+
Example `.plutomcp.json`:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcpPort": 3100,
|
|
68
|
+
"plutoPort": 1234,
|
|
69
|
+
"juliaVersion": "1.11.7"
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## MCP Tools
|
|
74
|
+
|
|
75
|
+
The server exposes these tools to AI assistants:
|
|
76
|
+
|
|
77
|
+
| Tool | Description |
|
|
78
|
+
| ------------------------- | ---------------------------------- |
|
|
79
|
+
| `learn_pluto_basics` | Get a comprehensive Pluto.jl guide |
|
|
80
|
+
| `start_pluto_server` | Start the Pluto server |
|
|
81
|
+
| `stop_pluto_server` | Stop the Pluto server |
|
|
82
|
+
| `connect_to_pluto_server` | Connect to an existing server |
|
|
83
|
+
| `get_notebook_status` | Check server status |
|
|
84
|
+
| `open_notebook` | Open a notebook file |
|
|
85
|
+
| `list_notebooks` | List all open notebooks |
|
|
86
|
+
| `create_cell` | Create and execute a new cell |
|
|
87
|
+
| `read_cell` | Read cell code and output |
|
|
88
|
+
| `edit_cell` | Update cell code |
|
|
89
|
+
| `execute_cell` | Run an existing cell |
|
|
90
|
+
| `execute_code` | Execute code ephemerally |
|
|
91
|
+
| `get_docs` | Get Julia symbol documentation |
|
|
92
|
+
| `introspect_notebook` | List all symbols in a notebook |
|
|
93
|
+
|
|
94
|
+
## Related
|
|
95
|
+
|
|
96
|
+
- [Advanced Pluto Notebook for VSCode](https://marketplace.visualstudio.com/items?itemName=juliapluto-pankgeorg.advanced-vscode-extension) — VSCode extension with full notebook UI
|
|
97
|
+
- [Pluto.jl](https://plutojl.org/) — Reactive Julia notebooks
|