使用说明
search_mcp
谷歌搜索mcp服务器
设置
法典
将以下文本添加到 ~/.codex/config.toml
[mcp_servers.search]
command = "/opt/homebrew/bin/uv"
args = [ "run", "--with", "mcp", "mcp", "run", "/path/to/main.py"]
env = { "SHELL" = "/bin/zsh", "TERM" = "tmux-256color", "GOOGLE_API_KEY" = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "GOOGLE_SEARCH_ENGINE_ID" = "xxxxxxxxxxxxxxxxx" }
测试
您可以使用以下命令在本地测试MCP服务器:
uv run --with mcp mcp dev /path/to/main.py
环境变量
GOOGLE_API_KEY:您的Google API密钥。GOOGLE_SEARCH_ENGINE_ID:您的自定义搜索引擎ID。
确保这些设置正确 ~/.codex/config.toml 如上所示。