open-edison 0.1.10__py3-none-any.whl
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.
- open_edison-0.1.10.dist-info/METADATA +332 -0
- open_edison-0.1.10.dist-info/RECORD +17 -0
- open_edison-0.1.10.dist-info/WHEEL +4 -0
- open_edison-0.1.10.dist-info/entry_points.txt +3 -0
- open_edison-0.1.10.dist-info/licenses/LICENSE +674 -0
- src/__init__.py +11 -0
- src/__main__.py +10 -0
- src/cli.py +274 -0
- src/config.py +224 -0
- src/frontend_dist/assets/index-CKkid2y-.js +51 -0
- src/frontend_dist/assets/index-CRxojymD.css +1 -0
- src/frontend_dist/index.html +21 -0
- src/mcp_manager.py +137 -0
- src/middleware/data_access_tracker.py +510 -0
- src/middleware/session_tracking.py +477 -0
- src/server.py +560 -0
- src/single_user_mcp.py +403 -0
@@ -0,0 +1,332 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: open-edison
|
3
|
+
Version: 0.1.10
|
4
|
+
Summary: Open-source MCP security, aggregation, and monitoring. Single-user, self-hosted MCP proxy.
|
5
|
+
Author-email: Hugo Berg <hugo@edison.watch>
|
6
|
+
License-File: LICENSE
|
7
|
+
Requires-Python: >=3.12
|
8
|
+
Requires-Dist: aiohttp>=3.12.14
|
9
|
+
Requires-Dist: aiosqlite>=0.20.0
|
10
|
+
Requires-Dist: fastapi>=0.116.1
|
11
|
+
Requires-Dist: fastmcp>=2.10.5
|
12
|
+
Requires-Dist: httpx>=0.28.1
|
13
|
+
Requires-Dist: loguru>=0.7.3
|
14
|
+
Requires-Dist: python-dotenv>=1.0.1
|
15
|
+
Requires-Dist: pyyaml>=6.0.2
|
16
|
+
Requires-Dist: sqlalchemy>=2.0.41
|
17
|
+
Requires-Dist: starlette>=0.47.1
|
18
|
+
Requires-Dist: uvicorn>=0.35.0
|
19
|
+
Provides-Extra: dev
|
20
|
+
Requires-Dist: pytest-asyncio>=1.0.0; extra == 'dev'
|
21
|
+
Requires-Dist: pytest>=8.3.3; extra == 'dev'
|
22
|
+
Requires-Dist: ruff>=0.12.3; extra == 'dev'
|
23
|
+
Description-Content-Type: text/markdown
|
24
|
+
|
25
|
+
# Open Edison
|
26
|
+
|
27
|
+
Open-source MCP security gateway that prevents data exfiltration—via direct access or tool chaining—with full monitoring for local single‑user deployments. Provides core functionality of <https://edison.watch> for local, single-user use.
|
28
|
+
|
29
|
+
Run locally with uvx: `uvx open-edison --config-dir ~/edison-config`
|
30
|
+
|
31
|
+
## Features
|
32
|
+
|
33
|
+
- **Single-user MCP proxy** - No multi-user complexity, just a simple proxy for your MCP servers
|
34
|
+
- **JSON configuration** - Easy to configure and manage your MCP servers
|
35
|
+
- **Simple local frontend** - Track and monitor your MCP interactions, servers, and sessions.
|
36
|
+
- **Session tracking** - Track and monitor your MCP interactions
|
37
|
+
- **Simple API** - REST API for managing MCP servers and proxying requests
|
38
|
+
- **Docker support** - Run in a container for easy deployment
|
39
|
+
|
40
|
+
## Quick Start
|
41
|
+
|
42
|
+
### Install from PyPI
|
43
|
+
|
44
|
+
#### Prerequisites
|
45
|
+
|
46
|
+
- Pipx/uvx
|
47
|
+
|
48
|
+
```bash
|
49
|
+
# Using uvx
|
50
|
+
uvx open-edison --help
|
51
|
+
|
52
|
+
# Using pipx
|
53
|
+
pipx install open-edison
|
54
|
+
open-edison --help
|
55
|
+
```
|
56
|
+
|
57
|
+
Run with a custom config directory:
|
58
|
+
|
59
|
+
```bash
|
60
|
+
open-edison run --config-dir ~/edison-config
|
61
|
+
# or via environment variable
|
62
|
+
OPEN_EDISON_CONFIG_DIR=~/edison-config open-edison run
|
63
|
+
```
|
64
|
+
|
65
|
+
### Run from source
|
66
|
+
|
67
|
+
1. Clone the repository:
|
68
|
+
|
69
|
+
```bash
|
70
|
+
git clone https://github.com/GatlingX/open-edison.git
|
71
|
+
cd open-edison
|
72
|
+
```
|
73
|
+
|
74
|
+
2. Set up the project:
|
75
|
+
|
76
|
+
```bash
|
77
|
+
make setup
|
78
|
+
```
|
79
|
+
|
80
|
+
3. Edit `config.json` to configure your MCP servers:
|
81
|
+
|
82
|
+
```json
|
83
|
+
{
|
84
|
+
"server": {
|
85
|
+
"host": "localhost",
|
86
|
+
"port": 3000,
|
87
|
+
"api_key": "your-secure-api-key"
|
88
|
+
},
|
89
|
+
"mcp_servers": [
|
90
|
+
{
|
91
|
+
"name": "filesystem",
|
92
|
+
"command": "uvx",
|
93
|
+
"args": ["mcp-server-filesystem", "/path/to/directory"],
|
94
|
+
"enabled": true
|
95
|
+
}
|
96
|
+
]
|
97
|
+
}
|
98
|
+
```
|
99
|
+
|
100
|
+
4. Run the server:
|
101
|
+
|
102
|
+
```bash
|
103
|
+
make run
|
104
|
+
# or, from the installed package
|
105
|
+
open-edison run
|
106
|
+
```
|
107
|
+
|
108
|
+
The server will be available at `http://localhost:3000`.
|
109
|
+
|
110
|
+
### Run with Docker
|
111
|
+
|
112
|
+
```bash
|
113
|
+
# After cloning the repo
|
114
|
+
make run_docker
|
115
|
+
```
|
116
|
+
|
117
|
+
The MCP server will be available at `http://localhost:3000` and the api + frontend at `http://localhost:3001`.
|
118
|
+
|
119
|
+
## MCP Connection
|
120
|
+
|
121
|
+
Connect any MCP client to Open Edison:
|
122
|
+
|
123
|
+
```bash
|
124
|
+
npx -y mcp-remote http://localhost:3000/mcp/ --http-only --header "Authorization: Bearer your-api-key"
|
125
|
+
```
|
126
|
+
|
127
|
+
Or add to your MCP client config:
|
128
|
+
|
129
|
+
```json
|
130
|
+
{
|
131
|
+
"mcpServers": {
|
132
|
+
"open-edison": {
|
133
|
+
"command": "npx",
|
134
|
+
"args": ["-y", "mcp-remote", "http://localhost:3000/mcp/", "--http-only", "--header", "Authorization: Bearer your-api-key"]
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
```
|
139
|
+
|
140
|
+
## Usage
|
141
|
+
|
142
|
+
### API Endpoints
|
143
|
+
|
144
|
+
Api is on port 3001 (or configured MCP server port + 1).
|
145
|
+
|
146
|
+
- `GET /health` - Health check
|
147
|
+
- `GET /mcp/status` - Get status of configured MCP servers
|
148
|
+
- `POST /mcp/{server_name}/start` - Start a specific MCP server
|
149
|
+
- `POST /mcp/{server_name}/stop` - Stop a specific MCP server
|
150
|
+
- `POST /mcp/call` - Proxy MCP calls to running servers
|
151
|
+
- `GET /sessions` - Get session logs (coming soon)
|
152
|
+
|
153
|
+
All endpoints except `/health` require the `Authorization: Bearer <api_key>` header.
|
154
|
+
|
155
|
+
## Development
|
156
|
+
|
157
|
+
```bash
|
158
|
+
# Install dependencies
|
159
|
+
make sync
|
160
|
+
|
161
|
+
# Run with auto-reload
|
162
|
+
make dev
|
163
|
+
|
164
|
+
# Run tests
|
165
|
+
make test
|
166
|
+
|
167
|
+
# Lint code
|
168
|
+
make lint
|
169
|
+
|
170
|
+
# Format code
|
171
|
+
make format
|
172
|
+
```
|
173
|
+
|
174
|
+
### Website (Sessions Dashboard)
|
175
|
+
|
176
|
+
A minimal React + Vite frontend is included at `open-edison/frontend/`.
|
177
|
+
|
178
|
+
Run it with a single command from the repo root or via the CLI:
|
179
|
+
|
180
|
+
```bash
|
181
|
+
make website
|
182
|
+
# or
|
183
|
+
open-edison website
|
184
|
+
```
|
185
|
+
|
186
|
+
This will install frontend deps (first run) and start the dev server. Open the URL shown (typically `http://localhost:5173` or `5174`).
|
187
|
+
|
188
|
+
Notes:
|
189
|
+
|
190
|
+
- The dashboard reads session data directly from the SQLite database `edison.db` in the repo root via sql.js.
|
191
|
+
- The Configs tab provides JSON editors (with syntax highlighting) for `config.json`, `tool_permissions.json`, `resource_permissions.json`, and `prompt_permissions.json`.
|
192
|
+
- You can Save changes directly while the dev server is running; writes are constrained to the project root.
|
193
|
+
|
194
|
+
## Docker
|
195
|
+
|
196
|
+
```bash
|
197
|
+
# Build Docker image
|
198
|
+
make docker_build
|
199
|
+
|
200
|
+
# Run in Docker
|
201
|
+
make docker_run
|
202
|
+
```
|
203
|
+
|
204
|
+
## Configuration
|
205
|
+
|
206
|
+
The `config.json` file contains all configuration:
|
207
|
+
|
208
|
+
- `server.host` - Server host (default: localhost)
|
209
|
+
- `server.port` - Server port (default: 3000)
|
210
|
+
- `server.api_key` - API key for authentication
|
211
|
+
- `logging.level` - Log level (DEBUG, INFO, WARNING, ERROR)
|
212
|
+
- `mcp_servers` - Array of MCP server configurations
|
213
|
+
|
214
|
+
Each MCP server configuration includes:
|
215
|
+
|
216
|
+
- `name` - Unique name for the server
|
217
|
+
- `command` - Command to run the MCP server
|
218
|
+
- `args` - Arguments for the command
|
219
|
+
- `env` - Environment variables (optional)
|
220
|
+
- `enabled` - Whether to auto-start this server
|
221
|
+
|
222
|
+
## Security & Permissions System
|
223
|
+
|
224
|
+
Open Edison includes a comprehensive security monitoring system that tracks the "lethal trifecta" of AI agent risks:
|
225
|
+
|
226
|
+
1. **Private data access** - Access to sensitive local files/data
|
227
|
+
2. **Untrusted content exposure** - Exposure to external/web content
|
228
|
+
3. **External communication** - Ability to write/send data externally
|
229
|
+
|
230
|
+
The system monitors these risks across **tools**, **resources**, and **prompts** using separate configuration files.
|
231
|
+
|
232
|
+
### Tool Permissions (`tool_permissions.json`)
|
233
|
+
|
234
|
+
Defines security classifications for MCP tools. Each tool is classified with three boolean flags:
|
235
|
+
|
236
|
+
```json
|
237
|
+
{
|
238
|
+
"filesystem_read_file": {
|
239
|
+
"write_operation": false,
|
240
|
+
"read_private_data": true,
|
241
|
+
"read_untrusted_public_data": false
|
242
|
+
},
|
243
|
+
"sqlite_create_record": {
|
244
|
+
"write_operation": true,
|
245
|
+
"read_private_data": true,
|
246
|
+
"read_untrusted_public_data": false
|
247
|
+
}
|
248
|
+
}
|
249
|
+
```
|
250
|
+
|
251
|
+
### Resource Permissions (`resource_permissions.json`)
|
252
|
+
|
253
|
+
Defines security classifications for resource access patterns. Currently empty - add classifications as needed:
|
254
|
+
|
255
|
+
```json
|
256
|
+
{
|
257
|
+
"_metadata": {
|
258
|
+
"description": "Resource security classifications for Open Edison data access tracker",
|
259
|
+
"last_updated": "2025-08-07"
|
260
|
+
},
|
261
|
+
"file:*": {
|
262
|
+
"write_operation": false,
|
263
|
+
"read_private_data": true,
|
264
|
+
"read_untrusted_public_data": false
|
265
|
+
},
|
266
|
+
"http:*": {
|
267
|
+
"write_operation": false,
|
268
|
+
"read_private_data": false,
|
269
|
+
"read_untrusted_public_data": true
|
270
|
+
},
|
271
|
+
"database:*": {
|
272
|
+
"write_operation": false,
|
273
|
+
"read_private_data": true,
|
274
|
+
"read_untrusted_public_data": false
|
275
|
+
}
|
276
|
+
}
|
277
|
+
```
|
278
|
+
|
279
|
+
### Prompt Permissions (`prompt_permissions.json`)
|
280
|
+
|
281
|
+
Defines security classifications for prompt types. Currently empty - add classifications as needed:
|
282
|
+
|
283
|
+
```json
|
284
|
+
{
|
285
|
+
"_metadata": {
|
286
|
+
"description": "Prompt security classifications for Open Edison data access tracker",
|
287
|
+
"last_updated": "2025-08-07"
|
288
|
+
},
|
289
|
+
"system": {
|
290
|
+
"write_operation": false,
|
291
|
+
"read_private_data": false,
|
292
|
+
"read_untrusted_public_data": false
|
293
|
+
},
|
294
|
+
"external_prompt": {
|
295
|
+
"write_operation": false,
|
296
|
+
"read_private_data": false,
|
297
|
+
"read_untrusted_public_data": true
|
298
|
+
},
|
299
|
+
"prompt:file:*": {
|
300
|
+
"write_operation": false,
|
301
|
+
"read_private_data": true,
|
302
|
+
"read_untrusted_public_data": false
|
303
|
+
}
|
304
|
+
}
|
305
|
+
```
|
306
|
+
|
307
|
+
### Wildcard Patterns
|
308
|
+
|
309
|
+
All permission types support wildcard patterns:
|
310
|
+
|
311
|
+
- **Tools**: `server_name/*` (e.g., `filesystem/*` matches all filesystem tools)
|
312
|
+
- **Resources**: `scheme:*` (e.g., `file:*` matches all file resources)
|
313
|
+
- **Prompts**: `type:*` (e.g., `template:*` matches all template prompts)
|
314
|
+
|
315
|
+
### Security Monitoring
|
316
|
+
|
317
|
+
**All items must be explicitly configured** - unknown tools/resources/prompts will be rejected for security.
|
318
|
+
|
319
|
+
Use the `get_security_status` tool to monitor your session's current risk level and see which capabilities have been accessed. When the lethal trifecta is achieved (all three risk flags set), further potentially dangerous operations are blocked.
|
320
|
+
|
321
|
+
## Documentation
|
322
|
+
|
323
|
+
📚 **Complete documentation available in [`docs/`](docs/)**
|
324
|
+
|
325
|
+
- **[Getting Started](docs/quick-reference/config_quick_start.md)** - Quick setup guide
|
326
|
+
- **[Configuration](docs/core/configuration.md)** - Complete configuration reference
|
327
|
+
- **[API Reference](docs/quick-reference/api_reference.md)** - REST API documentation
|
328
|
+
- **[Development Guide](docs/development/development_guide.md)** - Contributing and development
|
329
|
+
|
330
|
+
## License
|
331
|
+
|
332
|
+
GPL-3.0 License - see [LICENSE](LICENSE) for details.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
src/__init__.py,sha256=QWeZdjAm2D2B0eWhd8m2-DPpWvIP26KcNJxwEoU1oEQ,254
|
2
|
+
src/__main__.py,sha256=kQsaVyzRa_ESC57JpKDSQJAHExuXme0rM5beJsYxFeA,161
|
3
|
+
src/cli.py,sha256=ketV-e9oQMVlLBjZR7YbK33XkEfqxPyzWqYkS1YwqYc,9968
|
4
|
+
src/config.py,sha256=klWrNycPxzVt9wPhiNbjXMkB4bHZplenfWDx-3UtQac,7120
|
5
|
+
src/mcp_manager.py,sha256=VpRdVMy1WLegC-gBnyTcBMcKzQsdIn4JIWuHf7Q40hg,4442
|
6
|
+
src/server.py,sha256=7hwhutP0qZ_mjZfs6jcB-UNe_VyibFKl6hPyHWoa-ns,22896
|
7
|
+
src/single_user_mcp.py,sha256=ue5UnC0nfmuLR4z87904WqH7B-0FaACFDWaBNNL7hXE,15259
|
8
|
+
src/frontend_dist/index.html,sha256=CL9uiDUygp5_5_VpsW4WMgYFsMAfVSueYit_vFgX0Qo,673
|
9
|
+
src/frontend_dist/assets/index-CKkid2y-.js,sha256=zaZ7j0nyGkywXAMuCrhZLaSOVqLu7JkQG3wE_8QiFT4,219537
|
10
|
+
src/frontend_dist/assets/index-CRxojymD.css,sha256=kANM9zPkbS5aLrPzePZK0Fbt580I6kNnyFjkFH13HtA,11383
|
11
|
+
src/middleware/data_access_tracker.py,sha256=JkwZdtMCiVU7JJZDd-GhlowW2szMDnXrD95nhxQVXR4,21165
|
12
|
+
src/middleware/session_tracking.py,sha256=rWZh4UBQbqzPh4p6vxdtRwEC1uzq93yjzxcI9LnlRkA,19307
|
13
|
+
open_edison-0.1.10.dist-info/METADATA,sha256=15i5EIVlRNQtBIs3RJTTwiTPXEfF2FYy2a3W2KoBN3g,8834
|
14
|
+
open_edison-0.1.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
open_edison-0.1.10.dist-info/entry_points.txt,sha256=qNAkJcnoTXRhj8J--3PDmXz_TQKdB8H_0C9wiCtDIyA,72
|
16
|
+
open_edison-0.1.10.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
open_edison-0.1.10.dist-info/RECORD,,
|