MCP Finder

MCP Finder

A smart router that helps users discover the most relevant tools from an MCP catalog using natural language queries and AI-driven reranking. It utilizes hybrid search and intent analysis to select the best tool for a given task and explains the reasoning behind each choice.

Category
访问服务器

README

MCP Finder: My Personal Tool Router

I built this project to solve a simple problem: I have too many MCP tools and I don't know which one to use.

Instead of manually searching through documentation or guessing which server has the right tool, I created this "router". I just ask it a question in plain English, and it tells me exactly which tool to use.

How It Works

When I ask a question like "Scan my docker images for security issues", here is what happens behind the scenes:

  1. Intent Analysis: First, the system looks at my query to understand what I want. It checks if I'm asking for something "local", "free", or if I need a specific type of tool (like "security" or "database").
  2. Search: It searches my catalog (mcpfinder.sqlite) using two methods:
    • Keywords: Matches words in my query to tool descriptions.
    • Meaning (Embeddings): Matches the concept of my query to tools (so "picture" matches "image").
  3. Scoring: It gives every tool a score based on how well it matches. It even gives a bonus to tools that work best with my current editor (like Cursor).
  4. AI Reranking: Finally, it sends the top candidates to a small AI model (GPT-4o-mini). The AI looks at them like a human would, picks the best one, and explains why.

The Data Flow

I keep it simple. My data lives in a CSV file, and the app reads from a fast SQLite database.

  1. Source of Truth: db.csv
    • This is where I manually add or edit tools. It's just a spreadsheet.
  2. The Database: mcpfinder.sqlite
    • The app doesn't read the CSV directly (it's too slow). Instead, I load the data into this SQLite database.
    • The file mcp_suggester/load_mcp_csv_to_sqlite.py handles this conversion.

How I Set It Up

1. Prerequisites

I need Python installed. Then I install the dependencies:

pip install -r requirements.txt

2. Environment Variables

I need to tell the app where my database is and give it an OpenAI key (for the "smart" parts like understanding meaning and reranking).

$env:MCP_CATALOG_DB = ""
$env:OPENAI_API_KEY = "sk-..."

3. Running It

I can run the server directly to test it:

python -m mcp_suggester.server

4. Using the Web UI (Optional)

If you want a visual interface to test queries, you can use the Streamlit app:

streamlit run ui_app.py

This opens a browser window where you can:

  • Type your query in a text box
  • Adjust settings with sliders (number of results, candidate pool size)
  • See the results with nice formatting, reasoning, and copy-pasteable examples

No need to run the server separately—the UI app calls the logic directly.

Using It in Cursor

This is the best part. I connect this "router" to Cursor so I can use it while I code.

  1. Open Cursor Settings > MCP.
  2. Add a new MCP server:
    • Type: command
    • Command: python
    • Args: -m mcp_suggester.server
    • Env: Add my PYTHONPATH, MCP_CATALOG_DB, and OPENAI_API_KEY.

Now, in Cursor Chat, I just type:

"Find a tool to deploy this app to Kubernetes"

And it responds with the exact tool I need (e.g., Helm -> deploy_application).

Project Structure

  • mcp_suggester/: The core logic.
    • server.py: The entry point that Cursor talks to.
    • scoring.py: The math that ranks tools.
    • intent.py: The logic that figures out what I want.
  • db.csv: My list of tools.
  • mcpfinder.sqlite: The database the app actually reads.

How I Measure Quality

I don't just guess if the search is working. I have a test suite in the evaluation/ folder to prove it.

  • eval_dataset.csv: This is my "exam" for the system. It contains 27 real-world questions (like "Find a tool to deploy to Kubernetes") and the exact tool that should be the top answer.
  • evaluate.py: This script runs those questions through three different strategies to see which one wins.

The Results

When I run the benchmark (python evaluation/evaluate.py), here is what I typically see:

  1. Keyword Search Only: ~60% accuracy.
    • It fails when I use different words than the tool description (e.g., asking for "pictures" when the tool says "images").
  2. Hybrid Search (Keywords + Meaning): ~55-60% accuracy.
    • Better at understanding concepts, but sometimes gets confused by similar tools.
  3. Hybrid + AI Reranking: ~70%+ accuracy.
    • This is why the LLM is essential. It closes the gap by "thinking" about the results.

What the AI Actually Does

You might wonder, "Why do I need an LLM? Can't I just search?"

When the system finds 20 possible tools, it sends the top 3-5 to the LLM (GPT-4o-mini) with a very specific prompt. The LLM is not just summarizing. It is acting as a judge.

Here is exactly what it does for every single query:

  1. It Reads the Documentation: It looks at the tool's description, arguments, and capabilities.
  2. It Checks Constraints: If I asked for a "local" tool, it checks if the tool actually runs locally.
  3. It Explains "Why": It writes a human-readable reason for its choice.
    • Bad: "Score: 0.9"
    • Good (LLM): "This tool is the best fit because it specifically handles Kubernetes deployments and you asked for deployment tools."

This last step is crucial. It turns a raw database search into a helpful assistant that explains its thinking.

The Proof

Here is a snapshot of what the evaluation script outputs. You can see how the "Hybrid + LLM" strategy beats the others:

Lexical-only (TF-IDF)
---------------------
Precision@1: 0.593
Precision@3: 0.667
Recall@3:    0.611
MRR:         0.668

Hybrid (Lexical + Embedding + Intent)
-------------------------------------
Precision@1: 0.519
Precision@3: 0.667
Recall@3:    0.648
MRR:         0.599

Hybrid + LLM Rerank
-------------------
Precision@1: 0.700
Precision@3: 0.741
Recall@3:    0.725
MRR:         0.704
  • Precision@1: How often the #1 answer was correct.
  • Recall@3: How many of the correct answers I found in my top 3 results.
  • MRR: A score of "how high up" the right answer was. Higher is better.

Demo

Watch the demo video to see MCP Finder in action:

View Demo Video (Click to download/view)

Note: GitHub markdown doesn't support inline video playback. The link above will allow you to download and view the video.


Where I'm Taking This Next

Right now, this is a solid prototype. But to make it "Enterprise Ready" and suitable for industry production, here is my plan:

1. Ditch the CSV for a Real Database

Currently, I edit a CSV file manually. In a real production environment, I would move this to PostgreSQL with pgvector.

  • Why?: It handles millions of tools, supports concurrent users, and does vector search natively. No more syncing scripts!

2. Automated Ingestion

I shouldn't have to manually add tools. I want to build a crawler that watches GitHub repositories or MCP registries.

  • The Flow:
    1. Crawler detects a new MCP server release.
    2. It scrapes the README.md and tool definitions.
    3. An LLM automatically generates the description, tags, and example queries.
    4. It pushes the new tool to the database automatically.

3. Admin Dashboard & Analytics

I need a UI to see what's happening.

  • Curator Mode: To approve/reject new tools found by the crawler.
  • Analytics: To see what users are searching for. If everyone searches for "Kubernetes" and gets no results, I know I need to add more Kubernetes tools.

4. Feedback Loop

The system should learn from usage.

  • If I search for "deploy" and consistently pick "Helm" over "Kubernetes-CLI", the system should learn that preference and rank Helm higher next time automatically.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选