🐝 Swarms MCP Documentation Server

by Ransom-Alpha

252 downloads Not rated yet
GitHub

About

MCP server to connect AI agents to any github corpa

Explore

- Hybrid Retriever πŸ”: Combines semantic and keyword search.
- Dynamic Markdown Handling πŸ“„: Smart loader based on file size.
- Specialized Loaders βš™οΈ: .py, .ipynb, .md, .txt, .yaml, .yml.
- Chunk and File Summaries πŸ“ˆ: Displays chunk counts along with file counts.
- Live Watchdog πŸ”₯: Instantly responds to any changes in corpora/.
- User Confirmation for Costs βœ…: Confirms before expensive embeddings.
- Healthcheck Endpoint πŸš‘: Ensure server is ready for use.
- Local-First πŸ—‚οΈ: All repos indexed locally without external dependencies.
- Safe Deletion Helper πŸ”₯: Auto-delete broken/mismatched indexes.

---

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 🐝 Swarms MCP Documentation Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


venv\Scripts\Activate.ps1

pip install -r requirements.txt

echo OPENAI_API_KEY=sk-... > .env

- Corpus: Drop repos inside corpora/
- Environment Variables:
- .env must contain OPENAI_API_KEY
- Index File Support:
- Both chroma-collections.parquet and chroma.sqlite3 are supported. .parquet is preferred if both exist.
- Auto-Embedding:
- If no index is found, the server will prompt you to embed and index your documents automatically.
- Optional:
- Disable Chroma compaction if you prefer:

powershell
setx CHROMA_COMPACTION_SERVICE__COMPACTOR__DISABLED_COLLECTIONS "swarms_docs"
- Command-Line Flags:
- --reindex β†’ trigger a refresh reindex during server run.

---

python

Create your environment explicitly:

python3.11 -m venv venv

Then install with:

pip install -r requirements.txt

---

swarm_docs.search

Search relevant documentation chunks

swarm_docs.list_files

List all indexed files

swarm_docs.get_chunk

Get a specific chunk by path and index

swarm_docs.reindex

Force reindex (full or incremental)

swarm_docs.healthcheck

Check MCP Server status

| Tool | Description |
| ------------------------- | ---------------------------------------------------- |
| swarm_docs.search | Search relevant documentation chunks |
| swarm_docs.list_files | List all indexed files |
| swarm_docs.get_chunk | Get a specific chunk by path and index |
| swarm_docs.reindex | Force reindex (full or incremental) |
| swarm_docs.healthcheck | Check MCP Server status |

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83d\udc1d swarms mcp documentation server": {
            "Swarms_MCPserver": {
                "command": "python",
                "args": [
                    "swarms_server.py",
                    "--reindex"
                ]
            }
        }
    }
}

McpServers

{
    "Swarms_MCPserver": {
        "command": "python",
        "args": [
            "swarms_server.py",
            "--reindex"
        ]
    }
}

<p align="center">
IDE Ready
Error Tolerant
Dynamic MD Loader
Healthcheck Tool
Smart Load Logs
</p>

Version 2.2

---

πŸ“– Description

This program is an Agent Framework Documentation MCP Server built on FastMCP, designed to enable AI agents to efficiently retrieve information from your documentation database. It combines hybrid semantic (vector) and keyword (BM25) search, chunked indexing, and a robust FastMCP tools API for seamless agent integration.

Key Capabilities:
- Efficient, chunk-level retrieval using both semantic and keyword search
- Agents can query, list, and retrieve documentation using FastMCP tools
- Local-first, low-latency design (all data indexed and queried locally)
- Automatic reindexing on file changes
- Modular: add any repos to corpora/, support for all major filetypes
- Extensible: add new tools, retrievers, or corpora as needed

Main modules:
- embed_documents.py β†’ Loads, chunks, and embeds documents
- swarms_server.py β†’ Brings up the MCP server and FastMCP tools

---

---

🌟 Key Features

- Hybrid Retriever πŸ”: Combines semantic and keyword search.
- Dynamic Markdown Handling πŸ“„: Smart loader based on file size.
- Specialized Loaders βš™οΈ: .py, .ipynb, .md, .txt, .yaml, .yml.
- Chunk and File Summaries πŸ“ˆ: Displays chunk counts along with file counts.
- Live Watchdog πŸ”₯: Instantly responds to any changes in corpora/.
- User Confirmation for Costs βœ…: Confirms before expensive embeddings.
- Healthcheck Endpoint πŸš‘: Ensure server is ready for use.
- Local-First πŸ—‚οΈ: All repos indexed locally without external dependencies.
- Safe Deletion Helper πŸ”₯: Auto-delete broken/mismatched indexes.

---

πŸ—οΈ Version History

| Version | Date | Highlights |
| ------- | ---------- | ---------------------------------------------------------------------- |
| 2.2 | 2025‑04‑25 | Split embed/load from server; full chunk counting in loading summaries |
| 1.0 | 2025‑04‑25 | Dynamic Markdown loader, color logs, Healthcheck tool |
| 0.7 | 2025‑04‑25 | Specialized file loaders for .py, .ipynb, .md |
| 0.5 | 2025‑04‑10 | OpenAI large model embeddings, extended MCP tools |
| 0.1 | 2025‑04‑10 | Initial version with generic loaders |

---

πŸ“š Managing Your Corpora (Local Repos)

Because Swarms and other frameworks are very large, full corpora are not pushed to GitHub.

Instead, you clone them manually under corpora/:

```bash

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.