Skip to content

0.3.0

Latest

Choose a tag to compare

@JoshBragg-Cohere JoshBragg-Cohere released this 04 Mar 19:26

Whats Changed

  • Migrated base framework from mcp SDK (mcp==1.11.0) to fastmcp (fastmcp>=2.14.5)
  • Introduced NorthTokenVerifier as a standalone AuthProvider for FastMCP
    • Can be used directly with any FastMCP instance (e.g., FastMCP("my-server", auth=NorthTokenVerifier(...)))
    • Supports trusted issuers, server secret, and debug configuration
  • Simplified NorthMCPServer internals
    • Removed manual middleware stacking (sse_app, streamable_http_app, _add_middleware methods removed)
    • Authentication is now delegated to NorthTokenVerifier via FastMCP's auth parameter
    • Removed auth_server_provider constructor parameter
  • Removed AuthContextMiddleware and auth_context_var context variable
    • User context is now available through FastMCP's built-in get_access_token() dependency
  • Authenticated requests now return FastMCP's AuthenticatedUser wrapping an AccessToken with structured claims
    • Claims are validated via new AuthenticatedNorthUserClaims Pydantic model
    • Claims include email and connector_access_tokens
  • Added get_north_context() helper for parsing X-North-Context-* headers
    • Provides access to custom context values (e.g., tenant IDs, feature flags) passed by the North platform
  • Improved Base64 connector token parsing
    • Fixed padding calculation for Base64 URL-safe decoding
    • Added granular error handling (binascii.Error, UnicodeDecodeError, json.JSONDecodeError)
    • Non-string token entries are now skipped with a warning instead of failing the entire parse
  • Exported NorthTokenVerifier and get_north_context from package __all__
  • Added ruff as a dev dependency for linting and formatting
  • Added asgi-lifespan as a dev dependency for testing
  • Added new examples: server_with_access_token.py, server_with_context.py, server_with_secret.py, and auth-provider-local-mcp/
  • Updated all existing examples to use get_access_token() instead of get_authenticated_user()
  • Added new test suites: test_auth_middleware.py, test_deprecation_warnings.py, test_get_north_context.py, test_north_token_verifier.py, test_utils.py

Deprecation

  • Server Secret authentication marked as deprecated
    • Utilize other authentication methods (such as OAuth, connector tokens, custom headers)
  • Connector Access Tokens unified header marked as deprecated
    • Utilize custom headers with connector values to provide connector tokens to MCP server
    • Consider use of get_north_context for accessing custom values
  • get_authenticated_user marked as deprecated
    • Use get_access_token for user context and authentication session details

Full Changelog: 0.2.4...0.3.0