|
|
|
|
@ -25,7 +25,7 @@ description: 提供 Educoder 课堂相关查询能力,当前支持课堂列表
|
|
|
|
|
本地单用户调试时,可以临时使用环境变量保存:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
export EDUCODER_AUTHORIZATION="Bearer xxxxx"
|
|
|
|
|
export EDUCODER_AUTHORIZATION="xxxxx"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> 这种方式只适合本地单用户调试,不适合多用户线上场景。
|
|
|
|
|
@ -243,7 +243,7 @@ from mcp.client.streamable_http import streamable_http_client
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def main():
|
|
|
|
|
async with httpx.AsyncClient(headers={"Authorization": "Bearer demo-token"}) as http_client:
|
|
|
|
|
async with httpx.AsyncClient(headers={"Authorization": "demo-token"}) as http_client:
|
|
|
|
|
async with streamable_http_client("http://127.0.0.1:8001/mcp", http_client=http_client) as (read, write, _):
|
|
|
|
|
async with ClientSession(read, write) as session:
|
|
|
|
|
await session.initialize()
|
|
|
|
|
|