HaseebAhmed49/e2e-mcp-server
If you are the rightful owner of e2e-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The e2e-MCP-Server is a small MCP server that provides a tool for searching and retrieving documentation snippets.
🧠 e2e-MCP-Server
📘 Purpose
This project implements a small MCP (Modular Connector Protocol) server that exposes a tool called get_docs.
🔧 The get_docs tool performs:
- 🔍 Searches documentation sites via Serper
- 🌐 Fetches matching web pages
- 🧹 Converts and cleans HTML to text (optionally via an LLM)
- 🏷️ Returns labeled source snippets
📂 Files of Interest
| File | Description |
|---|---|
mcp_server.py / mcp_Server.py | MCP server and tool registration (duplicate files — keep one) |
client.py | Example stdio client that calls get_docs |
utils.py | Helper functions: clean_html_to_text, get_response_from_llm |
.env | Environment variables (not committed) |
🧩 Requirements
- Python 3.10+ (project uses modern typing and async features)
- Recommended packages:
fastmcphttpxpython-dotenvtrafilatura(or similar)groq(or your chosen LLM client)uv(optional runner)
⚙️ Quick Setup (macOS)
1️⃣ Clone the Repository
cd /Users/haseebahmed/Desktop/LLM/e2e-mcp-server
2️⃣ Create and Activate a Virtual Environment
python -m venv .venv
source .venv/bin/activate
3️⃣ Install Dependencies
If using pyproject.toml
pip install --upgrade pip
pip install .
Or install minimal dependencies manually
pip install fastmcp httpx python-dotenv trafilatura uv
Add your LLM client package, e.g.:
pip install groq
🔐 Environment Variables / API Keys
Create a .env file in the project root (this repo’s .gitignore already excludes it).
Example .env
SERPER_API_KEY=your_serper_api_key_here GROQ_API_KEY=your_groq_api_key_here # or your LLM client key
Notes
• 🚫 Do not commit .env or real API keys.
• 🔁 Rotate keys if they are ever leaked.
• 🧭 Adjust variable names if your LLM client uses different names.
🚀 Running the MCP Server
Option A — Run with Python
python mcp_server.py
or (if using the alternate filename)
python mcp_Server.py
Option B — Run with uv
(useful for client examples that spawn the server)
ensure 'uv' is installed
uv run mcp_server.py
or
uv run mcp_Server.py
💻 Running the Example Client
Start the server (or let the client spawn it), then run:
python client.py
The example client demonstrates: • Listing tools • Calling get_docs over stdio
🧰 Troubleshooting & Tips
• ❗ If network calls fail → wrap httpx calls in try/except and inspect errors.
• ✅ Validate Serper response shape before indexing ["organic"].
• ⚙️ Use uv only if installed; otherwise run Python directly.
• 🔁 Consider adding retry/backoff and logging for production use.
⚖️ License & Security • 🔒 Never commit API keys or sensitive credentials. • 📄 Follow dependency license terms appropriately.