Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Remove overly restrictive MIME type validation from Resource (#2585)

Jeremiah Lowin0bcd69cd98a9
diff --git a/src/fastmcp/resources/resource.py b/src/fastmcp/resources/resource.py
index 6bb4dbd47..b6fbc9061 100644
--- a/src/fastmcp/resources/resource.py
+++ b/src/fastmcp/resources/resource.py
@@ -42,7 +42,6 @@ class Resource(FastMCPComponent):
mime_type: str = Field(
default="text/plain",
description="MIME type of the resource content",
- pattern=r"^[a-zA-Z0-9]+/[a-zA-Z0-9\-+.]+$",
)
annotations: Annotated[
Annotations | None,