mcp-reranker
mcp-reranker
A generic Model Context Protocol (MCP) server that provides document reranking capabilities using sentence-transformers.
This server is designed to be a standalone tool that can be used by any MCP-compatible client (such as Roo Code, Claude Desktop, or custom agents) to improve the precision of RAG (Retrieval-Augmented Generation) or to help agents make better decisions by scoring relevance between a query and multiple candidates.
💡 Proven in Production: This server was extracted as a general-purpose, reusable module from the cingulater project, where it is actively used and running in production.
Features
Cross-Encoder Reranking: Utilizes the
CrossEncodermodel fromsentence-transformersfor high-accuracy relevance scoring.Project Agnostic: Completely independent of any specific application logic.
Customizable Models: Supports various HuggingFace models. You can configure the default model via environment variables (defaults to
BAAI/bge-reranker-v2-m3).JSON Output: Returns sorted results in a structured JSON format.
Related MCP server: MCP RAG
Tools
rerank_documents
Computes relevance scores for a list of documents against a given query and returns them sorted by score.
Arguments:
query(string): The search query or the core intent to compare against.documents(array of strings): A list of document descriptions or texts to be ranked.model_name(string, optional): The HuggingFace model identifier. Defaults to theRERANKER_MODEL_NAMEenvironment variable or"BAAI/bge-reranker-v2-m3".
Response Example: A JSON-formatted string:
[
{ "document": "The most relevant document text.", "score": 0.985 },
{ "document": "A partially relevant text.", "score": 0.452 },
{ "document": "Completely irrelevant text.", "score": 0.012 }
]Installation & Usage
Running with uvx
Add the following to your MCP configuration (e.g., brownie_core_mcp_config.json).
You can customize the model used by setting the RERANKER_MODEL_NAME environment variable.
{
"mcpServers": {
"mcp-reranker": {
"command": "uvx",
"args": [
"--from",
"git+[https://github.com/globalpocket/mcp-reranker.git](https://github.com/globalpocket/mcp-reranker.git)",
"mcp-reranker"
],
"env": {
"RERANKER_MODEL_NAME": "BAAI/bge-reranker-v2-m3"
}
}
}
}Development
Prerequisites
Python 3.10+
Setup
git clone [https://github.com/globalpocket/mcp-reranker.git](https://github.com/globalpocket/mcp-reranker.git)
cd mcp-reranker
uv sync --extra devRunning Tests
uv run pytestThis server cannot be installed
Maintenance
Related MCP Servers
- -license-quality-maintenanceMCP Server for ZeroEntropy collections, top documents and rerankersLast updated
- AlicenseBqualityDmaintenanceA complete MCP server for Retrieval-Augmented Generation with file management and vector memory for agents. Supports multiple document formats (PDF, DOCX, TXT, MD, CSV, JSON) with semantic search using Hugging Face embeddings and ChromaDB for efficient vector storage.Last updated1171MIT
- AlicenseAqualityBmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.Last updated325MIT
- Alicense-qualityCmaintenanceMCP server for semantic and hybrid search over RHEL documentation using docs2db RAG, with cross-encoder reranking and support for multiple MCP clients.Last updated4Apache 2.0
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Remote ChromaDB vector database MCP server with streamable HTTP transport
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/globalpocket/mcp-reranker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server