An MCP client for Cursor that uses OpenRouter.ai to access multiple AI models. Requires an OpenRouter API key.
A Model Context Protocol (MCP) client for Cursor that utilizes OpenRouter.ai to access multiple AI models.
This client provides access to all models available on OpenRouter, including:
The easiest way to install is to use the setup script:
# Clone the repository
git clone https://your-repo-url/openrouter-mcp-client.git
cd openrouter-mcp-client
# Run the installation script
node install.cjs
The script will:
.env
file with your OpenRouter API keyIf you prefer to install manually:
# Clone the repository
git clone https://your-repo-url/openrouter-mcp-client.git
cd openrouter-mcp-client
# Install dependencies
npm install
# Copy environment file and edit it with your API key
cp .env.example .env
# Edit .env file with your OpenRouter API key
# Build the project
npm run build
Edit the .env
file with your OpenRouter API key and default model:
OPENROUTER_API_KEY=your_api_key_here
OPENROUTER_DEFAULT_MODEL=google/gemini-2.5-pro-exp-03-25:free
Get your API key from OpenRouter Keys.
To use this client with Cursor, you need to update Cursor's MCP configuration file:
Find Cursor's configuration directory:
%USERPROFILE%\.cursor\
~/.cursor/
~/.cursor/
Edit or create the mcp.json
file in that directory. Add a configuration like this:
{
"mcpServers": {
"custom-openrouter-client": {
"command": "node",
"args": [
"FULL_PATH_TO/openrouter-mcp-client/dist/index.js"
],
"env": {
"OPENROUTER_API_KEY": "your_api_key_here",
"OPENROUTER_DEFAULT_MODEL": "google/gemini-2.5-pro-exp-03-25:free"
}
}
}
}
Replace FULL_PATH_TO
with the actual path to your client installation.
Restart Cursor
Select the client by:
Uncomment the test functions in src/index.ts
to test direct API interaction:
// Uncomment to test the direct API
testDirectApi().catch(console.error);
testMultiModelCompletion().catch(console.error);
Then run:
npm start
# Watch mode for development
npm run dev
Important: This project requires Node.js v18.0.0 or later. If you're using an older version, you will see EBADENGINE warnings and may encounter errors. To check your Node.js version:
node --version
If you have an older version, download and install the latest LTS version from nodejs.org.
If you encounter errors related to ES modules vs CommonJS:
"type": "module"
in package.json)node install.cjs
If Cursor doesn't seem to connect to your client:
mcp.json
is correct and uses forward slashesnpm run build
You can deploy this MCP client to Smithery to make it available to various AI agents and applications.
Fork this repository to your GitHub account
Sign in to Smithery at smithery.ai using your GitHub account
Add a new server:
Deploy your server:
After deployment, users can access your server through the Smithery registry:
Choose the approach that best fits your needs.
Performs data enrichment on observables using third-party services via the security-cli Python package.
Interact with the Moralis Web3 API to access blockchain data across multiple networks through a structured interface.
MCP server to provide Jira Tickets information to AI coding agents like Cursor.
Edit Android preferences using adb and Node.js.
Interact with TestRail's core entities such as test cases, runs, and results using a standardized protocol.
Make your AI agent speak every language on the planet, using Lingo.dev Localization Engine.
Provides call graph analysis for LLMs using the nuanced library.
Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning with Cycode.
An example of a remote MCP server deployable on Cloudflare Workers without authentication.
Integrates with the unofficial Google Gemini CLI, allowing file access within configured directories.