Skip to content

fix(mcp): JumpServer MCP path 占位符未替换与 401 响应 ASGI 顺序问题#5

Open
wgngoo wants to merge 1 commit intojumpserver:masterfrom
wgngoo:fix/jumpserver-mcp-path-and-401
Open

fix(mcp): JumpServer MCP path 占位符未替换与 401 响应 ASGI 顺序问题#5
wgngoo wants to merge 1 commit intojumpserver:masterfrom
wgngoo:fix/jumpserver-mcp-path-and-401

Conversation

@wgngoo
Copy link
Copy Markdown

@wgngoo wgngoo commented Mar 2, 2026

  • 修复 perms_asset-permissions_read 等接口 path 中 {id} 未替换导致请求到 %7Bid%7D 的 404 问题
    • 对未在 OpenAPI 中声明的 path 占位符从 arguments 做替换,并增加 id/pk、user_id、node_id、asset_id 等别名
  • 修复 401 未授权响应只发 http.response.start 未发 body 导致的 ASGI RuntimeError
    • 抽离 _send_unauthorized,统一先发 start 再发 body,并设置 Content-Length
  • 更新 README:补充中文说明,包含 .env 配置(Bearer/AK-SK)、Docker 与本地(uv/pip)启动、获取 Token、Cursor MCP 配置及常见工具用法。

Made-with: Cursor

- 修复 perms_asset-permissions_read 等接口 path 中 {id} 未替换导致请求到 %7Bid%7D 的 404 问题
  - 对未在 OpenAPI 中声明的 path 占位符从 arguments 做替换,并增加 id/pk、user_id、node_id、asset_id 等别名
- 修复 401 未授权响应只发 http.response.start 未发 body 导致的 ASGI RuntimeError
  - 抽离 _send_unauthorized,统一先发 start 再发 body,并设置 Content-Length

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants