OpenRouter MCP Client for Cursor

by palolxx

Not rated
GitHub

About

An MCP client for Cursor that uses OpenRouter.ai to access multiple AI models. Requires an OpenRouter API key.

Details

Author
palolxx
Categories
Developer Tools, AI, API

Setup

Install OpenRouter MCP Client for Cursor in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/palolxx/openroutermcptest4

Follow the installation instructions in the repository README, then restart your MCP client.

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.

- Node.js v18.0.0 or later(important!)
- OpenRouter API key (get one atopenrouter.ai/keys)

- Connect to OpenRouter.ai via MCP
- Access multiple AI models from various providers (Google, DeepSeek, Meta, etc.)
- Use MCP transport mechanism to communicate with Cursor
- Cache model information to reduce API calls
- Support for both free and paid models
- Multi-model completion utility to combine results from multiple models

This client provides access to all models available on OpenRouter, including:

- Google Gemini 2.5 Pro
- DeepSeek Chat v3
- Meta Llama 3.1
- DeepSeek R1
- Qwen Coder
- Mistral Small 3.1
- And many more!

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

- Help you create a.envfile with your OpenRouter API key
- Install all dependencies
- Build the project
- Provide next steps

# 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.envfile 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

To use this client with Cursor, you need to update Cursor's MCP configuration file:
-

Find Cursor's configuration directory:

- Windows:%USERPROFILE%\.cursor\
- macOS:~/.cursor/
- Linux:~/.cursor/

Edit or create themcp.jsonfile 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" } } } }

ReplaceFULL_PATH_TOwith the actual path to your client installation.

- Opening Cursor
- Press Ctrl+Shift+L (Windows/Linux) or Cmd+Shift+L (macOS) to open the model selector
- Choose "custom-openrouter-client" from the list

Uncomment the test functions insrc/index.tsto test direct API interaction:

// Uncomment to test the direct API testDirectApi().catch(console.error); testMultiModelCompletion().catch(console.error);
# 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:

If you have an older version, download and install the latest LTS version fromnodejs.org.

If you encounter errors related to ES modules vs CommonJS:

- The main codebase uses ES modules (indicated by"type": "module"in package.json)
- The installation script uses CommonJS (with a .cjs extension)
- Make sure to run the installation script withnode install.cjs

If Cursor doesn't seem to connect to your client:
- Make sure the path inmcp.jsonis correct and uses forward slashes
- Check that you've built the client withnpm run build
- Verify that your OpenRouter API key is correct in the env settings
- Check Cursor logs for any errors

- OpenRouter Documentation
-
Model Context Protocol (MCP) Documentation
-
Cursor Editor

You can deploy this MCP client toSmitheryto make it available to various AI agents and applications.
-

Fork this repositoryto your GitHub account

- Click "Add Server" in the Smithery dashboard
- Select your forked repository
- Configure the build settings:

- Set the base directory to the repository root
- Ensure the Dockerfile and smithery.yaml are detected

- Smithery will automatically build and deploy your MCP server
- Once deployed, users can configure it with their own OpenRouter API key

After deployment, users can access your server through the Smithery registry:
- In their MCP client (like Claude, or any other MCP-compatible client), add the server using Smithery's registry
- Configure their OpenRouter API key and preferred default model
- Start using the server to access multiple AI models through OpenRouter

- Smithery: Easier for distribution to others; no need for users to clone and build the repository
- Local Installation: Better for personal use and development; more control over the environment

Choose the approach that best fits your needs.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Access 30+ AI models in Claude Code with zero API keys. One wallet, pay-per-request.

Remote Streamable HTTP MCP gateway for GPT-5.5 chat plus 92 text, web, JSON, and x402 discovery tools with Base USDC pay-per-call.

Deploy and serve Haystack pipelines as REST APIs, MCP Tools, and OpenAI-compatible chat completion backends.

JCode Harness Cloud is a paid remote MCP endpoint for OpenAI Codex harness MCP. It exposes structured JSON tools, a public server card, token-based access, usage receipts, and audit-ready wo

Provides educational content, model information, and read-only API interactions for Lerian developers.

A command-line interface wrapper for the Google Gemini API, enabling interaction with Gemini's Search and Chat tools.

A backend service providing tools, resources, and prompts for AI models using the Model Context Protocol (MCP).

A bridge API service connecting Ollama with Model Context Protocol (MCP) servers.

MCP server for OpenRouter — chat with any model through one API key

Browse 160+ LLM models with live pricing (no API key needed) and route chat completions through the OrcaRouter gateway.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.