Fix tool federation, tool refresh and provide dropdown for tools#151
Fix tool federation, tool refresh and provide dropdown for tools#151crivetimihai merged 39 commits intomainfrom
Conversation
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
|
Awesome PR, but needs a bit more testing / fixes to merge. See: Linting and smoketest: pass✔️ Running in docker with SSL on host✔️ curl -k https://localhost:4444/health` # {"status":"healthy"}
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 0 --secret my-test-key)
curl -sk -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" https://localhost:4444/version | jq '.uptime_seconds' # 211✔️ https://localhost:4444/admin/ - all tabs work ❌ Adding a server according to README.mdnpx -y supergateway --stdio "uvenv run mcp_server_time -- --local-timezone=Europe/Dublin" --port 8003 &
❌ curl -s -X POST -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"local_time","url":"http://localhost:8003/sse"}' \
https://localhost:4444/gateways❌ Error in logs: Running in docker compose with Postgres and Redis❌ curl -sk -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" http://localhost:4444/version | jq -c '.database, .redis'
# {"dialect":"postgresql","url":"postgresql://postgres@postgres:5432/mcp","reachable":true,"server_version":"17.5 (Debian 17.5-1.pgdg120+1)"}
# {"available":true,"url":"redis://redis:6379/0","reachable":true,"server_version":"8.0.1"}
❌ http://localhost:4444/
✗ make compose-logs
gateway-1 | sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column tools.original_name does not exist
gateway-1 | LINE 1: SELECT tools.id, tools.original_name, tools.url, tools.descr...❌ This seems to require cleanup of previous db but is still incompatible with postgresql:
This suggests that the constraints only work with sqlite (or perhaps sqlite doesn't try to enforce them) ❌ FAILED tests/unit/mcpgateway/services/test_gateway_service.py::TestGatewayService::test_update_gateway_name_conflict - assert 'Gateway already exists with name' in "Failed to update gateway: Class 'unittest.mock.MagicMock' is not mapped"
FAILED tests/unit/mcpgateway/services/test_server_service.py::TestServerService::test_register_server - pydantic_core._pydantic_core.ValidationError: 2 validation errors for ServerRead
FAILED tests/unit/mcpgateway/services/test_server_service.py::TestServerService::test_list_servers - pydantic_core._pydantic_core.ValidationError: 2 validation errors for ServerRead
FAILED tests/unit/mcpgateway/services/test_server_service.py::TestServerService::test_get_server - pydantic_core._pydantic_core.ValidationError: 2 validation errors for ServerRead
FAILED tests/unit/mcpgateway/services/test_server_service.py::TestServerService::test_update_server - pydantic_core._pydantic_core.ValidationError: 2 validation errors for ServerRead
FAILED tests/unit/mcpgateway/services/test_server_service.py::TestServerService::test_toggle_server_status - pydantic_core._pydantic_core.ValidationError: 2 validation errors for ServerRead
FAILED tests/unit/mcpgateway/services/test_tool_service.py::TestToolService::test_register_tool - pydantic_core._pydantic_core.ValidationError: 3 validation errors for ToolRead
FAILED tests/unit/mcpgateway/services/test_tool_service.py::TestToolService::test_list_tools - pydantic_core._pydantic_core.ValidationError: 3 validation errors for ToolRead
FAILED tests/unit/mcpgateway/services/test_tool_service.py::TestToolService::test_get_tool - pydantic_core._pydantic_core.ValidationError: 3 validation errors for ToolRead
FAILED tests/unit/mcpgateway/services/test_tool_service.py::TestToolService::test_toggle_tool_status - pydantic_core._pydantic_core.ValidationError: 3 validation errors for ToolRead
FAILED tests/unit/mcpgateway/services/test_tool_service.py::TestToolService::test_update_tool - pydantic_core._pydantic_core.ValidationError: 3 validation errors for ToolRead
FAILED tests/unit/mcpgateway/test_admin.py::TestAdminServerRoutes::test_admin_get_server - AssertionError: assert <MagicMock na...601517212064'> == {'id': 1, 'name': 'Server 1'}
FAILED tests/unit/mcpgateway/test_admin.py::TestAdminServerRoutes::test_admin_add_server - AssertionError: Expected 'register_server' to have been called once. Called 0 times.
FAILED tests/unit/mcpgateway/test_admin.py::TestAdminServerRoutes::test_admin_edit_server - AssertionError: Expected 'update_server' to have been called once. Called 0 times.
FAILED tests/unit/mcpgateway/test_admin.py::TestAdminToolRoutes::test_admin_get_tool - AssertionError: assert <MagicMock na...601518376672'> == {'id': 1, 'name': 'Tool 1'}
FAILED tests/unit/mcpgateway/test_main.py::TestAPIEndpoints::test_list_servers_endpoint - pydantic_core._pydantic_core.ValidationError: 2 validation errors for ServerRead
FAILED tests/unit/mcpgateway/test_main.py::TestAPIEndpoints::test_rpc_tool_invocation - AssertionError: expected call not found.
FAILED tests/unit/mcpgateway/test_schemas.py::TestServerSchemas::test_server_read - pydantic_core._pydantic_core.ValidationError: 4 validation errors for ServerRead
FAILED tests/unit/mcpgateway/test_ui_version.py::test_admin_ui_contains_version_tab - sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: tools.original_nameI think the code change significantly enough to require updates to the unit tests as well. Thanks! |
|
@crivetimihai Thanks for the detailed notes. Working on them. |
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
|
@crivetimihai Code has been fixed. Will update the test cases to match the current datatypes and make the PR ready for review. |
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
|
@madhav165 drafted but not tested #184 - we should probably merge that one FIRST, then this after rebase / db migration? Note: As we start to get closer to a 'stable release' and lift the 'Development Status :: 4 - Beta' tag - we'll include changelog notes and documentation on Alembic schema migrations, etc. for breaking changes. We may also consider releasing the configuration Export feature prior (perhaps 0.2.1 - 2025-07-01) to give folks a way to export configs before breaking DB changes - drafted #185. Let's talk tomorrow. |
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
|
I think we're in good enough shape to merge: PR Test MatrixAutomated Checks
CLI / Make
curl -sk https://localhost:4444/health
curl -sk https://localhost:4444/ready
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 0 --secret my-test-key)
curl -sk -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" https://localhost:4444/version
Admin UI & API
curl -sk -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" https://localhost:4444/version
curl -sk -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" https://localhost:4444/toolsDocker Compose (test with Postgres and Redis) with OLD database (migration)
Keep your old PostgreSQL volume to test the migration [X] Docker Compose (test with Postgres and Redis) with NEW database🧪 Other tests
- [X] Helm Chart
Not tested: upgrade Issues to solve after PR merge
|
Fix tool federation, tool refresh and provide dropdown for tools Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Fix tool federation, tool refresh and provide dropdown for tools
Fix tool federation, tool refresh and provide dropdown for tools Signed-off-by: Vicky Kuo <vicky.kuo@ibm.com>

✨ Feature / Enhancement PR
🔗 Epic / Issue
Closes #116
Makes progress on #135
🚀 Summary (1–2 sentences)
🧪 Checks
make ruffpassesmake banditpassesmake lintpassesmake testpasses📓 ADRs
Refer to the ADRs for detailed changes.
docs/docs/architecture/adr/011-tool-federation.mddocs/docs/architecture/adr/012-dropdown-ui-tool-selection.md