Skip to content

Commit 8fb6728

Browse files
authored
Merge pull request #1243 from tisnik/lcore-1375-fixed-mcp-servers
LCORE-1375: Fixed MCP servers
2 parents 9cb7a82 + e236310 commit 8fb6728

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

dev-tools/mcp-mock-server/test_mock_mcp_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import time
1515
import urllib.request
1616
import urllib.error
17-
from typing import Any
17+
from typing import Any, Optional
1818

1919
import pytest
2020

@@ -76,8 +76,8 @@ def mock_server() -> Any:
7676
def make_request(
7777
url: str,
7878
method: str = "GET",
79-
data: dict[str, Any] | None = None,
80-
headers: dict[str, str] | None = None,
79+
data: Optional[dict[str, Any]] = None,
80+
headers: Optional[dict[str, str]] = None,
8181
use_https: bool = False,
8282
) -> tuple[int, dict[str, Any] | str]:
8383
"""Make HTTP request and return status code and response."""

tests/e2e/mock_mcp_server/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import json
1010
from http.server import HTTPServer, BaseHTTPRequestHandler
11-
from typing import Any
11+
from typing import Any, Optional
1212

1313
# Standard OAuth-style challenge so the client can drive an OAuth flow
1414
WWW_AUTHENTICATE = 'Bearer realm="mock-mcp", error="invalid_token"'
@@ -27,7 +27,7 @@ def _require_oauth(self) -> None:
2727
self.end_headers()
2828
self.wfile.write(body)
2929

30-
def _parse_auth(self) -> str | None:
30+
def _parse_auth(self) -> Optional[str]:
3131
"""Return Bearer token if present, else None."""
3232
auth = self.headers.get("Authorization")
3333
if auth and auth.startswith("Bearer ") and "invalid" not in auth:

0 commit comments

Comments
 (0)