mcp-server-101
This project π is a robust implementation of the Model Context Protocol (MCP), designed to facilitate seamless integration and interaction with various documentation sources. It provides tools for querying and extracting relevant information from documentation, making it an essential resource for developers working with libraries
Documentation
π MCP-Server-101
π Project Overview
MCP-Server-101 is a robust implementation of the Model Context Protocol (MCP), designed to facilitate seamless integration and interaction with various documentation sources. It provides tools for querying and extracting relevant information from documentation, making it an essential resource for developers working with libraries like `langchain`, `openai`, and `llama-index`.
π Model Context Protocol (MCP)
The Model Context Protocol (MCP) is an open, standardized protocol that connects AI models with external data sources and tools, functioning like a βUSB-C portβ for AI applications. MCP uses a client-server architecture: hosts (AI applications) communicate via MCP clients to lightweight MCP servers, which expose specific functionalities by interfacing with local files, databases, APIs, or other services.
Key components include:
- Hosts: AI applications needing access to external data or tools.
- Clients: Maintain one-to-one connections with MCP servers.
- MCP Servers: Lightweight servers exposing functionality over MCP.
- Local Data Sources: Files or databases accessed by servers.
- Remote Services: External APIs or services accessed by servers.
MCP servers can provide three main types of capabilities:
- Resources: File-like data that can be read by clients (like API responses or file contents)
- Tools: Functions that can be called by the LLM (with user approval)
- Prompts: Pre-written templates that help users accomplish specific tasks
For example, a host like Cursor instructs its MCP client to update a Google Sheet and send a Slack message; the client then connects to separate MCP servers for Google Sheets and Slack, which call the respective APIs and return the results back through the client to the host.

ποΈ Key Functionalities
1. Environment Configuration
The project uses `dotenv` to load environment variables, ensuring secure and flexible configuration management.
2. Web Search
The `search_web` function performs web searches using the Serper.dev API. It retrieves up to two results for a given query and handles timeouts gracefully.
3. Web Content Fetching
The `fetch_url` function fetches and parses visible text content from a webpage. It uses `httpx` for asynchronous HTTP requests and `BeautifulSoup` for HTML parsing.
4. Documentation Search Tool
The `get_docs` MCP tool allows users to search documentation for specific queries within supported libraries (`langchain`, `openai`, `llama-index`). It performs a web search constrained to the documentation domain of the selected library and extracts visible text content from the top results.
5. Server Execution
The MCP server is executed using the `mcp.run` method with `stdio` transport, making it suitable for integration with other tools and systems.
π» Getting Started
Prerequisites
- Python 3.12 or higher
- `pip` (Python package manager)
- Access to the Serper.dev API (API key required)
Installing uv Package Manager
On MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shMake sure to restart your terminal afterwards to ensure that the `uv` command gets picked up.
Project Setup
1. Create and initialize the project:
# 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]" httpx2. Create the server implementation file:
touch main.pyRunning the Server
1. Start the MCP server:
uv run main.py2. The server will start and be ready to accept connections
Connecting to Claude Desktop
1. Install Claude Desktop from the official website
2. Configure Claude Desktop to use your MCP server:
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
{
"mcpServers": {
"mcp-server": {
"command": "uv", # It's better to use the absolute path to the uv command
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/YOUR/mcp-server",
"run",
"main.py"
]
}
}
}3. Restart Claude Desktop
π§πΌβπ» Features and Architecture
1. Modular Design
The project is structured to ensure modularity and maintainability. Key components include:
- `main.py`: Implements the MCP server with tools for web search and documentation retrieval.
- `pyproject.toml`: Defines project metadata and dependencies, ensuring compatibility and ease of setup.
- `uv.lock`: Locks dependency versions for consistent environments.
2. Asynchronous Operations
The server leverages asynchronous programming for efficient web searches and content fetching, using libraries like `httpx` and `BeautifulSoup`.
3. Dependency Management
Dependencies are managed using `pyproject.toml` and locked with `uv.lock`. Key dependencies include:
- `beautifulsoup4`: For HTML parsing.
- `dotenv`: For environment variable management.
- `httpx`: For asynchronous HTTP requests.
- `mcp[cli]`: For MCP server implementation.
4. Documentation Search Tool
The `get_docs` tool allows users to query documentation for specific libraries (`langchain`, `openai`, `llama-index`). It integrates web search and content extraction to provide relevant results.
5. Extensibility
The project is designed for extensibility, allowing developers to add new tools or integrate additional libraries with minimal effort.
6. Environment Configuration
Environment variables are managed using `.env` files, ensuring secure and flexible configuration.
7. Standards Compliance
The project adheres to modern Python standards, requiring Python 3.12 or higher, and uses `pyproject.toml` for configuration.
8. Dependency Locking
The `uv.lock` file ensures that all dependencies are pinned to specific versions, preventing compatibility issues across environments.
9. Future Enhancements
- Add support for additional libraries in the `get_docs` tool.
- Implement caching for frequently accessed documentation.
- Enhance error handling for web requests.
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
π License
Distributed under the MIT License. See `LICENSE` file for more information.
π Connect with Me
Feel free to reach out for collaboration, questions, or potential opportunities! I'm always excited to discuss
- π§ Intelligent AI Agents
- π Risk Analysis & Financial Technology
- π€ Machine Learning Solutions
- π AI-Driven Decision Support Systems
Frequently asked questions
What is mcp-server-101?
mcp-server-101 is This project π is a robust implementation of the Model Context Protocol (MCP), designed to facilitate seamless integration and interaction with various documentation sources. It provides tools for querying and extracting relevant information from documentation, making it an essential resource for developers working with libraries
How do I install mcp-server-101?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-server-101 open source?
Yes β it is hosted on GitHub at https://github.com/shiv-rna/MCP-Server-101 and has 1 stars.
Related MCP tools
An MCP client for Neovim that seamlessly integrates MCP servers into your editing workflow with an intuitive interface for managing, testing, and using MCP s...
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
A text-based user interface (TUI) client for interacting with MCP servers using Ollama. Features include multi-server, dynamic model switching, streaming res...
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth! Python-based implementation. Trusted by 11000+ developers.
Mcp-use is the easiest way to interact with mcp servers with custom agents TypeScript-based implementation. Trusted by 8100+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP