OpenRouter LangChain MCP Server
Provides tools for querying MongoDB, including listing collections and running find queries with filters and limits.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenRouter LangChain MCP ServerWhich users are active?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenRouter LangChain MCP Server
A small command-line chatbot that lets an OpenRouter model query MongoDB through a Model Context Protocol (MCP) server.
The project has two processes:
server.jsexposes MongoDB query tools over MCP stdio transport.client.jsconnects to the server, binds its tools to a LangChain OpenRouter model, and provides an interactive chat prompt.
Requirements
Node.js 18 or newer
A running MongoDB instance
Related MCP server: mcp-mongo
Setup
Install dependencies:
npm installCreate a
.envfile in the project root:OPENROUTER_API_KEY=your_openrouter_api_key MONGODB_URI=mongodb://localhost:27017MONGODB_URIis optional and defaults tomongodb://localhost:27017.Start the interactive client:
npm start
The client starts server.js automatically over stdio, so the MCP server does not need to be started separately.
First run
The server uses the chatbot_db database. If both the users and orders collections are missing, it creates them and inserts sample records. Existing collections are left unchanged.
The sample data includes:
users: user IDs, names, email addresses, and statusesorders: order IDs, user IDs, products, and amounts
Available MCP tools
get_collections
Lists the collections in the configured MongoDB database.
query_collection
Runs a MongoDB find query. It accepts:
collection(required): collection name, such asusersorordersfilter(optional): MongoDB filter objectlimit(optional): maximum number of documents to return; defaults to10
Examples of questions to ask the chatbot:
Which users are active?
Show orders over $100.
What products did user 1 order?
List the available collections.Type exit to close the client.
Configuration
The client currently uses the OpenRouter model identifier:
nvidia/nemotron-3-ultra-550b-a55b:freeTo use another OpenRouter-supported model, change the model value in client.js.
Project structure
.
├── client.js # Interactive LangChain client
├── server.js # MCP server and MongoDB tools
├── package.json
└── README.mdNotes
Keep
.envout of version control because it contains your API key.The MCP server logs connection and seeding messages to stderr so they do not interfere with the stdio protocol.
The
npm startscript runsclient.js, which starts the MCP server automatically over stdio.
Chatbot

Users Collection

Orders Collection

Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
471The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
OpenRouter for tools and data. Compare catalog providers and call them from one hosted MCP endpoint.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.47175MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query and introspect MongoDB databases through find, aggregate, and schema discovery operations. Supports read-only default mode with optional write capabilities and works with any MCP-compatible client via stdio or HTTP transports.-
- AlicenseNot gradedqualityDmaintenanceEnables CRUD operations on MongoDB databases and collections, including listing databases and collections, via MCP tools.28Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with MongoDB databases through natural language, supporting document CRUD, aggregation, collection listing, and statistics.78,836Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/devashishkumar/openrouter-langchain-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server