mcp-client-typescript
This project implements an MCP server in Node.js that provides a tool to search and fetch documentation snippets for popular AI/ML libraries. It uses Google to search for the latest documentation and handles timeouts and search failures gracefully.
GitHub Stars
0
User Rating
Not Rated
Forks
0
Issues
0
Views
1
Favorites
0
# 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 Structure
mcp-docs-server/ โโโ server.js # The MCP server implementation โโโ .env # Environment variables โโโ README.md # This file
---
## โ๏ธ Setup
1. **Clone the repository**
```bash
git clone <repo-url>
cd mcp-docs-server
Install dependencies
npm install
Create a
.env
fileSERPER_API_KEY=your_serper_api_key
Run the MCP server
node server.js
๐ ๏ธ 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
๐ฆ 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.
๐ค Contributing
Feel free to open issues or submit pull requests!
๐ License
MIT License.
๐ Links
๐๐ ๐๐ฅ๐จ๐๐ฃ๐ ๐ผ๐๐๐๐๐๐๐ฃ.
25
Followers
119
Repositories
0
Gists
7
Total Contributions