Skip to content

Commit 36fa943

Browse files
committed
Cleanup
Signed-off-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com>
1 parent 64adc66 commit 36fa943

File tree

7 files changed

+6
-236
lines changed

7 files changed

+6
-236
lines changed

examples/servers/proxy_oauth/TESTING.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

examples/servers/proxy_oauth/test_logging.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/mcp/server/auth/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from typing import TYPE_CHECKING
1313

1414
from mcp.server.auth.proxy import (
15-
configure_colored_logging,
1615
create_proxy_routes,
1716
fetch_upstream_metadata,
1817
)
18+
from mcp.server.fastmcp.utilities.logging import configure_logging
1919

2020
# For *build_proxy_server* we need a lazy import to avoid a circular reference
2121
# during the initial package import sequence (FastMCP -> auth -> proxy ->
@@ -37,7 +37,7 @@ def __getattr__(name: str): # noqa: D401
3737
# ---------------------------------------------------------------------------
3838

3939
__all__: list[str] = [
40-
"configure_colored_logging",
40+
"configure_logging",
4141
"create_proxy_routes",
4242
"fetch_upstream_metadata",
4343
"build_proxy_server",

src/mcp/server/auth/proxy/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
This sub-package turns the demo-level transparent OAuth proxy into a reusable
44
component:
55
6-
* configure_colored_logging – colourised root-logger setup identical to the
7-
original example.
86
* create_proxy_routes(provider) – returns the Starlette routes that expose the
97
proxy endpoints (/authorize, /revoke …).
108
* build_proxy_server() – convenience helper that wires everything into a
@@ -19,11 +17,9 @@
1917
from __future__ import annotations
2018

2119
# Public re-exports
22-
from .logging import configure_colored_logging
2320
from .routes import create_proxy_routes, fetch_upstream_metadata
2421

2522
__all__: list[str] = [
26-
"configure_colored_logging",
2723
"create_proxy_routes",
2824
"fetch_upstream_metadata",
2925
]

src/mcp/server/auth/proxy/logging.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/mcp/server/auth/proxy/routes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from starlette.responses import JSONResponse, RedirectResponse, Response
1414
from starlette.routing import Route
1515

16-
from .logging import configure_colored_logging
16+
from mcp.server.fastmcp.utilities.logging import configure_logging
1717

1818
__all__ = ["fetch_upstream_metadata", "create_proxy_routes"]
1919

@@ -72,7 +72,7 @@ def create_proxy_routes(provider: Any) -> list[Route]: # type: ignore[valid-typ
7272
`TransparentOAuthProxyProvider` (duck-typed here to avoid circular imports).
7373
"""
7474

75-
configure_colored_logging() # ensure log format if not already set
75+
configure_logging() # ensure log format if not already set
7676

7777
s = provider._s # access its validated settings (_Settings)
7878

src/mcp/server/auth/proxy/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
from mcp.server.auth.settings import AuthSettings, ClientRegistrationOptions
1111
from mcp.server.fastmcp import FastMCP
12+
from mcp.server.fastmcp.utilities.logging import configure_logging
1213

1314
from ..providers.transparent_proxy import TransparentOAuthProxyProvider
14-
from .logging import configure_colored_logging
1515

1616
if TYPE_CHECKING: # pragma: no cover – typing-only imports
1717
from mcp.server.auth.providers.transparent_proxy import _Settings as ProxySettings
@@ -45,7 +45,7 @@ def build_proxy_server( # noqa: D401,E501
4545
if settings is None:
4646
settings = ProxySettings.load()
4747

48-
configure_colored_logging(level=log_level) # type: ignore[arg-type]
48+
configure_logging(level=log_level) # type: ignore[arg-type]
4949

5050
provider = TransparentOAuthProxyProvider(settings=settings) # type: ignore[arg-type]
5151

0 commit comments

Comments
 (0)