The MCP Docs Server is a Node.js implementation of a Model Context Protocol (MCP) server that provides a powerful tool to search and retrieve up-to-date documentation snippets from popular AI/ML libraries. It leverages the Serper API to perform Google searches restricted to specific documentation domains, extracts meaningful content using web
0 stars
JavaScript
Updated May 31, 2025
dotenv
express
javascript
mcp
mcp-client
mcp-server
node-js
typescript
Documentation
markdown
# MCP Docs Server
This project implements a Model Context Protocol (MCP) server in Node.js that provides a tool to search and fetch documentation snippets for popular AI/ML libraries.
---
## 🚀 Features
✅ MCP-compliant server (using `@modelcontextprotocol/sdk`)
✅ Tool: **get_docs**
✅ Searches Google for latest docs using Serper API
✅ Supports:
- LangChain
- LlamaIndex
- OpenAI
✅ Returns plain text from documentation pages
✅ Handles timeouts and search failures gracefully
---
## 📁 Project Structuremcp-docs-server/
├── server.js # The MCP server implementation
├── .env # Environment variables
└── README.md # This file
`
---
## ⚙️ Setup
1. **Clone the repository**git clone
cd mcp-docs-server
`
2. **Install dependencies**npm install
code
3. **Create a `.env` file**SERPER_API_KEY=your_serper_api_key
code
4. **Run the MCP server**node server.js
code
---
## 🛠️ Usage
The server exposes one tool:
### get\_docs
* **Description**:
Searches the latest documentation for a given query and library.
* **Arguments**:
* `query` (string): e.g. `"Chroma DB"`
* `library` (string): one of `"langchain"`, `"llama-index"`, `"openai"`
* **Returns**:
Plain text content fetched from the search results.
Example usage from a compatible MCP client:node client.js path/to/server.js
code
---
## 📦 Dependencies
* `@modelcontextprotocol/sdk`
* `dotenv`
* `httpx`
* `jsdom`
---
## 📝 Notes
* The MCP server uses the Serper API for Google search.
* To get a Serper API key, visit [serper.dev](https://serper.dev/).
---
## 🤝 Contributing
Feel free to open issues or submit pull requests!
---
## 📄 License
MIT License.
---
## 🔗 Links
* [Model Context Protocol (MCP)](https://modelcontext.org/)
* [Serper API](https://serper.dev/)Similar MCP
Based on tags & features
Trending MCP
Most active this week