Categories

AI Agents

How to secure your MCP server with Keycloak and OAuth in Docker

Keycloak 26.7.4 can act as the authorization server for an MCP server: it publishes its metadata, supports dynamic client registration and issues JWTs that FastMCP validates. It does not implement RFC 8707, so the token audience comes from a client scope and a mapper, and the MCP server must always check it.

AI Agents

How to migrate your MCP server to FastMCP 4 and the Python SDK 2

If your server imports mcp.server.fastmcp, upgrading the mcp package to version 2 breaks it: FastMCP was renamed MCPServer. You have two destinations, MCPServer or FastMCP 4, and both require moving host and port to run(), building MCPError from a code and a message, and replacing ctx.elicit, which fails on 2026-07-28 connections.