
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
mcp-rest-api
Advanced tools
🔧 A powerful, type-safe, configurable CLI tool that transforms any REST API into MCP (Model Context Protocol) tools for LLM agents
The MCP REST API Server is a generic bridge that allows you to wrap any REST API and expose it as callable tools for AI assistants and LLM agents through the Model Context Protocol. Simply provide a JSON configuration file, and your API becomes instantly accessible to AI tools!
✨ The easiest way to get started is with npx -y mcp-rest-api - no installation required!
🚀 NEW: Generate configs instantly with AI! Visit api-mcp-generator.vercel.app to automatically generate JSON configurations from any REST API documentation. Just paste your API docs and let AI create the perfect MCP config for you!
{args.param} and {env.VAR} expressions✨ Perfect for: Any API with existing documentation - the AI understands various API doc formats and generates comprehensive, production-ready configurations.
# Run directly without installation (most convenient)
npx -y mcp-rest-api --config /path/to/your/config.json
# The -y flag skips confirmation prompts for faster execution
npm install -g mcp-rest-api
mcp-rest-api --config /path/to/your/config.json
git clone https://github.com/MCP-Generator/mcp-rest-api.git
cd mcp-rest-api
npm install
npm run build
# Required: Specify configuration file
npx -y mcp-rest-api --config /path/to/config.json
# Optional: Control logging output
npx -y mcp-rest-api --config config.json --log stdio # Log to console
npx -y mcp-rest-api --config config.json --log /path/file # Log to file
npx -y mcp-rest-api --config config.json --log none # No logging (default)
Create a JSON config file manually for full control. See the Configuration Deep Dive section below for detailed examples and parameter binding options.
The system follows a clean three-layer architecture:
┌─────────────────────────┐
│ 🎯 CLI/Config Layer │ ← Entry point & config loading (cli.ts)
├─────────────────────────┤
│ 🔧 MCP Server Layer │ ← Protocol implementation & tool registry (McpServer.ts)
├─────────────────────────┤
│ 📡 HTTP Client Layer │ ← REST API communication & parameter binding (RequestHandler.ts)
└─────────────────────────┘
The system supports powerful expression binding:
{
"pathParams": {
"id": "{args.user_id}" // Maps to input parameter
},
"queryParams": {
"limit": "{args.limit || 25}", // Default value fallback
"token": "{env.API_TOKEN}" // Environment variable
},
"headers": {
"Authorization": "Bearer {env.TOKEN}"
}
}
git checkout -b feature/amazing-feature)npm run check)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the ISC License.
🎯 Transform any REST API into AI-ready tools with just JSON configuration!
✨ Get started in seconds: Generate configs with AI at api-mcp-generator.vercel.app → npx -y mcp-rest-api --config your-config.json
Made with ❤️ for the LLM community
npx -y mcp-rest-api to run immediatelyFAQs
A CLI tool that serves as an MCP Server for REST API interactions
We found that mcp-rest-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.