wangweiandCopilot bd3dc38d1d feat: add MCP server module exposing search_regulations tool
- New backend/app/mcp/ module: MCPServer instance with a single
  search_regulations tool backed by the existing AgentConversationService.
- MCPAuthMiddleware reuses existing JWT auth (no new auth mechanism).
- Mounted at /mcp/ in api/main.py via Streamable HTTP transport; wired the
  MCP session manager into the existing lifespan() via AsyncExitStack
  (app.mount() does not propagate nested ASGI lifespans automatically).
- Fixed a doubled /mcp/mcp path by setting streamable_http_path to "/"
  (MCPServer.streamable_http_app() defaults to registering its own /mcp route).
- Verified end-to-end with the real mcp Python client: list_tools() returns
  search_regulations, auth correctly 401s without or with an invalid token.
- 7 new tests, 76 total (up from 69), all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 13:00:52 +08:00
@
2026-06-03 16:58:35 +08:00
2026-07-02 22:03:39 +08:00
@
2026-06-03 16:58:35 +08:00
2026-06-05 18:00:31 +08:00
2026-07-23 14:09:33 +08:00
2026-07-02 22:03:39 +08:00
2026-07-02 22:03:39 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
@
2026-06-03 16:58:35 +08:00
2026-06-05 18:00:31 +08:00
2026-06-05 18:00:31 +08:00
2026-04-28 11:29:33 +08:00
2026-04-28 11:29:33 +08:00
2026-07-02 22:03:39 +08:00
2026-04-28 11:29:33 +08:00
2026-04-28 11:29:33 +08:00
2026-05-26 12:34:12 +08:00
S
Description
AIRegulation-DocAnalysis-Demo
12 MiB
Languages
Python 55.2%
HTML 22.7%
TypeScript 16.2%
CSS 2.8%
Shell 1.4%
Other 1.6%