Skip to content

Client example 'mcp_simple_auth' cannot connect to the server #768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
idevstory opened this issue May 21, 2025 · 1 comment
Open

Client example 'mcp_simple_auth' cannot connect to the server #768

idevstory opened this issue May 21, 2025 · 1 comment

Comments

@idevstory
Copy link

Respected Author:

My situation is like this
The server starts normally according to the instructions and can access the endpoint normally, the log is as follows:
`
settings info: host='localhost' port=8000 server_url=AnyHttpUrl('http://localhost:8000/') github_client_id='Ov####V' github_client_secret='de########98' github_callback_path='http://localhost:8000/github/callback' github_auth_url='https://github.com/login/oauth/authorize' github_token_url='https://github.com/login/oauth/access_token' mcp_scope='user' github_scope='read:user'

INFO:mcp_simple_auth.server:Starting server with sse transport
INFO: Started server process [16020]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
INFO: ::1:64682 - "GET /.well-known/oauth-authorization-server HTTP/1.1" 200 OK
INFO: ::1:51151 - "GET /sse HTTP/1.1" 401 Unauthorized
`

Client runtime run message:
uv run mcp-simple-auth-client
`
🚀 Simple MCP Auth Client
Connecting to: http://localhost:8000/sse
🔗 Attempting to connect to http://localhost:8000/sse...
🖥️ Started callback server on http://localhost:3000

📡 Opening transport connection (HTTPX handles auth automatically)...
🤝 Initializing MCP session...
⚡ Starting session initialization...
Failed to discover OAuth metadata
`

error:
`
httpx.HTTPStatusError: Server error '503 Service Unavailable' for url 'http://localhost:8000/.well-known/oauth-authorization-server'

`

Up to now, the client cannot connect to the server, please help, thank you very much!

@idevstory
Copy link
Author

The problem still exists, it should be referencing the client authorization at this node, rather than throwing an error
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant