Commit 0f44339
committed
Fix MCP package import conflicts and namespace issues
- Renamed tests/cli/mcp to tests/cli/mcp_integration to avoid namespace conflict with installed mcp package
- Renamed src/codegen/cli/mcp to src/codegen/cli/mcp_server to avoid namespace conflict
- Updated import paths in src/codegen/cli/commands/mcp/main.py
- Added missing MCP dependencies: fastmcp>=2.9.0 and mcp-python>=0.1.4
- Fixed import resolution issues that were causing test failures
- All MCP integration tests now pass successfully
The issue was that local directories named 'mcp' were shadowing the installed
mcp package, causing ImportError: No module named 'mcp.types' when pytest
tried to import the package. This fix resolves the namespace conflicts while
maintaining all functionality.1 parent 1f89699 commit 0f44339
File tree
23 files changed
+32
-8
lines changed- src/codegen
- cli
- commands/mcp
- mcp_server
- tools
- telemetry
- git
- repo_operator
- schemas
- utils
- tests/cli/mcp_integration
23 files changed
+32
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments