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

README
# 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
  1. Install dependencies

    npm install
    
  2. Create a .env file

    SERPER_API_KEY=your_serper_api_key
    
  3. 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

Author Information
Anas Yakubu

๐•Š๐• ๐•—๐•ฅ๐•จ๐•’๐•ฃ๐•– ๐”ผ๐•Ÿ๐•˜๐•š๐•Ÿ๐•–๐•–๐•ฃ.

ษดสแด แด›แด‡แด„สœษดแดสŸแดษขษชแด‡๊œฑ สŸษชแดษชแด›แด‡แด…Nigeria

25

Followers

119

Repositories

0

Gists

7

Total Contributions

Top Contributors

Threads