让智能体通过 MCP 发送各类 HTTP 请求并取回响应,基于 Python 实现。
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add http -- python main.py~/.codex/config.toml
[mcp_servers.http]
command = "python"
args = ["main.py"]
# codex mcp add http -- python main.py~/.cursor/mcp.json
{
"mcpServers": {
"http": {
"command": "python",
"args": [
"main.py"
]
}
}
}.vscode/mcp.json
{
"servers": {
"http": {
"type": "stdio",
"command": "python",
"args": [
"main.py"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"http": {
"command": "python",
"args": [
"main.py"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"http": {
"command": "python",
"args": [
"main.py"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"http": {
"command": "python",
"args": [
"main.py"
]
}
}
}