API Tester MCP Server
API 测试器 MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,允许 Claude 代表您发出 API 请求。它提供了用于测试各种 API 的工具,包括与 OpenAI API 的专用集成。
特征
向任何 API 发出 HTTP 请求(GET、POST、PUT、DELETE)
无需在聊天中分享 API 密钥即可测试 OpenAI 的 GPT 模型
使用 DALL-E 生成图像
格式正确,方便阅读的回复
Related MCP server: Scenario Word
设置
先决条件
Python 3.10 或更高版本
MCP SDK 1.2.0 或更高版本
安装
安装所需的依赖项:
pip install "mcp[cli]" httpx python-dotenv使用以下方法之一设置您的 OpenAI API 密钥:
选项 1:环境变量
# On Windows (PowerShell)
$env:OPENAI_API_KEY = "your-api-key"
# On Windows (Command Prompt)
set OPENAI_API_KEY=your-api-key
# On macOS/Linux
export OPENAI_API_KEY="your-api-key"选项 2:使用 .env 文件(推荐)
在项目目录中创建一个.env文件(从.env.example复制):
OPENAI_API_KEY=your_openai_api_key_here运行服务器
python main.py与 Claude 一起使用
一旦您的服务器运行,您就可以通过在 Claude Desktop 配置文件中进行配置将其连接到 Claude for Desktop。
示例提示
常规 API 测试
Use the get_request tool to fetch data from https://jsonplaceholder.typicode.com/posts/1Use the post_request tool to send data to https://jsonplaceholder.typicode.com/posts with this JSON body: {"title": "Test Post", "body": "This is a test", "userId": 1}使用 OpenAI 工具
Use the openai_chat_completion tool with:
prompt: "Write a short poem about artificial intelligence"
system_message: "You are a helpful assistant that writes creative poetry"
model: "gpt-4"Use the openai_image_generation tool with:
prompt: "A futuristic city with flying cars and tall glass buildings at sunset"
size: "1024x1024"可用工具
通用 API 工具
get_request:向任何 URL 发出 GET 请求post_request:使用 JSON 主体发出 POST 请求put_request:使用 JSON 主体发出 PUT 请求delete_request:发出 DELETE 请求
OpenAI 专用工具
openai_chat_completion:使用 OpenAI 的聊天模型生成文本openai_image_generation:使用 DALL-E 生成图像
安全说明
您的 OpenAI API 密钥存储在服务器中,不会在聊天中暴露
API 使用将计入您的 OpenAI 配额,并可能产生费用
对于生产用途,请始终将 API 密钥设置为环境变量或使用
.env文件.env文件包含在.gitignore中,以防止意外提交您的 API 密钥
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server for building and testing AI agents with multi-model experimentation and insights.
The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that runs on Cloudflare Workers with OAuth login, allowing AI assistants like Claude to execute tools remotely through HTTP connections.-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that allows Claude AI to interact with custom tools, enabling extension of Claude's capabilities through the MCP framework.-
- FlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools for fetching and posting HTTP data, with built-in prompts for URL summarization and API analysis.2-
- FlicenseNot gradedqualityDmaintenanceA customizable Model Context Protocol server built with mcp-framework that enables Claude to access external tools and capabilities through a standardized interface.30 npm-