UNPKG

@cequenceai/mcp-cli

Version:

Cequence MCP CLI - Command-line tool for setting up Cequence MCP servers with AI clients

172 lines (118 loc) 4.93 kB
# Cequence MCP CLI A command-line tool by Cequence Security for easily setting up Cequence MCP (Model Context Protocol) servers with AI clients like Cursor IDE, Claude AI, and Windsurf IDE. ## Features - 🚀 One-command setup for Cursor IDE, Claude AI, and Windsurf IDE - 🔐 Support for API key authentication - 🛠️ Cross-platform support (macOS, Windows, Linux) - ✨ Automatic configuration file management - 📝 Clear setup instructions and feedback - 🔒 Powered by Cequence's API security platform ## Installation You can run the CLI directly using npx without installing it globally: ```bash npx @cequenceai/mcp-cli@latest --help ``` Or install it globally: ```bash npm install -g @cequenceai/mcp-cli ``` ## Usage ### Setup with Cursor IDE ```bash npx @cequenceai/mcp-cli@latest cursor --url "https://your-cequence-gateway.com/mcp" --name "Cequence API Gateway" ``` With API key authentication: ```bash npx @cequenceai/mcp-cli@latest cursor --url "https://your-cequence-gateway.com/mcp" --name "Cequence API Gateway" --api-key "your-api-key" ``` ### Setup with Claude AI ```bash npx @cequenceai/mcp-cli@latest claude --url "https://your-cequence-gateway.com/mcp" --name "Cequence API Gateway" ``` With API key authentication: ```bash npx @cequenceai/mcp-cli@latest claude --url "https://your-cequence-gateway.com/mcp" --name "Cequence API Gateway" --api-key "your-api-key" ``` ### Setup with Windsurf IDE ```bash npx @cequenceai/mcp-cli@latest windsurf --url "https://your-cequence-gateway.com/mcp" --name "Cequence API Gateway" ``` With API key authentication: ```bash npx @cequenceai/mcp-cli@latest windsurf --url "https://your-cequence-gateway.com/mcp" --name "Cequence API Gateway" --api-key "your-api-key" ``` ### List configured servers ```bash npx @cequenceai/mcp-cli@latest list ``` ## Command Options ### Common Options - `--url, -u`: **Required** - Cequence MCP server URL - `--name, -n`: Server name (defaults to "Cequence MCP Gateway") - `--api-key, -k`: API key for authentication (optional) ### Examples 1. **Basic setup for Cursor:** ```bash npx cequence-mcp-cli@latest cursor -u "https://api.example.com/mcp" -n "Example API via Cequence" ``` 2. **Setup with authentication:** ```bash npx cequence-mcp-cli@latest cursor -u "https://api.example.com/mcp" -n "Example API via Cequence" -k "sk-1234567890" ``` 3. **Setup for Claude AI:** ```bash npx cequence-mcp-cli@latest claude -u "https://api.example.com/mcp" -n "Example API via Cequence" ``` 4. **Setup for Windsurf IDE:** ```bash npx cequence-mcp-cli@latest windsurf -u "https://api.example.com/mcp" -n "Example API via Cequence" ``` ## 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` ### Windsurf IDE - **All platforms**: `~/.windsurf/mcp.json` ## Post-Setup Steps ### After configuring Cursor IDE: 1. Restart Cursor IDE 2. Open the command palette (Cmd/Ctrl + Shift + P) 3. Look for MCP-related commands 4. Your Cequence-secured APIs are now available as MCP tools ### After configuring Claude AI: 1. Restart Claude AI application 2. The Cequence MCP server should be available in your conversation 3. Start using your secured APIs through Claude's interface ### After configuring Windsurf IDE: 1. Restart Windsurf IDE 2. Open the command palette (Cmd/Ctrl + Shift + P) 3. Look for MCP-related commands 4. Your Cequence-secured APIs are now available as MCP tools ## About Cequence Security Cequence Security protects APIs from attacks, abuse, and data theft. This CLI tool enables you to easily connect your Cequence-secured APIs to AI development environments, providing secure and monitored access to your API resources. ## Troubleshooting ### Common Issues 1. **Permission errors**: Make sure you have write permissions to the configuration directories 2. **Invalid URL**: Ensure your Cequence MCP server URL is accessible and uses HTTP/HTTPS 3. **Configuration not applied**: Try restarting the AI client application ### Getting Help ```bash npx @cequenceai/mcp-cli@latest --help npx @cequenceai/mcp-cli@latest cursor --help npx @cequenceai/mcp-cli@latest claude --help npx @cequenceai/mcp-cli@latest windsurf --help ``` ## Development To contribute to this CLI tool: 1. Clone the repository 2. Install dependencies: `npm install` 3. Build: `npm run build` 4. Test locally: `npm run dev` ## License MIT License - see LICENSE file for details. ## Support For support with Cequence products or this CLI tool, please visit [Cequence Security Support](https://www.cequence.ai/support) or open an issue in this repository.