Skip to content

Commit b983d2b

Browse files
HanSur94claude
andcommitted
docs: add badges, Docker quickstart, new tools, update tool count to 20
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 312c99b commit b983d2b

5 files changed

Lines changed: 85 additions & 6 deletions

File tree

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
<a href="https://github.com/HanSur94/matlab-mcp-server-python/wiki">Wiki</a>
1414
</p>
1515

16+
<p align="center">
17+
<a href="https://github.com/HanSur94/matlab-mcp-server-python/actions/workflows/ci.yml">
18+
<img src="https://github.com/HanSur94/matlab-mcp-server-python/actions/workflows/ci.yml/badge.svg" alt="CI">
19+
</a>
20+
<a href="https://pypi.org/project/matlab-mcp-python/">
21+
<img src="https://img.shields.io/pypi/v/matlab-mcp-python" alt="PyPI">
22+
</a>
23+
<a href="https://pypi.org/project/matlab-mcp-python/">
24+
<img src="https://img.shields.io/pypi/pyversions/matlab-mcp-python" alt="Python">
25+
</a>
26+
</p>
27+
1628
---
1729

1830
A Python MCP server that connects **any AI agent** (Claude, Cursor, Copilot, custom agents) to a shared MATLAB installation. Execute code, discover toolboxes, check code quality, get interactive Plotly plots, and run long simulations — all through [MCP](https://modelcontextprotocol.io/).
@@ -56,6 +68,10 @@ pip install .
5668
### Install the server
5769

5870
```bash
71+
# Option 1: Install from PyPI
72+
pip install matlab-mcp-python
73+
74+
# Option 2: Install from source
5975
git clone https://github.com/HanSur94/matlab-mcp-server-python.git
6076
cd matlab-mcp-server-python
6177
pip install -e ".[dev]"
@@ -105,6 +121,26 @@ Add to `.cursor/mcp.json` in your project:
105121
}
106122
```
107123

124+
### Run with Docker
125+
126+
```bash
127+
# Build the image
128+
docker build -t matlab-mcp .
129+
130+
# Run with your MATLAB mounted
131+
docker run -p 8765:8765 -p 8766:8766 \
132+
-v /path/to/MATLAB:/opt/matlab:ro \
133+
-e MATLAB_MCP_POOL_MATLAB_ROOT=/opt/matlab \
134+
matlab-mcp
135+
136+
# Or use docker-compose (edit docker-compose.yml to set your MATLAB path)
137+
docker compose up
138+
```
139+
140+
> **Note:** The Docker image does not include MATLAB. You must mount your own MATLAB installation.
141+
142+
> **Upgrading?** If you previously installed as `matlab-mcp-server`, uninstall first: `pip uninstall matlab-mcp-server && pip install matlab-mcp-python`
143+
108144
## Examples
109145

110146
### Basic: Run MATLAB Code
@@ -235,6 +271,14 @@ Now the agent can call `analyze_signal` or `train_model` directly — with full
235271
| `delete_file` | `filename: str` | Delete a session file |
236272
| `list_files` | — | List files in the session directory |
237273

274+
### File Reading
275+
276+
| Tool | Parameters | Description |
277+
|------|-----------|-------------|
278+
| `read_script` | `filename: str` | Read a MATLAB `.m` script file as text |
279+
| `read_data` | `filename: str, format: str` | Read data files (`.mat`, `.csv`, `.json`, `.txt`, `.xlsx`). `format`: `summary` or `raw` |
280+
| `read_image` | `filename: str` | Read image files (`.png`, `.jpg`, `.gif`) — renders inline in agent UIs |
281+
238282
### Admin
239283

240284
| Tool | Parameters | Description |
@@ -558,7 +602,7 @@ AI Agent (Claude, Cursor, etc.)
558602
559603
┌──────────────────────────────────────────────────────────┐
560604
│ MCP Server (FastMCP 2.x) │
561-
17 tools + custom tools │
605+
20 tools + custom tools │
562606
│ Session manager │ Security validator │ Formatter │
563607
└──────────┬───────────────────────────────┬───────────────┘
564608
│ │

wiki/Architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AI Agent (Claude, Cursor, Copilot, etc.)
99
1010
┌─────────────────────────────────┐
1111
│ MCP Server (FastMCP) │
12-
│ ├─ 17 built-in tools │
12+
│ ├─ 20 built-in tools │
1313
│ ├─ Custom tools (from YAML) │
1414
│ ├─ Session manager │
1515
│ ├─ Security validator │
@@ -43,7 +43,7 @@ AI Agent (Claude, Cursor, Copilot, etc.)
4343

4444
The entry point. Uses [FastMCP](https://github.com/jlowin/fastmcp) to handle MCP protocol details. Responsibilities:
4545

46-
- Register all 17 tools + custom tools
46+
- Register all 20 tools + custom tools
4747
- Manage server lifecycle (startup, shutdown, drain)
4848
- Route tool calls to implementation modules
4949
- Run background tasks (health checks, cleanup)

wiki/Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Welcome to the **MATLAB MCP Server** wiki! This server connects any AI agent to
66

77
- **[[Installation]]** — Prerequisites, MATLAB Engine API, server setup
88
- **[[Configuration]]** — Full YAML config reference with all options
9-
- **[[MCP Tools Reference]]** — All 17 built-in tools with parameters and examples
9+
- **[[MCP Tools Reference]]** — All 20 built-in tools with parameters and examples
1010
- **[[Custom Tools]]** — Expose your own `.m` functions as AI-callable tools
1111
- **[[Examples]]** — Ready-to-run MATLAB examples for common tasks
1212
- **[[Architecture]]** — System design, engine pool, async jobs, session model

wiki/MCP-Tools-Reference.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MCP Tools Reference
22

3-
The server exposes 17 built-in tools plus any custom tools defined in your `custom_tools.yaml`.
3+
The server exposes 20 built-in tools plus any custom tools defined in your `custom_tools.yaml`.
44

55
## Code Execution
66

@@ -188,6 +188,41 @@ Get the current engine pool status.
188188
}
189189
```
190190

191+
## File Reading
192+
193+
### `read_script`
194+
195+
Read a MATLAB `.m` script file from the session temp directory.
196+
197+
| Parameter | Type | Required | Description |
198+
|-----------|------|----------|-------------|
199+
| `filename` | string | yes | `.m` file to read |
200+
201+
Returns the file content as inline text.
202+
203+
### `read_data`
204+
205+
Read a data file from the session temp directory.
206+
207+
| Parameter | Type | Required | Description |
208+
|-----------|------|----------|-------------|
209+
| `filename` | string | yes | Data file to read |
210+
| `format` | string | no | `summary` (default) or `raw` |
211+
212+
**Behavior by file type:**
213+
- `.mat` summary: shows variable names, sizes, types via MATLAB `whos`
214+
- `.mat` raw: returns base64-encoded content
215+
- `.csv`, `.txt`, `.json`: returns text content
216+
- `.xlsx`: returns base64-encoded content
217+
218+
### `read_image`
219+
220+
Read an image file from the session temp directory. Returns an inline image that renders in agent UIs.
221+
222+
| Parameter | Type | Required | Description |
223+
|-----------|------|----------|-------------|
224+
| `filename` | string | yes | Image file (`.png`, `.jpg`, `.gif`) |
225+
191226
## Monitoring
192227

193228
### `get_server_metrics`

wiki/SETUP_WIKI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ git push origin master
2929
- **Home.md** — Main page with navigation
3030
- **Installation.md** — Prerequisites, setup, agent integration
3131
- **Configuration.md** — Full YAML config reference
32-
- **MCP-Tools-Reference.md** — All 17 tools with parameters
32+
- **MCP-Tools-Reference.md** — All 20 tools with parameters
3333
- **Custom-Tools.md** — How to expose .m functions
3434
- **Examples.md** — Ready-to-run MATLAB examples
3535
- **Architecture.md** — System design and data flow

0 commit comments

Comments
 (0)