File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -682,7 +682,9 @@ uvicorn mcpgateway.main:app --host 0.0.0.0 --port 4444 --workers 4
682
682
683
683
` ` ` bash
684
684
# Generate a JWT token using JWT_SECRET_KEY and export it as MCPGATEWAY_BEARER_TOKEN
685
- export MCPGATEWAY_BEARER_TOKEN=$( JWT_SECRET_KEY=my-test-key python3 mcpgateway/utils/create_jwt_token.py)
685
+ # Note that the module needs to be installed. If running locally use:
686
+ # python3 mcpgateway/utils/create_jwt_token.py
687
+ export MCPGATEWAY_BEARER_TOKEN=$( JWT_SECRET_KEY=my-test-key python3 -m mcpgateway.utils.create_jwt_token)
686
688
687
689
# Use the JWT token in an API call
688
690
curl -H " Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN " http://localhost:4444/tools
Original file line number Diff line number Diff line change 25
25
- MCP_WRAPPER_LOG_LEVEL: Python log level name or OFF/NONE to disable logging (default INFO)
26
26
27
27
Example:
28
- $ export MCP_SERVER_CATALOG_URLS='https://api.example.com/catalog'
29
- $ export MCP_AUTH_TOKEN='my-secret-token'
30
- $ python3 mcpgateway.wrapper
28
+ $ export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 10080 --secret my-test-key)
29
+ $ export MCP_AUTH_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
30
+ $ export MCP_SERVER_CATALOG_URLS='http://localhost:4444/servers/1'
31
+ $ export MCP_TOOL_CALL_TIMEOUT=120
32
+ $ export MCP_WRAPPER_LOG_LEVEL=DEBUG # OFF to disable logging
33
+ $ python3 -m mcpgateway.wrapper
31
34
"""
32
35
33
36
import asyncio
@@ -108,7 +111,7 @@ def _extract_base_url(url: str) -> str:
108
111
)
109
112
110
113
logger = logging .getLogger ("mcpgateway.wrapper" )
111
- logger .info (f"Starting MCP wrapper: base_url={ BASE_URL } , timeout={ TOOL_CALL_TIMEOUT } " )
114
+ logger .info (f"Starting MCP wrapper { __version__ } : base_url={ BASE_URL } , timeout={ TOOL_CALL_TIMEOUT } " )
112
115
113
116
114
117
# -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments