open-edison 0.1.43__py3-none-any.whl → 0.1.44__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: open-edison
3
- Version: 0.1.43
3
+ Version: 0.1.44
4
4
  Summary: Open-source MCP security, aggregation, and monitoring. Single-user, self-hosted MCP proxy.
5
5
  Author-email: Hugo Berg <hugo@edison.watch>
6
6
  License-File: LICENSE
@@ -17,6 +17,7 @@ Requires-Dist: opentelemetry-exporter-otlp>=1.36.0
17
17
  Requires-Dist: opentelemetry-sdk>=1.36.0
18
18
  Requires-Dist: python-dotenv>=1.0.1
19
19
  Requires-Dist: pyyaml>=6.0.2
20
+ Requires-Dist: questionary>=2.1.1
20
21
  Requires-Dist: sqlalchemy>=2.0.41
21
22
  Requires-Dist: starlette>=0.47.1
22
23
  Requires-Dist: uvicorn>=0.35.0
@@ -72,11 +73,11 @@ curl -fsSL https://raw.githubusercontent.com/Edison-Watch/open-edison/main/curl_
72
73
 
73
74
  Run locally with uvx: `uvx open-edison`
74
75
 
75
- Optionally, import your existing MCP configs from Cursor, VS Code, or Claude Code with:
76
+ Optionally, run the setup wizard to import/configure MCP:
76
77
 
77
78
  ```bash
78
- # From source (no install) — quick one-liner (add --dry-run to preview)
79
- uv run python -m src.mcp_importer.quick_cli --yes
79
+ uv run python -m src.setup_tui.main
80
+ # add --dry-run to preview without writing
80
81
  ```
81
82
 
82
83
  <details>
@@ -131,38 +132,13 @@ OPEN_EDISON_CONFIG_DIR=~/edison-config open-edison run
131
132
  <details>
132
133
  <summary>🔄 Import from Cursor/VS Code/Claude Code</summary>
133
134
 
134
- ### Import from Cursor/VS Code/Claude Code
135
+ Run the interactive setup wizard to detect clients, import servers, and configure your editor:
135
136
 
136
- - **CLI**
137
-
138
- - Import & configure to use edison as your MCP server:
139
-
140
- ```bash
141
- # From source (no install)
142
- uv run python -m src.mcp_importer.quick_cli --yes
143
- ```
144
-
145
- - Preview what will be imported (no writes):
146
-
147
- ```bash
148
- uv run python -m src.mcp_importer --source cursor --dry-run
149
- ```
150
-
151
- - Import servers into Open Edison `config.json` (merge policy defaults to `skip`):
152
-
153
- ```bash
154
- uv run python -m src.mcp_importer --source cursor
155
- uv run python -m src.mcp_importer --source vscode
156
- uv run python -m src.mcp_importer --source claude-code
157
- ```
158
-
159
- - Point your editor to Open Edison (backup original config and replace with a single Open Edison server):
137
+ ```bash
138
+ uv run python -m src.setup_tui.main
139
+ ```
160
140
 
161
- ```bash
162
- uv run python -m src.mcp_importer export --target cursor --yes
163
- uv run python -m src.mcp_importer export --target vscode --yes
164
- uv run python -m src.mcp_importer export --target claude-code --yes
165
- ```
141
+ Use `--dry-run` to preview without writing.
166
142
 
167
143
  </details>
168
144
 
@@ -28,8 +28,10 @@ src/mcp_importer/quick_cli.py,sha256=4mJe10q_lZCYLm75QBt1rYy2j8mGEsRZoAqA0agjfSM
28
28
  src/mcp_importer/types.py,sha256=h03TbAnJbap6OWWd0dT0QcFWNvSaiVFWH9V9PD6x4s0,138
29
29
  src/middleware/data_access_tracker.py,sha256=bArBffWgYmvxOx9z_pgXQhogvnWQcc1m6WvEblDD4gw,15039
30
30
  src/middleware/session_tracking.py,sha256=5W1VH9HNqIZeX0HNxDEm41U4GY6SqKSXtApDEeZK2qo,23084
