@thlg057/mo5-rag-mcp 1.0.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/LICENSE +21 -0
- package/README.md +147 -0
- package/index.js +592 -0
- package/package.json +32 -0
- package/scripts/fd2sd.py +59 -0
- package/scripts/makefd.py +407 -0
- package/scripts/png2mo5.py +478 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 thlg057
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# MO5 MCP Server (RAG Connector)
|
|
2
|
+
|
|
3
|
+
This MCP server (Model Context Protocol) acts as a bridge between modern AI agents (Claude Desktop, Augment, Cursor) and the Thomson MO5 ecosystem.
|
|
4
|
+
It allows access to an expert knowledge base and manipulation of MO5 heritage files.
|
|
5
|
+
|
|
6
|
+
It provides semantic search tools, documentation resources, and expert prompts to facilitate development around the Thomson MO5 microcomputer.
|
|
7
|
+
|
|
8
|
+
## ๐๏ธ MO5 Development Ecosystem
|
|
9
|
+
|
|
10
|
+
This server is part of a complete toolchain for modern 6809 development:
|
|
11
|
+
|
|
12
|
+
- **SDK MO5** : https://github.com/thlg057/sdk_mo5
|
|
13
|
+
C library optimized for CMOC.
|
|
14
|
+
- **MO5 Project Template** : https://github.com/thlg057/mo5_template
|
|
15
|
+
Project template with automated Makefile.
|
|
16
|
+
- **This MCP Server** : The assistant that connects everything, answers technical questions, and generates assets.
|
|
17
|
+
|
|
18
|
+
## ๐ RAG Infrastructure (Artificial Intelligence)
|
|
19
|
+
|
|
20
|
+
The server relies on a Retrieval-Augmented Generation architecture to provide accurate answers based on real technical documentation.
|
|
21
|
+
|
|
22
|
+
## ๐ Features
|
|
23
|
+
|
|
24
|
+
- **Semantic Search**: Intelligent search within the MO5 technical documentation.
|
|
25
|
+
- **Resources Explorer**: Direct access to the list of documents, tags, and indexing status.
|
|
26
|
+
- **Expert Prompt**: A preconfigured "Expert Thomson MO5" mode for the AI.
|
|
27
|
+
- **Build Tools**: Generate bootable `.fd` disk images, convert `.fd` to `.sd` for SDDrive, and convert PNG assets to C sprite headers.
|
|
28
|
+
- **Robustness**: Native handling of timeouts (30s) and retry policy for unstable network environments (NAS).
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## ๐ Public MO5 RAG Server
|
|
33
|
+
|
|
34
|
+
The MO5 RAG server is now **publicly deployed and accessible on the Internet**.
|
|
35
|
+
|
|
36
|
+
๐ https://retrocomputing-ai.cloud/
|
|
37
|
+
|
|
38
|
+
This MCP server is designed to work **out of the box** with the public RAG instance.
|
|
39
|
+
|
|
40
|
+
For most users, this means:
|
|
41
|
+
- no RAG server to install
|
|
42
|
+
- no Docker setup
|
|
43
|
+
- no local infrastructure to maintain
|
|
44
|
+
|
|
45
|
+
Simply configure the MCP server to point to the public URL and start using it from your coding agent.
|
|
46
|
+
|
|
47
|
+
Self-hosting a RAG server is still possible if you want to:
|
|
48
|
+
- experiment with the internals
|
|
49
|
+
- customize the knowledge base
|
|
50
|
+
- run everything offline
|
|
51
|
+
|
|
52
|
+
But it is no longer required for normal usage.
|
|
53
|
+
|
|
54
|
+
## ๐ ๏ธ Requirements
|
|
55
|
+
|
|
56
|
+
- Node.js (v18 or higher)
|
|
57
|
+
- Python 3 with [Pillow](https://pypi.org/project/Pillow/) (`pip install Pillow`) โ required only for the `png_to_mo5_sprite` tool.
|
|
58
|
+
|
|
59
|
+
The official public MO5 RAG server is available at: https://retrocomputing-ai.cloud/
|
|
60
|
+
|
|
61
|
+
You can use this public instance directly, there is no need to host your own RAG server.
|
|
62
|
+
|
|
63
|
+
## ๐ฆ Installation & Setup
|
|
64
|
+
|
|
65
|
+
### Option 1 โ Via npx (recommended, no installation required)
|
|
66
|
+
|
|
67
|
+
Configure your agent to run the server directly from npm. No `git clone` or `npm install` needed.
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"mo5-server": {
|
|
73
|
+
"command": "npx",
|
|
74
|
+
"args": [
|
|
75
|
+
"-y",
|
|
76
|
+
"@thlg057/mo5-rag-mcp"
|
|
77
|
+
],
|
|
78
|
+
"env": {
|
|
79
|
+
"RAG_BASE_URL": "https://retrocomputing-ai.cloud"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Option 2 โ From source
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git clone https://github.com/thlg057/mo5-mcp-server.git
|
|
90
|
+
cd mo5-mcp-server
|
|
91
|
+
npm install
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then configure your agent:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"mcpServers": {
|
|
99
|
+
"mo5-rag": {
|
|
100
|
+
"command": "node",
|
|
101
|
+
"args": ["C:\\your\\path\\to\\mo5-mcp-server\\index.js"],
|
|
102
|
+
"env": {
|
|
103
|
+
"RAG_BASE_URL": "https://retrocomputing-ai.cloud"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
> Note for Windows: Use double backslashes `\\` or single slashes `/` in the path to avoid JSON formatting errors.
|
|
111
|
+
|
|
112
|
+
## ๐ค Integration into an Agent (e.g., Augment, Claude Desktop)
|
|
113
|
+
|
|
114
|
+
Add one of the configurations above to your MCP configuration file (e.g., `augment_config.json` or `claude_desktop_config.json`).
|
|
115
|
+
|
|
116
|
+
## ๐งช Local Testing
|
|
117
|
+
|
|
118
|
+
It is recommended to test the server before integration to ensure proper communication with the RAG API.
|
|
119
|
+
|
|
120
|
+
### Via the MCP Inspector (Recommended)
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Windows (PowerShell)
|
|
124
|
+
$env:RAG_BASE_URL="https://retrocomputing-ai.cloud"; npx @modelcontextprotocol/inspector node index.js
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Via Command Line
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
echo {"jsonrpc":"2.0","method":"tools/list","id":1} | node index.js
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## ๐ Project Structure
|
|
134
|
+
|
|
135
|
+
- `index.js`: Main source code of the MCP server.
|
|
136
|
+
- `scripts/`: Python scripts for build tools (`makefd.py`, `fd2sd.py`, `png2mo5.py`).
|
|
137
|
+
- `package.json`: Dependencies (MCP SDK).
|
|
138
|
+
- `.gitignore`: Ignores `node_modules` and environment files.
|
|
139
|
+
|
|
140
|
+
## ๐๏ธ MO5 Development Ecosystem
|
|
141
|
+
|
|
142
|
+
This server is part of a suite of tools designed to modernize development on the Thomson MO5:
|
|
143
|
+
|
|
144
|
+
- **[SDK MO5](https://github.com/thlg057/sdk_mo5)**: A C library for CMOC that provides easy access to the hardware (video, keyboard, monitor) without writing assembly.
|
|
145
|
+
- **[Project Template](https://github.com/thlg057/mo5_template)**: A ready-to-use project skeleton with an automated Makefile that compiles, links the SDK, and generates a bootable disk image in a single command. Also includes this MCP server as a dev dependency so your coding agent has full context and build capabilities out of the box.
|
|
146
|
+
|
|
147
|
+
This project is part of the digital preservation ecosystem for the Thomson MO5 microcomputer.
|