MCP Builder CLI
A command-line interface for generating Model Context Protocol (MCP) servers from API specifications. This package provides two separate tools:
MCP Builder CLI (
mcp-builder
) - Generate custom MCP servers from API specification documentsMCP API Server (
mcp-api-server
) - Make HTTP requests from AI assistants like Claude
What is this for?
This package contains two distinct tools that serve different purposes:
MCP Builder CLI (mcp-builder
)
Generate custom MCP servers from API specification documents. This tool helps developers create MCP servers tailored to specific APIs.
MCP API Server (mcp-api-server
)
Allow AI assistants like Claude to make HTTP requests (GET, POST, PUT, DELETE) to any web API directly. This acts as a bridge between AI assistants and web APIs, enabling them to:
Fetch data from REST APIs
Send data to web services
Interact with online tools and platforms
For example, you could ask Claude to check the weather by making a request to a weather API, or ask it to shorten a URL using a URL shortening service.
Quickstart Guide
1. Using the Built-in API Server with Claude Desktop (Easiest)
First, configure Claude Desktop to use the built-in MCP API server:
Open Claude Desktop
Go to the MCP configuration file (usually located at
~/.config/claude/claude_desktop_config.json
on Mac/Linux or%APPDATA%/Claude/claude_desktop_config.json
on Windows)Add this server configuration:
Restart Claude Desktop
You can now use the API tools in Claude!
2. Running the API Server Directly
The easiest way to run the API server is using NPX (no installation required):
For development/testing, you might want to enable debug logging and allow localhost requests:
You can also run the server directly with Node:
With debug and localhost access:
3. Installing Globally
To install the tools globally on your system:
Then run the API server with:
4. Using with Claude
Once configured, you can ask Claude to make API requests:
"Can you get the latest news from https://api.example.com/news/latest?"
"Please post this data to my webhook: {"message": "Hello World"}"
Claude will automatically use the appropriate tool (api_get
, api_post
, etc.) based on what you're asking for.
Features
🚀 HTTP API Tools: GET, POST, PUT, DELETE request support
🔒 Security: Request validation with configurable security policies
📝 Logging: Comprehensive debug logging and request tracking
⚙️ Configurable: Flexible configuration via CLI args and environment variables
🛡️ Error Handling: Robust error handling with detailed error messages
🔄 Graceful Shutdown: Proper cleanup and shutdown handling
Installation
NPX (Recommended)
Run directly without installation:
Global Installation
Local Installation
Usage
API Server Usage
You can also run the API server directly with Node:
Environment Variables
Configure the API server using environment variables:
MCP Builder CLI Usage
The MCP Builder CLI is used to generate custom MCP servers from API specification documents:
Configuration Options
CLI Option | Environment Variable | Default | Description |
|
|
| Enable debug logging |
|
|
| Allow requests to localhost |
|
|
| Allow requests to private IPs |
N/A |
|
| Request timeout in milliseconds |
N/A |
|
| Maximum response length in bytes |
N/A |
|
| Custom user agent string |
Available Tools
The API server provides the following MCP tools that Claude or other MCP clients can use:
api_get
Make an HTTP GET request to retrieve data from a URL.
Parameters:
url
(string): The URL to request data fromheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Can you fetch the JSON data from https://api.example.com/users?"
api_post
Make an HTTP POST request to send data to a URL.
Parameters:
url
(string): The URL to send data tobody
(string or object, optional): The data to sendheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Please post this JSON to my webhook: {"name": "John", "age": 30}"
api_put
Make an HTTP PUT request to update data at a URL.
Parameters:
url
(string): The URL to update data atbody
(string or object, optional): The updated dataheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Update my user profile with this data: {"name": "John Smith", "age": 31}"
api_delete
Make an HTTP DELETE request to remove data at a URL.
Parameters:
url
(string): The URL to delete data fromheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Please delete the user with ID 123 from https://api.example.com/users/123"
MCP Client Configuration
To use this server with an MCP client, add it to your MCP configuration:
Claude Desktop Configuration
Add to your claude_desktop_config.json
:
With Custom Configuration
You can also run the server directly with Node:
Security Considerations
By default, requests to localhost and private IP ranges are blocked to prevent SSRF attacks
Only enable
--allow-localhost
and--allow-private-ips
in trusted environmentsThe server validates all requests and sanitizes responses
Request timeouts prevent hanging connections
Response size limits prevent memory exhaustion
Error Handling
The server provides detailed error messages for:
Invalid URLs
Network timeouts
JSON parsing errors
Validation failures
HTTP errors
All errors are logged with timestamps and context for debugging.
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Support
Report issues: GitHub Issues
Documentation: GitHub Repository
Installation
NPX (Recommended)
Run directly without installation:
Global Installation
Local Installation
Usage
Basic Usage
You can also run the server directly with Node:
Environment Variables
Configure the server using environment variables:
Configuration Options
CLI Option | Environment Variable | Default | Description |
|
|
| Enable debug logging |
|
|
| Allow requests to localhost |
|
|
| Allow requests to private IPs |
N/A |
|
| Request timeout in milliseconds |
N/A |
|
| Maximum response length in bytes |
N/A |
|
| Custom user agent string |
Available Tools
The server provides the following MCP tools that Claude or other MCP clients can use:
api_get
Make an HTTP GET request to retrieve data from a URL.
Parameters:
url
(string): The URL to request data fromheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Can you fetch the JSON data from https://api.example.com/users?"
api_post
Make an HTTP POST request to send data to a URL.
Parameters:
url
(string): The URL to send data tobody
(string or object, optional): The data to sendheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Please post this JSON to my webhook: {"name": "John", "age": 30}"
api_put
Make an HTTP PUT request to update data at a URL.
Parameters:
url
(string): The URL to update data atbody
(string or object, optional): The updated dataheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Update my user profile with this data: {"name": "John Smith", "age": 31}"
api_delete
Make an HTTP DELETE request to remove data at a URL.
Parameters:
url
(string): The URL to delete data fromheaders
(object, optional): HTTP headers to include in the request
Example usage with Claude:
"Please delete the user with ID 123 from https://api.example.com/users/123"
MCP Client Configuration
To use this server with an MCP client, add it to your MCP configuration:
Claude Desktop Configuration
Add to your claude_desktop_config.json
:
With Custom Configuration
Security Considerations
By default, requests to localhost and private IP ranges are blocked to prevent SSRF attacks
Only enable
--allow-localhost
and--allow-private-ips
in trusted environmentsThe server validates all requests and sanitizes responses
Request timeouts prevent hanging connections
Response size limits prevent memory exhaustion
Error Handling
The server provides detailed error messages for:
Invalid URLs
Network timeouts
JSON parsing errors
Validation failures
HTTP errors
All errors are logged with timestamps and context for debugging.
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Support
Report issues: GitHub Issues
Documentation: GitHub Repository
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.
Related MCP Servers
- -securityFlicense-qualityA versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.Last updated -19
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -361
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to communicate with each other using Inter-Process Communication, featuring natural language commands and cross-platform compatibility.Last updated -9104MIT License