Skip to content

Commit 29c08c3

Browse files
committed
Refactor MCP mock server configuration and update tests for OAuth support
- Removed the old `mcp-mock-server` service and replaced it with `mock-mcp` in both `docker-compose` files. - Updated health check and dependencies to reflect the new service name. - Modified E2E test configurations to use the new `mock-mcp` service URL. - Added a minimal mock MCP server implementation with OAuth support for testing. - Updated feature tests to check for OAuth authentication requirements and response headers.
1 parent 167695e commit 29c08c3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/e2e/configuration/server-mode/lightspeed-stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ authentication:
2121
mcp_servers:
2222
- name: "mcp-oauth"
2323
provider_id: "model-context-protocol"
24-
url: "http://localhost:3000"
24+
url: "http://mock-mcp:3000"
2525
authorization_headers:
2626
Authorization: "oauth"

tests/e2e/mock_mcp_server/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ def _json_response(self, data: dict) -> None:
4444
self.wfile.write(body)
4545

4646
def do_GET(self) -> None: # pylint: disable=invalid-name
47-
"""OAuth probe: always 401 with WWW-Authenticate."""
47+
"""Handle GET requests."""
4848
if self.path == "/health":
4949
self._json_response({"status": "ok"})
5050
else:
5151
self._require_oauth()
5252

5353
def do_POST(self) -> None: # pylint: disable=invalid-name
54-
"""MCP JSON-RPC: 401 without valid Bearer; 200 with minimal responses otherwise."""
54+
"""Handle POST requests."""
5555
if self._parse_auth() is None:
5656
self._require_oauth()
5757
return

0 commit comments

Comments
 (0)