All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m38s
- 添加MCP Manager统一入口管理 - 实现Contact/Dictionary/News三个适配器 - 三层降级策略:MCP -> Database -> Mock - 保持原有api_client向后兼容 - 添加完整文档和测试
69 lines
1.3 KiB
YAML
69 lines
1.3 KiB
YAML
# MCP 配置示例
|
||
# 复制此文件为 mcp_config.yaml 并填入真实配置
|
||
|
||
mcp_servers:
|
||
# 文件系统服务器
|
||
# filesystem:
|
||
# type: stdio
|
||
# command: npx
|
||
# args:
|
||
# - "-y"
|
||
# - "@modelcontextprotocol/server-filesystem"
|
||
# - "/path/to/your/files"
|
||
# enabled: false
|
||
|
||
# GitHub 服务器
|
||
# github:
|
||
# type: stdio
|
||
# command: npx
|
||
# args:
|
||
# - "-y"
|
||
# - "@modelcontextprotocol/server-github"
|
||
# env:
|
||
# GITHUB_PERSONAL_ACCESS_TOKEN: "ghp_your_token_here"
|
||
# enabled: false
|
||
|
||
# Gmail 服务器
|
||
# gmail:
|
||
# type: stdio
|
||
# command: npx
|
||
# args:
|
||
# - "-y"
|
||
# - "@modelcontextprotocol/server-gmail"
|
||
# enabled: false
|
||
|
||
# 新闻资讯(示例HTTP服务器)
|
||
# news:
|
||
# type: http
|
||
# url: "https://mcp-news.example.com/mcp"
|
||
# headers:
|
||
# Authorization: "Bearer your_api_key"
|
||
# enabled: false
|
||
|
||
# 词典翻译
|
||
# dictionary:
|
||
# type: stdio
|
||
# command: uvx
|
||
# args:
|
||
# - "your-dictionary-mcp-server"
|
||
# enabled: false
|
||
|
||
# 适配器配置
|
||
adapters:
|
||
contact:
|
||
use_mcp: true
|
||
use_database: true
|
||
use_fallback: true
|
||
|
||
dictionary:
|
||
use_mcp: true
|
||
use_database: true
|
||
use_fallback: true
|
||
cache_ttl: 86400 # 缓存一天
|
||
|
||
news:
|
||
use_mcp: true
|
||
use_database: true
|
||
use_fallback: true
|
||
cache_ttl: 3600 # 缓存一小时
|