fix: implement token-based authentication at server startup
- Server now authenticates from GRIST_MCP_TOKEN env var or token parameter - Removed unused code (_set_agent, nonlocal check) - Added AuthError handling in main.py - Updated test to pass token explicitly
This commit is contained in:
@@ -21,7 +21,7 @@ tokens:
|
||||
permissions: [read, write, schema]
|
||||
""")
|
||||
|
||||
server = create_server(str(config_file))
|
||||
server = create_server(str(config_file), token="test-token")
|
||||
|
||||
# Server should have tools registered
|
||||
assert server is not None
|
||||
|
||||
Reference in New Issue
Block a user