31
- open_edison-0.1.43.dist-info/METADATA,sha256=OO5PDNk7pByRgIShryHaCtp2_7ua9XOwC8eBVdU-b5o,13188
32
- open_edison-0.1.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
33
- open_edison-0.1.43.dist-info/entry_points.txt,sha256=YiGNm9x2I00hgT10HDyB4gxC1LcaV_mu8bXFjolu0Yw,171
34
- open_edison-0.1.43.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
35
- open_edison-0.1.43.dist-info/RECORD,,
31
+ src/setup_tui/__init__.py,sha256=mDFrQoiOtQOHc0sFfGKrNXVLEDeB1S0O5aISBVzfxYo,184
32
+ src/setup_tui/main.py,sha256=892X2KVKOYmKzUu1Ok8SnApNYxpcFHFHmFLvpPZP4qY,5501
33
+ open_edison-0.1.44.dist-info/METADATA,sha256=hY2fd8IeT-YeBAUjg_FBtpGf50VGOpgRp4xdBhx7ED4,12375
34
+ open_edison-0.1.44.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
+ open_edison-0.1.44.dist-info/entry_points.txt,sha256=YiGNm9x2I00hgT10HDyB4gxC1LcaV_mu8bXFjolu0Yw,171
36
+ open_edison-0.1.44.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
37
+ open_edison-0.1.44.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ """Setup TUI package initializer.
2
+
3
+ Intentionally empty to avoid importing submodules at package import time,
4
+ which prevents warnings when executing `python -m src.setup_tui.main`.
5
+ """
src/setup_tui/main.py ADDED
@@ -0,0 +1,157 @@
1
+ import argparse
2
+
3
+ import questionary
4
+
5
+ from src.config import MCPServerConfig
6
+ from src.mcp_importer.api import (
7
+ CLIENT,
8
+ detect_clients,
9
+ export_edison_to,
10
+ import_from,
11
+ verify_mcp_server,
12
+ )
13
+
14
+
15
+ def show_welcome_screen(*, dry_run: bool = False) -> None:
16
+ """Display the welcome screen for open-edison setup."""
17
+ welcome_text = """
18
+ ╔══════════════════════════════════════════════════════════════╗
19
+ ║ ║
20
+ ║ Welcome to open-edison ║
21
+ ║ ║
22
+ ║ This setup wizard will help you configure open-edison ║
23
+ ║ for your development environment. ║
24
+ ║ ║
25
+ ╚══════════════════════════════════════════════════════════════╝
26
+ """
27
+
28
+ print(welcome_text)
29
+
30
+ # Prompt to continue
31
+ questionary.confirm("Ready to begin the setup process?", default=True).ask()
32
+
33
+
34
+ def handle_mcp_source(source: CLIENT, *, dry_run: bool = False) -> list[MCPServerConfig]:
35
+ """Handle the MCP source."""
36
+ if not questionary.confirm(
37
+ f"We have found {source.name} installed. Would you like to import its MCP servers to open-edison?",
38
+ default=True,
39
+ ).ask():
40
+ return []
41
+
42
+ configs = import_from(source)
43
+
44
+ print(f"Loaded {len(configs)} MCP server configuration from {source.name}!")
45
+
46
+ verified_configs: list[MCPServerConfig] = []
47
+
48
+ for config in configs:
49
+ print(f"Verifying the configuration for {config.name}... (TODO)")
50
+ result = verify_mcp_server(config)
51
+ if result:
52
+ verified_configs.append(config)
53
+ else:
54
+ print(
55
+ f"The configuration for {config.name} is not valid. Please check the configuration and try again."
56
+ )
57
+
58
+ return verified_configs
59
+
60
+
61
+ def confirm_configs(configs: list[MCPServerConfig], *, dry_run: bool = False) -> bool:
62
+ """Confirm the MCP configs."""
63
+ print("These are the servers you have selected:")
64
+
65
+ for config in configs:
66
+ print(f"○ {config.name}")
67
+
68
+ return questionary.confirm(
69
+ "Are you sure you want to use these servers with open-edison?", default=True
70
+ ).ask()
71
+
72
+
73
+ def confirm_apply_configs(client: CLIENT, *, dry_run: bool = False) -> None:
74
+ if not questionary.confirm(
75
+ f"We have detected that you have {client.name} installed. Would you like to connect it to open-edison?",
76
+ default=True,
77
+ ).ask():
78
+ return
79
+
80
+ export_edison_to(client, dry_run=dry_run)
81
+ if dry_run:
82
+ print(f"[dry-run] Export prepared for {client.name}; no changes written.")
83
+ else:
84
+ print(f"Successfully set up Open Edison for {client.name}!")
85
+
86
+
87
+ def show_manual_setup_screen() -> None:
88
+ """Display manual setup instructions for open-edison."""
89
+ manual_setup_text = """
90
+ ╔══════════════════════════════════════════════════════════════╗
91
+ ║ ║
92
+ ║ Manual Setup Instructions ║
93
+ ║ ║
94
+ ╚══════════════════════════════════════════════════════════════╝
95
+
96
+ To set up open-edison manually in other clients, find your client's MCP config
97
+ JSON file and add the following configuration:
98
+
99
+ "mcpServers": {
100
+ "open-edison": {
101
+ "command": "npx",
102
+ "args": [
103
+ "-y",
104
+ "mcp-remote",
105
+ "http://localhost:3000/mcp/",
106
+ "--http-only",
107
+ "--header",
108
+ "Authorization: Bearer dev-api-key-change-me"
109
+ ]
110
+ }
111
+ },
112
+
113
+ Make sure to replace 'dev-api-key-change-me' with your actual API key.
114
+ """
115
+
116
+ print(manual_setup_text)
117
+
118
+
119
+ def run(*, dry_run: bool = False) -> None:
120
+ """Run the complete setup process."""
121
+ show_welcome_screen(dry_run=dry_run)
122
+ # Additional setup steps will be added here
123
+
124
+ mcp_sources = detect_clients()
125
+ mcp_clients = detect_clients()
126
+
127
+ configs: list[MCPServerConfig] = []
128
+
129
+ for source in mcp_sources:
130
+ configs.extend(handle_mcp_source(source, dry_run=dry_run))
131
+
132
+ if len(configs) == 0:
133
+ print(
134
+ "No MCP servers found. Please set up an MCP client with some servers and run this setup again."
135
+ )
136
+ return
137
+
138
+ if not confirm_configs(configs, dry_run=dry_run):
139
+ return
140
+
141
+ for client in mcp_clients:
142
+ confirm_apply_configs(client, dry_run=dry_run)
143
+
144
+ show_manual_setup_screen()
145
+
146
+
147
+ def main(argv: list[str] | None = None) -> int:
148
+ parser = argparse.ArgumentParser(description="Open Edison Setup TUI")
149
+ parser.add_argument("--dry-run", action="store_true", help="Preview actions without writing")
150
+ args = parser.parse_args(argv)
151
+
152
+ run(dry_run=args.dry_run)
153
+ return 0
154
+
155
+
156
+ if __name__ == "__main__":
157
+ raise SystemExit(main())