Files
mcp-template-python/src/mcp_template_python/config/mcp.py
2026-02-28 10:05:07 +08:00

31 lines
863 B
Python

from pydantic_settings import BaseSettings, SettingsConfigDict
class MCPSettings(BaseSettings):
"""
Configuration settings for the MCP template application.
"""
model_config = SettingsConfigDict(
env_prefix="MCP_",
extra="ignore",
)
default_mcp: str = "math"
"""Default MCP to be used by the application."""
stateless_http: bool = True
"""Whether the MCP server should operate in stateless mode."""
instructions: str | None = None
"""Instructions to be used by the MCP server, defaults to None."""
enable_helpers_router: bool = True
"""Enable the helpers router for the MCP server."""
enable_streamable_http: bool = True
"""Enable streamable HTTP for the MCP server."""
enable_dns_rebinding_protection: bool = False
"""Enable DNS rebinding protection for MCP server."""