mcp-gateway-cli
v1.0.0
Published
CLI tool for setting up MCP servers with AI clients
Maintainers
Readme
MCP Gateway CLI
A command-line tool for easily setting up MCP (Model Context Protocol) servers with AI clients like Cursor IDE and Claude AI.
Features
- 🚀 One-command setup for Cursor IDE and Claude AI
- 🔐 Support for API key authentication
- 🛠️ Cross-platform support (macOS, Windows, Linux)
- ✨ Automatic configuration file management
- 📝 Clear setup instructions and feedback
Installation
You can run the CLI directly using npx without installing it globally:
npx @mcp-gateway/cliOr install it globally:
npm install -g @mcp-gateway/cliUsage
Setup with Cursor IDE
npx @mcp-gateway/cli cursor --url "https://your-mcp-server.com/mcp" --name "My MCP Server"With API key authentication:
npx @mcp-gateway/cli cursor --url "https://your-mcp-server.com/mcp" --name "My MCP Server" --api-key "your-api-key"Setup with Claude AI
npx @mcp-gateway/cli claude --url "https://your-mcp-server.com/mcp" --name "My MCP Server"With API key authentication:
npx @mcp-gateway/cli claude --url "https://your-mcp-server.com/mcp" --name "My MCP Server" --api-key "your-api-key"List configured servers
npx @mcp-gateway/cli listCommand Options
Common Options
--url, -u: Required - MCP server URL--name, -n: Server name (defaults to "MCP Gateway")--api-key, -k: API key for authentication (optional)
Examples
Basic setup for Cursor:
npx @mcp-gateway/cli cursor -u "https://api.example.com/mcp" -n "Example API"Setup with authentication:
npx @mcp-gateway/cli cursor -u "https://api.example.com/mcp" -n "Example API" -k "sk-1234567890"Setup for Claude AI:
npx @mcp-gateway/cli claude -u "https://api.example.com/mcp" -n "Example API"
Configuration Locations
The CLI automatically detects your platform and configures the appropriate files:
Cursor IDE
- All platforms:
~/.cursor/mcp.json
Claude AI
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
Post-Setup Steps
After configuring Cursor IDE:
- Restart Cursor IDE
- Open the command palette (Cmd/Ctrl + Shift + P)
- Look for MCP-related commands
After configuring Claude AI:
- Restart Claude AI application
- The MCP server should be available in your conversation
Troubleshooting
Common Issues
- Permission errors: Make sure you have write permissions to the configuration directories
- Invalid URL: Ensure your MCP server URL is accessible and uses HTTP/HTTPS
- Configuration not applied: Try restarting the AI client application
Getting Help
npx @mcp-gateway/cli --help
npx @mcp-gateway/cli cursor --help
npx @mcp-gateway/cli claude --helpDevelopment
To contribute to this CLI tool:
- Clone the repository
- Install dependencies:
npm install - Build:
npm run build - Test locally:
npm run dev
License
MIT License - see LICENSE file for details.
