Commit bf00abc
committed
✨ feat: implement MCP server filtering with comprehensive testing
**Core Implementation:**
- Fix MCP server filtering to return tools only from specified server
- Change get_mcp_tools() to use server-specific clients instead of global singleton
- Add server validation and enhanced error handling
- Add remove_mcp_server() function for proper cleanup
**Enhanced Architecture:**
- Support both global and server-specific MCP client creation
- Maintain backward compatibility for existing global client usage
- Improve server isolation and independence
- Add proper caching per server
**Comprehensive Testing:**
- Move MCP server filtering tests from e2e to unit tests (19 total MCP unit tests)
- Add real server testing with DeepWiki and Context7 configurations
- Add server isolation and error handling tests
- Clean up e2e tests to focus purely on DeepWiki integration
- All tests pass with full lint compliance
This resolves the architectural issue where get_mcp_tools(server_name) was
returning tools from all servers instead of filtering by the specified server.1 parent 2b95be1 commit bf00abc
2 files changed
+335
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
36 | 53 | | |
37 | | - | |
38 | 54 | | |
39 | | - | |
40 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
41 | 59 | | |
42 | | - | |
| 60 | + | |
43 | 61 | | |
44 | 62 | | |
45 | 63 | | |
| |||
52 | 70 | | |
53 | 71 | | |
54 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
55 | 79 | | |
56 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
57 | 83 | | |
58 | 84 | | |
59 | 85 | | |
60 | 86 | | |
61 | | - | |
| 87 | + | |
62 | 88 | | |
63 | 89 | | |
64 | 90 | | |
| |||
92 | 118 | | |
93 | 119 | | |
94 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
95 | 129 | | |
96 | 130 | | |
97 | 131 | | |
| |||
0 commit comments