-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
21 lines (15 loc) · 720 Bytes
/
config.py
File metadata and controls
21 lines (15 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
config.py — SimpleMCP runtime configuration
MCP_MODE controls whether the HTTP server exposes MCP-standard endpoints.
False (default) → Original SimpleMCP HTTP API
GET /list_tools
POST /run_tool
True → MCP-standard Streamable HTTP endpoints layered on top
POST /mcp (JSON-RPC 2.0 dispatch; SSE or JSON response)
GET /mcp (SSE stream for server-initiated messages)
How to enable:
1. Environment variable: MCP_MODE=true uvicorn server:app ...
2. Edit this file: MCP_MODE = True
"""
import os
MCP_MODE: bool = os.environ.get("MCP_MODE", "false").lower() in ("1", "true", "yes")