Skip to content

Conversation

@Larry-Osakwe
Copy link
Contributor

Summary

  • Adds /packages/mcp/examples/client_connection/ example demonstrating MCP client connections with OAuth authentication
  • Shows StarletteAuthCoordinator for handling OAuth callbacks in web applications
  • Demonstrates session status lifecycle (auth_pending -> connected)
  • Includes comprehensive README with setup instructions and flow diagrams

Key Patterns Demonstrated

  • Setting up StarletteAuthCoordinator with SQLite storage
  • Session status checking (is_operational, requires_user_action)
  • Getting auth challenges and authorization URLs
  • Tool calling after authentication

Test Plan

  • Start hello_world_server with a Keycard zone
  • Run client_connection example
  • Open http://localhost:8080 and verify auth_pending status
  • Complete OAuth flow in browser
  • Verify connected status and tool calling works

Closes AGE-16

Demonstrates connecting to authenticated MCP servers using
StarletteAuthCoordinator for OAuth callback handling.

Key patterns shown:
- Session status lifecycle checking
- Auth challenge handling with redirect URLs
- Tool calling after authentication
- SQLite token persistence
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

Successfully merging this pull request may close these issues.

1 participant