joaowinderfeldbussolotto_MCP-Websearch-Server

joaowinderfeldbussolotto_MCP-Websearch-Server

3.3

This is a simple MCP server for retrieving information from the official documentation of Langchain, Llama Index, and OpenAI.

The MPC Docs Server is designed to facilitate the retrieval of documentation from Langchain, Llama Index, and OpenAI. It operates as a Model Context Protocol (MCP) server, which allows it to be integrated with other MCP-compatible applications. The server provides a straightforward tool, get_docs, which accepts a query and a library name to return relevant documentation snippets. This server is particularly useful for developers and users who need quick access to official documentation without manually searching through multiple sources. By leveraging the Serper API, the server can perform web searches to find and return the most pertinent documentation snippets, streamlining the process of information retrieval.

Features

  • {'name': 'Documentation Retrieval', 'description': 'Fetches content from the official documentation of Langchain, Llama Index, and OpenAI.'}
  • {'name': 'MCP Compatibility', 'description': 'Implements an MCP server, allowing it to be easily integrated with other MCP-compatible applications.'}
  • {'name': 'Simple Tool', 'description': 'Exposes a get_docs tool that accepts a query and library name, returning relevant documentation snippets.'}

Usage with Different Platforms

Installing uv Package Manager

bash
curl -LsSf https://astral.sh/uv/install.sh | sh

Project Setup

bash
# Create a new directory for our project
uv init mcp-server
cd mcp-server

# Create virtual environment and activate it
uv venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate

# Install dependencies
uv add "mcp[cli]" httpx python-dotenv bs4

Environment Variables


SERPER_API_KEY=YOUR_SERPER_API_KEY

Running the Server

bash
uv run main.py