
API Tester MCP Server
A Model Context Protocol server that allows Claude to make API requests on your behalf, providing tools for testing various APIs including HTTP requests and OpenAI integrations without sharing your API keys in the chat.
Vikrant-Khedkar
README
API Tester MCP Server
This is a Model Context Protocol (MCP) server that allows Claude to make API requests on your behalf. It provides tools for testing various APIs, including a dedicated integration with OpenAI's APIs.
Features
- Make HTTP requests (GET, POST, PUT, DELETE) to any API
- Test OpenAI's GPT models without sharing your API key in the chat
- Generate images with DALL-E
- Properly formatted responses for easy reading
Setup
Prerequisites
- Python 3.10 or higher
- MCP SDK 1.2.0 or higher
Installation
- Install the required dependencies:
pip install "mcp[cli]" httpx python-dotenv
- Set your OpenAI API key using one of these methods:
Option 1: Environment Variables
# 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"
Option 2: Using a .env File (Recommended)
Create a .env
file in the project directory (copy from .env.example
):
OPENAI_API_KEY=your_openai_api_key_here
Running the Server
python main.py
Using with Claude
Once your server is running, you can connect it to Claude for Desktop by configuring it in the Claude Desktop config file.
Example Prompts
General API Testing
Use the get_request tool to fetch data from https://jsonplaceholder.typicode.com/posts/1
Use 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}
Using OpenAI Tools
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"
Available Tools
General API Tools
get_request
: Make GET requests to any URLpost_request
: Make POST requests with JSON bodiesput_request
: Make PUT requests with JSON bodiesdelete_request
: Make DELETE requests
OpenAI-Specific Tools
openai_chat_completion
: Generate text using OpenAI's chat modelsopenai_image_generation
: Generate images using DALL-E
Security Notes
- Your OpenAI API key is stored in the server and not exposed in the chat
- API usage will count against your OpenAI quota and may incur charges
- For production use, always set the API key as an environment variable or use a
.env
file - The
.env
file is included in.gitignore
to prevent accidentally committing your API key
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Playwright MCP Server
Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
@kazuph/mcp-fetch
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
DuckDuckGo MCP Server
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
YouTube Transcript MCP Server
This server retrieves transcripts for given YouTube video URLs, enabling integration with Goose CLI or Goose Desktop for transcript extraction and processing.