feat(mcp): integrate netx via netx_mcp and improve MCP install

- Gate builtin netx tools; ops docs/skills use mcp__netx__*

- Import Cursor mcpServers JSON; pass env_schema defaults to subprocess

- Allow source_type=local; UTF-8 MCP stdio on Windows

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-30 15:44:34 +08:00
parent bbd7b0300f
commit a0a3f4b65f
17 changed files with 408 additions and 536 deletions

View file

@ -23,6 +23,13 @@ class McpInstallerTests(unittest.TestCase):
self.assertIn(" install -g ", res.install_command)
self.assertIn("demo-server@1.0.0", res.install_command)
def test_install_local_skips_package_step(self) -> None:
m = McpServerManifest(server_id="netx", source_type="local", source_ref="netx-mcp-http", entry_command="python")
res = install_mcp_server(m, dry_run=False)
self.assertTrue(res.ok)
self.assertEqual(res.install_command, "")
self.assertEqual((res.details or {}).get("reason"), "local_source_no_package_install")
def test_invalid_source(self) -> None:
m = McpServerManifest(server_id="x", source_type="invalid", source_ref="x")
res = install_mcp_server(m, dry_run=True)