msty-admin-mcp 6.2.0__tar.gz → 6.2.2__tar.gz
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.
- msty_admin_mcp-6.2.2/.dockerignore +23 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/CHANGELOG.md +60 -0
- msty_admin_mcp-6.2.2/Dockerfile +13 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/PKG-INFO +28 -26
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/README.md +26 -24
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/docs/BLOOM_GUIDE.md +1 -1
- msty_admin_mcp-6.2.2/glama.json +4 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/pyproject.toml +2 -2
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/db.py +30 -2
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/install.py +41 -2
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/intelligence/__init__.py +1 -1
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/paths.py +122 -11
- msty_admin_mcp-6.2.2/src/server.py +1655 -0
- msty_admin_mcp-6.2.2/src/tooling.py +61 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/version.py +1 -1
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/writes.py +108 -6
- msty_admin_mcp-6.2.2/tests/test_glama_quality.py +142 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/tests/test_hybrid.py +123 -6
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/tests/test_packaging.py +23 -2
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/tests/test_server.py +37 -12
- msty_admin_mcp-6.2.2/tests/test_studio3_guard.py +376 -0
- msty_admin_mcp-6.2.0/src/server.py +0 -1146
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/.github/workflows/ci.yml +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/.gitignore +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/LICENSE +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/assets/demo.gif +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/assets/logo.svg +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/requirements.txt +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/analytics.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/automation/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/bloom/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/bloom/cv_behaviors.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/bloom/evaluator.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/bloom/example_behaviors.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/bloom/mcp_tools.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/bloom/ollama_adapter.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/calibration/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/config/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/database/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/escalation.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/frontier.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/frontier_main.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/hardware/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/hardware/catalog.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/inventory.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/nexus.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/phase4_5_tools.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/safe_io.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/services.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/src/utils/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/tests/__init__.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/tests/test_clean_install.py +0 -0
- {msty_admin_mcp-6.2.0 → msty_admin_mcp-6.2.2}/tests/test_frontier.py +0 -0
|
@@ -2,6 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## v6.2.2 - 2026-11-10
|
|
6
|
+
|
|
7
|
+
Safety release for Msty Studio 3.0.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Studio version gate. The app version is parsed as numbers, so 10.0.0 sorts above 2.9.12. Studio 2.4 to 2.9.x is supported. Versions below 2.4 and from 3.0 on are unsupported. A missing, unreadable or over-long version is unknown.
|
|
12
|
+
- `get_msty_installation` reports `layout` and `layout_status`.
|
|
13
|
+
- Studio read results carry a warning when the version is unknown, because the data may be a stale copy.
|
|
14
|
+
- macOS detection also looks for `~/Applications/MstyStudio.app`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- On Studio 3.x and below 2.4 every Studio storage read and write is refused with one clear message. Detection no longer falls back to the legacy `msty.db` files or a search of the `File System` folder, because after a 3.0 migration those may be stale copies.
|
|
19
|
+
- Persona and prompt writes need a detected Studio 2.4 to 2.9.x. They are refused on other versions and when the version is unknown, and an explicit database path cannot bypass this. The JSON pack is still saved for import in Persona Studio.
|
|
20
|
+
- On Windows and Linux the Studio version cannot be read yet, so Studio writes are refused there. Reads work as before and carry the stale-copy warning.
|
|
21
|
+
- `recommend_model` still works on Studio 3.x. It recommends from hardware alone and notes that Studio usage was not used.
|
|
22
|
+
- `get_status(scope=server)` reports `studio_target` as 2.4 to 2.9.x, with Studio 3.x detected and refused.
|
|
23
|
+
- README warning about Studio 3.x, and the write conditions in the README name the Studio version check and Windows and Linux.
|
|
24
|
+
|
|
25
|
+
Model, service, Nexus, calibration and Bloom tools are unchanged.
|
|
26
|
+
|
|
27
|
+
## v6.2.1 - 2026-11-02
|
|
28
|
+
|
|
29
|
+
Glama tool-quality pass. 61 tools become 54.
|
|
30
|
+
|
|
31
|
+
### Breaking changes
|
|
32
|
+
|
|
33
|
+
| Old name | New name |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `get_server_status` | `get_status(scope=server)` |
|
|
36
|
+
| `analyse_msty_health` | `get_status(scope=install)` |
|
|
37
|
+
| `get_service_status` | `get_status(scope=services)` |
|
|
38
|
+
| Combined health call | `get_status(scope=all)` (default) |
|
|
39
|
+
| `chat_with_local_model` | `chat_with_model(backend=local_ai)` |
|
|
40
|
+
| `chat_with_mlx_model` | `chat_with_model(backend=mlx)` |
|
|
41
|
+
| `chat_with_llamacpp_model` | `chat_with_model(backend=llamacpp)` |
|
|
42
|
+
| `list_available_models` | `list_models(backend=all)` |
|
|
43
|
+
| `list_mlx_models` | `list_models(backend=mlx)` |
|
|
44
|
+
| `list_llamacpp_models` | `list_models(backend=llamacpp)` |
|
|
45
|
+
| `list_nexus_models` | `list_models(backend=nexus)` |
|
|
46
|
+
| `detect_msty_installation` | `get_msty_installation` |
|
|
47
|
+
| `detect_nexus` | `get_nexus` |
|
|
48
|
+
| `analyse_conversation_patterns` | `get_conversation_patterns` |
|
|
49
|
+
|
|
50
|
+
`ask_frontier` is unchanged.
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- MCP `ToolAnnotations` (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`, `title`) on every tool.
|
|
55
|
+
- TDQS-style descriptions and a description on every parameter.
|
|
56
|
+
- `glama.json` maintainer record and a `python:3.12-slim` Dockerfile for Glama Firecracker builds.
|
|
57
|
+
- Persona `colorIcon` allow-list (`{"name":"tabler:[a-z0-9-]{1,64}"}`). Other values fall back to `tabler:user-scan`.
|
|
58
|
+
- Length caps on persona name (100), title (100), description (500), system prompt (20000) and prompt text (20000). Over-length fields are refused with a clear error.
|
|
59
|
+
- `install_model` pulls only bare Ollama names (`registry.ollama.ai`) and `hf.co/` paths. Other hosts are refused.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- README tool list, architecture phase counts and Git install pin match 54 tools and v6.2.1.
|
|
64
|
+
|
|
5
65
|
## v6.2.0 - 2026-11-01
|
|
6
66
|
|
|
7
67
|
Hybrid local and cloud tools on top of 6.1.5.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
FROM python:3.12-slim@sha256:aa943ce411423c7582288f18707ff66eddcbaeb510502d747a72aeb34f30d159
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
COPY pyproject.toml README.md LICENSE ./
|
|
6
|
+
COPY src ./src
|
|
7
|
+
|
|
8
|
+
RUN pip install --no-cache-dir . \
|
|
9
|
+
&& useradd --create-home --uid 10001 app
|
|
10
|
+
|
|
11
|
+
USER app
|
|
12
|
+
|
|
13
|
+
CMD ["msty-admin-mcp"]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: msty-admin-mcp
|
|
3
|
-
Version: 6.2.
|
|
4
|
-
Summary: Comprehensive MCP server for administering Msty Studio Desktop 2.9+ with
|
|
3
|
+
Version: 6.2.2
|
|
4
|
+
Summary: Comprehensive MCP server for administering Msty Studio Desktop 2.9+ with 54 tools, hardware-aware model install, Studio writes with confirm, insights analytics, Nexus bridge, Bloom evaluation, and a Cursor/Grok/Claude handoff for local models
|
|
5
5
|
Author-email: M-Pineapple 🍍 <128090761+M-Pineapple@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
License-File: LICENSE
|
|
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
|
|
23
23
|
<img src="assets/logo.svg" alt="Msty Admin MCP logo" width="240"/>
|
|
24
24
|
|
|
25
|
-
# Msty Admin MCP v6.2.
|
|
25
|
+
# Msty Admin MCP v6.2.2
|
|
26
26
|
|
|
27
27
|
[](LICENSE)
|
|
28
28
|
[](https://www.python.org)
|
|
@@ -33,6 +33,9 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
|
|
34
34
|
> Unofficial community project. Not affiliated with, or endorsed by, Msty. Msty is a trademark of its owner.
|
|
35
35
|
|
|
36
|
+
> [!WARNING]
|
|
37
|
+
> **Msty Studio 3.x is not supported yet.** Studio 3.0 can move workspaces to file-based storage, which this release cannot read safely. From v6.2.2 the server detects Studio 3.x and turns off every Studio read and write, so it never reports a stale copy as current or writes a row Studio 3.0 may reject. Model, service, Nexus, calibration and Bloom tools still work. Supported Studio versions are 2.4 to 2.9.x. Persona and prompt writes need a detected Studio 2.4 to 2.9.x, so they are refused when the version cannot be read. On Windows and Linux the Studio version cannot be read yet, so persona and prompt writes are refused there. Import the saved JSON pack in Persona Studio instead. If you rely on the Studio data tools, stay on the Studio 2.x update line for now. Studio 2.x installs stay on that line until you choose the 3.x track.
|
|
38
|
+
|
|
36
39
|
<img src="assets/demo.gif" alt="msty-admin-mcp answering initialize and listing its tools" width="720"/>
|
|
37
40
|
|
|
38
41
|
**Let the AI you already use plan, check and look after your local AI in Msty Studio, and let your local model ask for stronger help only when it needs it.**
|
|
@@ -111,7 +114,7 @@ For this to work, the chat uses a small toolset holding only the Frontier helper
|
|
|
111
114
|
|
|
112
115
|
## What you can do
|
|
113
116
|
|
|
114
|
-
Once the server is added to your AI app, ask as you normally would. You never need to name a tool, because the AI picks the right one. The groups below cover all
|
|
117
|
+
Once the server is added to your AI app, ask as you normally would. You never need to name a tool, because the AI picks the right one. The groups below cover all 54 tools. The full names are in [Tools summary](#tools-summary-54-in-total).
|
|
115
118
|
|
|
116
119
|
### Know your machine and pick a model
|
|
117
120
|
|
|
@@ -204,7 +207,7 @@ Msty Studio users who want their usual AI app to help choose, test and organise
|
|
|
204
207
|
|
|
205
208
|
- Inventory, analytics and free-form SQL stay **read only**. Credential columns always read as NULL. Secrets typed into free text, such as a chat message or a note, are out of scope.
|
|
206
209
|
- Write tools always save a JSON pack under `~/.msty-admin/imports/` (mode `0600`, directory `0700`). `import_tool_config` and the tools, toolsets and skills keys of `import_studio_pack` never write the Studio database. Import that pack in Toolbox. Configs with `command`, `args` or `env` are flagged as running a program on your machine.
|
|
207
|
-
- Personas and prompts insert into Studio SQLite only when
|
|
210
|
+
- Personas and prompts insert into Studio SQLite only when `confirm=true`, the operator env `MSTY_ALLOW_STUDIO_WRITES=1` and a detected Studio 2.4 to 2.9.x are all present. On Windows and Linux the Studio version cannot be read yet, so these writes are refused there. The LLM cannot set that env through a tool argument. Writes take a SQLite backup (including WAL) under `~/.msty-admin/backups/` and refuse while Msty Studio is running against the live database. Tests use fixture copies, never the live DB.
|
|
208
211
|
- `query_local_ai_service` is allow-listed (tags, version, show, chat). Pull and create go through `install_model` and `set_model_settings`, which also need `confirm=true`.
|
|
209
212
|
- Calibration and Bloom history live under `~/.msty-admin/`, not in Studio.
|
|
210
213
|
- Frontier needs `CURSOR_API_KEY` for Cursor, `XAI_API_KEY` for Grok, or `ANTHROPIC_API_KEY` for Claude. Keys stay in Msty's toolbox environment and never belong in this repository. In ask mode the Cursor agent does not send mail, move or delete files, or use trading tools.
|
|
@@ -235,7 +238,7 @@ If you already have Python 3.10+ as `python3`, `python3 -m venv .venv` is enough
|
|
|
235
238
|
|
|
236
239
|
If `pip install msty-admin-mcp` cannot find the package, install the release straight from GitHub:
|
|
237
240
|
```bash
|
|
238
|
-
pip install "msty-admin-mcp @ git+https://github.com/M-Pineapple/msty-admin-mcp@v6.2.
|
|
241
|
+
pip install "msty-admin-mcp @ git+https://github.com/M-Pineapple/msty-admin-mcp@v6.2.2"
|
|
239
242
|
```
|
|
240
243
|
|
|
241
244
|
### With HTTP Transport
|
|
@@ -341,14 +344,14 @@ Msty Studio Desktop
|
|
|
341
344
|
↓
|
|
342
345
|
|
|
343
346
|
MCP Server (stdio / HTTP)
|
|
344
|
-
├── Phase 1: Foundational (
|
|
347
|
+
├── Phase 1: Foundational (5)
|
|
345
348
|
├── Phase 2: Configuration (5)
|
|
346
|
-
├── Phase 3: Service Integration (
|
|
349
|
+
├── Phase 3: Service Integration (9)
|
|
347
350
|
├── Phase 4: Intelligence (5)
|
|
348
351
|
├── Phase 5: Calibration (5)
|
|
349
352
|
├── Phase 6: Bloom Evaluation (6)
|
|
350
353
|
├── Phase 7: Studio Inventory (15)
|
|
351
|
-
├── Phase 8: Nexus Bridge (
|
|
354
|
+
├── Phase 8: Nexus Bridge (3)
|
|
352
355
|
└── Phase 9: Frontier handoff (1)
|
|
353
356
|
```
|
|
354
357
|
|
|
@@ -360,7 +363,7 @@ A local model does the ordinary work. When a question is past it, that model cal
|
|
|
360
363
|
|
|
361
364
|
Msty Studio has no hook API. `escalate_if_needed` and the "Local with frontier escalation" persona are the honest equivalent: the local model must emit a real tool call.
|
|
362
365
|
|
|
363
|
-
Use a **separate one-tool server** for the local-model chat. The full admin server has
|
|
366
|
+
Use a **separate one-tool server** for the local-model chat. The full admin server has 54 tools. A small model will call those other tools (GitHub, search, schema, and so on) instead of waiting for the answer.
|
|
364
367
|
|
|
365
368
|
### Fresh install
|
|
366
369
|
|
|
@@ -411,35 +414,34 @@ The admin server still has the Studio inventory tools. Add the Frontier server a
|
|
|
411
414
|
|
|
412
415
|
---
|
|
413
416
|
|
|
414
|
-
## Tools summary (
|
|
417
|
+
## Tools summary (54 in total)
|
|
415
418
|
|
|
416
|
-
### Phase 1: Foundational (
|
|
417
|
-
- `
|
|
419
|
+
### Phase 1: Foundational (5)
|
|
420
|
+
- `get_msty_installation`: app, version, DB path, ports
|
|
418
421
|
- `read_msty_database`: `stats` / `tables` / read-only SQL
|
|
419
422
|
- In read-only SQL, credential columns (key, token, secret, password, auth and header names, URL, config/JSON and command-line columns) always read as NULL. Secrets typed into arbitrary free-text columns, such as a chat message or a note, are out of scope for this tool.
|
|
420
423
|
- `list_configured_tools`: Toolbox MCP tools
|
|
421
424
|
- `get_model_providers`: services and Studio providers (keys redacted)
|
|
422
|
-
- `
|
|
423
|
-
- `get_server_status`: MCP status
|
|
425
|
+
- `get_status`: MCP, install and local service health. `scope` is `all`, `server`, `install` or `services`
|
|
424
426
|
|
|
425
427
|
### Phase 2: Configuration (5)
|
|
426
428
|
- `export_tool_config`: export a tool by name/id
|
|
427
429
|
- `sync_claude_preferences`: Claude to Msty delta report
|
|
428
|
-
- `generate_persona`: persona JSON pack. SQLite insert needs `confirm=true
|
|
430
|
+
- `generate_persona`: persona JSON pack. SQLite insert needs `confirm=true`, `MSTY_ALLOW_STUDIO_WRITES=1` and a detected Studio 2.4 to 2.9.x, so it is refused on Windows and Linux
|
|
429
431
|
- `import_tool_config`: JSON pack for Toolbox. Never writes the Studio database
|
|
430
432
|
- `import_studio_pack`: tools, toolsets and skills stay in the JSON pack. Personas and prompts need the env gate
|
|
431
433
|
|
|
432
|
-
### Phase 3: Service Integration (
|
|
433
|
-
- `
|
|
434
|
-
- `
|
|
434
|
+
### Phase 3: Service Integration (9)
|
|
435
|
+
- `list_models`: Local AI, MLX, llama.cpp, Vibe and Nexus. `backend` defaults to `all`
|
|
436
|
+
- `query_local_ai_service` (allow-listed)
|
|
437
|
+
- `chat_with_model`: Local AI, MLX or llama.cpp. `backend` defaults to `local_ai`
|
|
438
|
+
- `get_hardware_profile`, `recommend_model`
|
|
435
439
|
- `install_model`, `set_model_settings`
|
|
436
|
-
- `list_mlx_models`, `chat_with_mlx_model`
|
|
437
|
-
- `list_llamacpp_models`, `chat_with_llamacpp_model`
|
|
438
440
|
- `get_vibe_proxy_status`, `query_vibe_proxy`
|
|
439
441
|
|
|
440
442
|
### Phase 4: Intelligence (5)
|
|
441
443
|
- `get_model_performance_metrics`: from Studio `insightsLanguageModelUsage`
|
|
442
|
-
- `
|
|
444
|
+
- `get_conversation_patterns`
|
|
443
445
|
- `compare_model_responses`
|
|
444
446
|
- `optimise_knowledge_stacks`: live Next Gen / draft / compose status
|
|
445
447
|
- `suggest_persona_improvements`
|
|
@@ -460,8 +462,8 @@ The admin server still has the Studio inventory tools. Add the Frontier server a
|
|
|
460
462
|
- `list_context_studio`, `list_agent_plans`
|
|
461
463
|
- `get_studio_entity` (plural keys such as `personas`, plus singular aliases such as `persona`), `get_schema_migrations`, `export_workflow_pack`
|
|
462
464
|
|
|
463
|
-
### Phase 8: Nexus Bridge (
|
|
464
|
-
- `
|
|
465
|
+
### Phase 8: Nexus Bridge (3)
|
|
466
|
+
- `get_nexus`, `query_nexus`, `get_insights_usage`
|
|
465
467
|
|
|
466
468
|
### Phase 9: Frontier handoff (1)
|
|
467
469
|
- `ask_frontier`: hand one question to Cursor (default), Grok, or Claude and return the answer in the Msty chat. Use the one-tool server (`msty-frontier` or `python -m src.frontier_main`) for a local-model chat. See [Hybrid local model and Cursor agent](#hybrid-local-model-and-cursor-agent).
|
|
@@ -498,10 +500,10 @@ v6 ships unit tests for path resolution, read-only SQL guards, redaction, invent
|
|
|
498
500
|
**A**: No. v6 targets Studio 2.9+ (works on 2.4+ layouts when the File System DB is present). Use v4.x for older process-based detection.
|
|
499
501
|
|
|
500
502
|
### Q: Does this write to the Studio database?
|
|
501
|
-
**A**: Inventory and analytics stay read-only. Write tools always save a JSON pack under `~/.msty-admin/imports/`. Tools, toolsets and skills are import-file only. Personas and prompts insert into Studio SQLite only with `confirm=true
|
|
503
|
+
**A**: Inventory and analytics stay read-only. Write tools always save a JSON pack under `~/.msty-admin/imports/`. Tools, toolsets and skills are import-file only. Personas and prompts insert into Studio SQLite only with `confirm=true`, `MSTY_ALLOW_STUDIO_WRITES=1` in the MCP server environment and a detected Studio 2.4 to 2.9.x, after a timestamped SQLite backup that includes WAL, and they refuse while Msty Studio is running against the live database. Quit Studio first, or import the JSON pack in Persona Studio or Toolbox. On Windows and Linux the Studio version cannot be read yet, so these writes are refused there.
|
|
502
504
|
|
|
503
505
|
### Q: What is the Nexus integration?
|
|
504
|
-
**A**: [Msty Nexus](https://msty.ai/nexus/) is the local runtime/gateway.
|
|
506
|
+
**A**: [Msty Nexus](https://msty.ai/nexus/) is the local runtime/gateway. `get_nexus` detects it. `list_models` with `backend=nexus` lists models on its OpenAI-compatible endpoint (`MSTY_NEXUS_PORT`).
|
|
505
507
|
|
|
506
508
|
---
|
|
507
509
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="assets/logo.svg" alt="Msty Admin MCP logo" width="240"/>
|
|
4
4
|
|
|
5
|
-
# Msty Admin MCP v6.2.
|
|
5
|
+
# Msty Admin MCP v6.2.2
|
|
6
6
|
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://www.python.org)
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
> Unofficial community project. Not affiliated with, or endorsed by, Msty. Msty is a trademark of its owner.
|
|
15
15
|
|
|
16
|
+
> [!WARNING]
|
|
17
|
+
> **Msty Studio 3.x is not supported yet.** Studio 3.0 can move workspaces to file-based storage, which this release cannot read safely. From v6.2.2 the server detects Studio 3.x and turns off every Studio read and write, so it never reports a stale copy as current or writes a row Studio 3.0 may reject. Model, service, Nexus, calibration and Bloom tools still work. Supported Studio versions are 2.4 to 2.9.x. Persona and prompt writes need a detected Studio 2.4 to 2.9.x, so they are refused when the version cannot be read. On Windows and Linux the Studio version cannot be read yet, so persona and prompt writes are refused there. Import the saved JSON pack in Persona Studio instead. If you rely on the Studio data tools, stay on the Studio 2.x update line for now. Studio 2.x installs stay on that line until you choose the 3.x track.
|
|
18
|
+
|
|
16
19
|
<img src="assets/demo.gif" alt="msty-admin-mcp answering initialize and listing its tools" width="720"/>
|
|
17
20
|
|
|
18
21
|
**Let the AI you already use plan, check and look after your local AI in Msty Studio, and let your local model ask for stronger help only when it needs it.**
|
|
@@ -91,7 +94,7 @@ For this to work, the chat uses a small toolset holding only the Frontier helper
|
|
|
91
94
|
|
|
92
95
|
## What you can do
|
|
93
96
|
|
|
94
|
-
Once the server is added to your AI app, ask as you normally would. You never need to name a tool, because the AI picks the right one. The groups below cover all
|
|
97
|
+
Once the server is added to your AI app, ask as you normally would. You never need to name a tool, because the AI picks the right one. The groups below cover all 54 tools. The full names are in [Tools summary](#tools-summary-54-in-total).
|
|
95
98
|
|
|
96
99
|
### Know your machine and pick a model
|
|
97
100
|
|
|
@@ -184,7 +187,7 @@ Msty Studio users who want their usual AI app to help choose, test and organise
|
|
|
184
187
|
|
|
185
188
|
- Inventory, analytics and free-form SQL stay **read only**. Credential columns always read as NULL. Secrets typed into free text, such as a chat message or a note, are out of scope.
|
|
186
189
|
- Write tools always save a JSON pack under `~/.msty-admin/imports/` (mode `0600`, directory `0700`). `import_tool_config` and the tools, toolsets and skills keys of `import_studio_pack` never write the Studio database. Import that pack in Toolbox. Configs with `command`, `args` or `env` are flagged as running a program on your machine.
|
|
187
|
-
- Personas and prompts insert into Studio SQLite only when
|
|
190
|
+
- Personas and prompts insert into Studio SQLite only when `confirm=true`, the operator env `MSTY_ALLOW_STUDIO_WRITES=1` and a detected Studio 2.4 to 2.9.x are all present. On Windows and Linux the Studio version cannot be read yet, so these writes are refused there. The LLM cannot set that env through a tool argument. Writes take a SQLite backup (including WAL) under `~/.msty-admin/backups/` and refuse while Msty Studio is running against the live database. Tests use fixture copies, never the live DB.
|
|
188
191
|
- `query_local_ai_service` is allow-listed (tags, version, show, chat). Pull and create go through `install_model` and `set_model_settings`, which also need `confirm=true`.
|
|
189
192
|
- Calibration and Bloom history live under `~/.msty-admin/`, not in Studio.
|
|
190
193
|
- Frontier needs `CURSOR_API_KEY` for Cursor, `XAI_API_KEY` for Grok, or `ANTHROPIC_API_KEY` for Claude. Keys stay in Msty's toolbox environment and never belong in this repository. In ask mode the Cursor agent does not send mail, move or delete files, or use trading tools.
|
|
@@ -215,7 +218,7 @@ If you already have Python 3.10+ as `python3`, `python3 -m venv .venv` is enough
|
|
|
215
218
|
|
|
216
219
|
If `pip install msty-admin-mcp` cannot find the package, install the release straight from GitHub:
|
|
217
220
|
```bash
|
|
218
|
-
pip install "msty-admin-mcp @ git+https://github.com/M-Pineapple/msty-admin-mcp@v6.2.
|
|
221
|
+
pip install "msty-admin-mcp @ git+https://github.com/M-Pineapple/msty-admin-mcp@v6.2.2"
|
|
219
222
|
```
|
|
220
223
|
|
|
221
224
|
### With HTTP Transport
|
|
@@ -321,14 +324,14 @@ Msty Studio Desktop
|
|
|
321
324
|
↓
|
|
322
325
|
|
|
323
326
|
MCP Server (stdio / HTTP)
|
|
324
|
-
├── Phase 1: Foundational (
|
|
327
|
+
├── Phase 1: Foundational (5)
|
|
325
328
|
├── Phase 2: Configuration (5)
|
|
326
|
-
├── Phase 3: Service Integration (
|
|
329
|
+
├── Phase 3: Service Integration (9)
|
|
327
330
|
├── Phase 4: Intelligence (5)
|
|
328
331
|
├── Phase 5: Calibration (5)
|
|
329
332
|
├── Phase 6: Bloom Evaluation (6)
|
|
330
333
|
├── Phase 7: Studio Inventory (15)
|
|
331
|
-
├── Phase 8: Nexus Bridge (
|
|
334
|
+
├── Phase 8: Nexus Bridge (3)
|
|
332
335
|
└── Phase 9: Frontier handoff (1)
|
|
333
336
|
```
|
|
334
337
|
|
|
@@ -340,7 +343,7 @@ A local model does the ordinary work. When a question is past it, that model cal
|
|
|
340
343
|
|
|
341
344
|
Msty Studio has no hook API. `escalate_if_needed` and the "Local with frontier escalation" persona are the honest equivalent: the local model must emit a real tool call.
|
|
342
345
|
|
|
343
|
-
Use a **separate one-tool server** for the local-model chat. The full admin server has
|
|
346
|
+
Use a **separate one-tool server** for the local-model chat. The full admin server has 54 tools. A small model will call those other tools (GitHub, search, schema, and so on) instead of waiting for the answer.
|
|
344
347
|
|
|
345
348
|
### Fresh install
|
|
346
349
|
|
|
@@ -391,35 +394,34 @@ The admin server still has the Studio inventory tools. Add the Frontier server a
|
|
|
391
394
|
|
|
392
395
|
---
|
|
393
396
|
|
|
394
|
-
## Tools summary (
|
|
397
|
+
## Tools summary (54 in total)
|
|
395
398
|
|
|
396
|
-
### Phase 1: Foundational (
|
|
397
|
-
- `
|
|
399
|
+
### Phase 1: Foundational (5)
|
|
400
|
+
- `get_msty_installation`: app, version, DB path, ports
|
|
398
401
|
- `read_msty_database`: `stats` / `tables` / read-only SQL
|
|
399
402
|
- In read-only SQL, credential columns (key, token, secret, password, auth and header names, URL, config/JSON and command-line columns) always read as NULL. Secrets typed into arbitrary free-text columns, such as a chat message or a note, are out of scope for this tool.
|
|
400
403
|
- `list_configured_tools`: Toolbox MCP tools
|
|
401
404
|
- `get_model_providers`: services and Studio providers (keys redacted)
|
|
402
|
-
- `
|
|
403
|
-
- `get_server_status`: MCP status
|
|
405
|
+
- `get_status`: MCP, install and local service health. `scope` is `all`, `server`, `install` or `services`
|
|
404
406
|
|
|
405
407
|
### Phase 2: Configuration (5)
|
|
406
408
|
- `export_tool_config`: export a tool by name/id
|
|
407
409
|
- `sync_claude_preferences`: Claude to Msty delta report
|
|
408
|
-
- `generate_persona`: persona JSON pack. SQLite insert needs `confirm=true
|
|
410
|
+
- `generate_persona`: persona JSON pack. SQLite insert needs `confirm=true`, `MSTY_ALLOW_STUDIO_WRITES=1` and a detected Studio 2.4 to 2.9.x, so it is refused on Windows and Linux
|
|
409
411
|
- `import_tool_config`: JSON pack for Toolbox. Never writes the Studio database
|
|
410
412
|
- `import_studio_pack`: tools, toolsets and skills stay in the JSON pack. Personas and prompts need the env gate
|
|
411
413
|
|
|
412
|
-
### Phase 3: Service Integration (
|
|
413
|
-
- `
|
|
414
|
-
- `
|
|
414
|
+
### Phase 3: Service Integration (9)
|
|
415
|
+
- `list_models`: Local AI, MLX, llama.cpp, Vibe and Nexus. `backend` defaults to `all`
|
|
416
|
+
- `query_local_ai_service` (allow-listed)
|
|
417
|
+
- `chat_with_model`: Local AI, MLX or llama.cpp. `backend` defaults to `local_ai`
|
|
418
|
+
- `get_hardware_profile`, `recommend_model`
|
|
415
419
|
- `install_model`, `set_model_settings`
|
|
416
|
-
- `list_mlx_models`, `chat_with_mlx_model`
|
|
417
|
-
- `list_llamacpp_models`, `chat_with_llamacpp_model`
|
|
418
420
|
- `get_vibe_proxy_status`, `query_vibe_proxy`
|
|
419
421
|
|
|
420
422
|
### Phase 4: Intelligence (5)
|
|
421
423
|
- `get_model_performance_metrics`: from Studio `insightsLanguageModelUsage`
|
|
422
|
-
- `
|
|
424
|
+
- `get_conversation_patterns`
|
|
423
425
|
- `compare_model_responses`
|
|
424
426
|
- `optimise_knowledge_stacks`: live Next Gen / draft / compose status
|
|
425
427
|
- `suggest_persona_improvements`
|
|
@@ -440,8 +442,8 @@ The admin server still has the Studio inventory tools. Add the Frontier server a
|
|
|
440
442
|
- `list_context_studio`, `list_agent_plans`
|
|
441
443
|
- `get_studio_entity` (plural keys such as `personas`, plus singular aliases such as `persona`), `get_schema_migrations`, `export_workflow_pack`
|
|
442
444
|
|
|
443
|
-
### Phase 8: Nexus Bridge (
|
|
444
|
-
- `
|
|
445
|
+
### Phase 8: Nexus Bridge (3)
|
|
446
|
+
- `get_nexus`, `query_nexus`, `get_insights_usage`
|
|
445
447
|
|
|
446
448
|
### Phase 9: Frontier handoff (1)
|
|
447
449
|
- `ask_frontier`: hand one question to Cursor (default), Grok, or Claude and return the answer in the Msty chat. Use the one-tool server (`msty-frontier` or `python -m src.frontier_main`) for a local-model chat. See [Hybrid local model and Cursor agent](#hybrid-local-model-and-cursor-agent).
|
|
@@ -478,10 +480,10 @@ v6 ships unit tests for path resolution, read-only SQL guards, redaction, invent
|
|
|
478
480
|
**A**: No. v6 targets Studio 2.9+ (works on 2.4+ layouts when the File System DB is present). Use v4.x for older process-based detection.
|
|
479
481
|
|
|
480
482
|
### Q: Does this write to the Studio database?
|
|
481
|
-
**A**: Inventory and analytics stay read-only. Write tools always save a JSON pack under `~/.msty-admin/imports/`. Tools, toolsets and skills are import-file only. Personas and prompts insert into Studio SQLite only with `confirm=true
|
|
483
|
+
**A**: Inventory and analytics stay read-only. Write tools always save a JSON pack under `~/.msty-admin/imports/`. Tools, toolsets and skills are import-file only. Personas and prompts insert into Studio SQLite only with `confirm=true`, `MSTY_ALLOW_STUDIO_WRITES=1` in the MCP server environment and a detected Studio 2.4 to 2.9.x, after a timestamped SQLite backup that includes WAL, and they refuse while Msty Studio is running against the live database. Quit Studio first, or import the JSON pack in Persona Studio or Toolbox. On Windows and Linux the Studio version cannot be read yet, so these writes are refused there.
|
|
482
484
|
|
|
483
485
|
### Q: What is the Nexus integration?
|
|
484
|
-
**A**: [Msty Nexus](https://msty.ai/nexus/) is the local runtime/gateway.
|
|
486
|
+
**A**: [Msty Nexus](https://msty.ai/nexus/) is the local runtime/gateway. `get_nexus` detects it. `list_models` with `backend=nexus` lists models on its OpenAI-compatible endpoint (`MSTY_NEXUS_PORT`).
|
|
485
487
|
|
|
486
488
|
---
|
|
487
489
|
|
|
@@ -484,7 +484,7 @@ Or add it to your Claude Desktop MCP configuration:
|
|
|
484
484
|
**Fix**: Run a quick chat with the model first to load it into memory:
|
|
485
485
|
|
|
486
486
|
```
|
|
487
|
-
|
|
487
|
+
chat_with_model(model="qwen2.5:7b", messages=[{"role": "user", "content": "hello"}], backend="local_ai")
|
|
488
488
|
```
|
|
489
489
|
|
|
490
490
|
Then run the evaluation.
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "msty-admin-mcp"
|
|
7
|
-
version = "6.2.
|
|
8
|
-
description = "Comprehensive MCP server for administering Msty Studio Desktop 2.9+ with
|
|
7
|
+
version = "6.2.2"
|
|
8
|
+
description = "Comprehensive MCP server for administering Msty Studio Desktop 2.9+ with 54 tools, hardware-aware model install, Studio writes with confirm, insights analytics, Nexus bridge, Bloom evaluation, and a Cursor/Grok/Claude handoff for local models"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = {text = "MIT"}
|
|
@@ -13,7 +13,14 @@ import time
|
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
from typing import Any, Dict, List, Optional, Sequence, Tuple
|
|
15
15
|
|
|
16
|
-
from src.paths import
|
|
16
|
+
from src.paths import (
|
|
17
|
+
LAYOUT_UNKNOWN,
|
|
18
|
+
LAYOUT_UNSUPPORTED,
|
|
19
|
+
UnsupportedStudioLayout,
|
|
20
|
+
detect_msty_installation,
|
|
21
|
+
unknown_version_read_warning,
|
|
22
|
+
unsupported_layout_message,
|
|
23
|
+
)
|
|
17
24
|
|
|
18
25
|
# Only allow SELECT / WITH / PRAGMA for arbitrary query tool
|
|
19
26
|
_SAFE_SQL = re.compile(r"^\s*(SELECT|WITH|PRAGMA)\b", re.IGNORECASE | re.DOTALL)
|
|
@@ -393,11 +400,32 @@ def names_credential_column(query: str) -> bool:
|
|
|
393
400
|
return False
|
|
394
401
|
|
|
395
402
|
|
|
403
|
+
def with_read_warning(payload: Any) -> Any:
|
|
404
|
+
"""Add a stale-copy warning to a read result when the Studio version is unknown."""
|
|
405
|
+
if not isinstance(payload, dict):
|
|
406
|
+
return payload
|
|
407
|
+
try:
|
|
408
|
+
status = detect_msty_installation().layout_status
|
|
409
|
+
except Exception:
|
|
410
|
+
status = LAYOUT_UNKNOWN
|
|
411
|
+
if status == LAYOUT_UNKNOWN:
|
|
412
|
+
payload = dict(payload)
|
|
413
|
+
payload["warning"] = unknown_version_read_warning()
|
|
414
|
+
return payload
|
|
415
|
+
|
|
416
|
+
|
|
396
417
|
def get_database_path(explicit: Optional[str] = None) -> Optional[Path]:
|
|
418
|
+
"""Resolve the Studio SQLite path for reads.
|
|
419
|
+
|
|
420
|
+
Raises UnsupportedStudioLayout on Studio 3.x, even for an explicit path,
|
|
421
|
+
so no Studio-storage read runs against a layout this release cannot read.
|
|
422
|
+
"""
|
|
423
|
+
install = detect_msty_installation()
|
|
424
|
+
if install.layout_status == LAYOUT_UNSUPPORTED:
|
|
425
|
+
raise UnsupportedStudioLayout(unsupported_layout_message(install.version))
|
|
397
426
|
if explicit:
|
|
398
427
|
path = Path(explicit)
|
|
399
428
|
return path if path.exists() else None
|
|
400
|
-
install = detect_msty_installation()
|
|
401
429
|
if install.database_path:
|
|
402
430
|
return Path(install.database_path)
|
|
403
431
|
return None
|
|
@@ -70,6 +70,39 @@ def leftover_scheme(name: str) -> bool:
|
|
|
70
70
|
return "://" in _strip_uri_schemes((name or "").strip().lower())
|
|
71
71
|
|
|
72
72
|
|
|
73
|
+
def validate_pull_source(name: str) -> Optional[str]:
|
|
74
|
+
"""Refuse pull names that point at a host other than Ollama or hf.co/.
|
|
75
|
+
|
|
76
|
+
Bare names (llama3.2:3b) and registry.ollama.ai/... are allowed. Hugging
|
|
77
|
+
Face paths must start with hf.co/. Any other dotted first path segment is
|
|
78
|
+
treated as a host and refused.
|
|
79
|
+
"""
|
|
80
|
+
text = _strip_uri_schemes((name or "").strip().lower())
|
|
81
|
+
if not text:
|
|
82
|
+
return "model is empty"
|
|
83
|
+
if text.startswith("hf.co/"):
|
|
84
|
+
rest = text[6:]
|
|
85
|
+
if not rest or rest.startswith("/") or ".." in rest:
|
|
86
|
+
return "hf.co/ model path is empty or unsafe"
|
|
87
|
+
return None
|
|
88
|
+
if _REGISTRY_HOST_RE.match(text):
|
|
89
|
+
return None
|
|
90
|
+
if text.count("/") >= 2:
|
|
91
|
+
return (
|
|
92
|
+
"install_model only pulls bare Ollama names (registry.ollama.ai) "
|
|
93
|
+
"or hf.co/ paths. Names with three or more parts must start with "
|
|
94
|
+
"registry.ollama.ai/ or hf.co/."
|
|
95
|
+
)
|
|
96
|
+
if "/" in text:
|
|
97
|
+
host = text.split("/", 1)[0]
|
|
98
|
+
if "." in host or ":" in host or "[" in host or host == "localhost":
|
|
99
|
+
return (
|
|
100
|
+
"install_model only pulls bare Ollama names (registry.ollama.ai) "
|
|
101
|
+
f"or hf.co/ paths. Refused host {host!r}."
|
|
102
|
+
)
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
|
|
73
106
|
def normalise_model_name(name: str) -> str:
|
|
74
107
|
"""Lowercase, strip scheme and registry/library prefixes, add :latest when untagged."""
|
|
75
108
|
text = _strip_uri_schemes((name or "").strip().lower())
|
|
@@ -204,6 +237,9 @@ def pull_model(
|
|
|
204
237
|
name_error = validate_model_name(cleaned, "model")
|
|
205
238
|
if name_error:
|
|
206
239
|
return {"success": False, "error": name_error, "wrote": False}
|
|
240
|
+
source_error = validate_pull_source(cleaned)
|
|
241
|
+
if source_error:
|
|
242
|
+
return {"success": False, "error": source_error, "wrote": False}
|
|
207
243
|
if service.strip().lower() in {"mlx", "llamacpp", "llama.cpp"}:
|
|
208
244
|
return {
|
|
209
245
|
"success": False,
|
|
@@ -329,8 +365,11 @@ def create_variant(
|
|
|
329
365
|
"""POST /api/create with structured fields. Modelfile text is preview only."""
|
|
330
366
|
base = (base_model or "").strip()
|
|
331
367
|
variant = (variant_name or "").strip()
|
|
332
|
-
name_error =
|
|
333
|
-
|
|
368
|
+
name_error = (
|
|
369
|
+
validate_model_name(base, "base_model")
|
|
370
|
+
or validate_model_name(variant, "variant_name")
|
|
371
|
+
or validate_pull_source(base)
|
|
372
|
+
or validate_pull_source(variant)
|
|
334
373
|
)
|
|
335
374
|
if name_error:
|
|
336
375
|
return {"success": False, "error": name_error, "wrote": False}
|