feat: 集成MCP统一外部接口管理系统
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m38s

- 添加MCP Manager统一入口管理
- 实现Contact/Dictionary/News三个适配器
- 三层降级策略:MCP -> Database -> Mock
- 保持原有api_client向后兼容
- 添加完整文档和测试
This commit is contained in:
2026-05-03 12:36:12 +08:00
parent 3e9462a693
commit 9c53f58165
15 changed files with 1540 additions and 519 deletions

View File

@@ -0,0 +1,21 @@
"""
MCP (Model Context Protocol) 集成模块
统一外部接口管理层
"""
from .mcp_manager import MCPManager, mcp_manager
from .mcp_client import MCPClient, MCPServerConfig
from .adapters.base_adapter import BaseAdapter, AdapterResult
from .adapters import ContactAdapter, DictionaryAdapter, NewsAdapter
__all__ = [
"MCPManager",
"mcp_manager",
"MCPClient",
"MCPServerConfig",
"BaseAdapter",
"AdapterResult",
"ContactAdapter",
"DictionaryAdapter",
"NewsAdapter"
]