MU

mcp-use/mcp-use-elastic-hack-a-night

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 13 forks 质量 51 趋势 14

Today we want to try to see who is able to create a nice demo of an mcp agent that is able to search accross thousands of MCP servers.

概览

Today we want to try to see who is able to create a nice demo of an mcp agent that is able to search accross thousands of MCP servers. We provide you a csv of mcp servers which contain the following structure: the challenge is to create an MCP agent that can search and dynamically connect to a server to perform some interesting task. We will use this to share links and/or information! You can use it to ask questions as well! 1. Log in or create an account at (elastic)[https://www.elastic.co/] 2. Select the Elasticsearch use case 3. Select the Elastic Cloud Serverless deployment option 4. Create a new index called public_servers from file by clicking 5. Upload the csv public_server_rows.csv in the repo 6. In the import settings, select advanced, copy and replace the mapping for the fields created_at, updated_at and approved_at to ensure the date fields are the correct types to be searchable. 8. Create an API key and copy it in a .env file in the repo with name ELASTIC_API_KEY 9.

README

以下为原文 README 节选,完整内容请查看原文。

Hello, yall.

Today we want to try to see who is able to create a nice demo of an mcp agent that is able to search accross thousands of MCP servers.

We provide you a csv of mcp servers which contain the following structure:

from dataclasses import dataclass
from datetime import datetime
from typing import Optional, List, Dict, Any

@dataclass
class MCPServer:
    """Dataclass representing an MCP Server from the public_servers_rows.csv dataset"""
    
    id: str
    name: str
    slug: str
    description: str
    namespace: str
    github_repo_url: str
    github_user_id: int
    github_stars: int
    github_readme_url: str
    github_icon_url: str
    spdx_license: Optional[str]
    categories: List[str]
    tools: List[Any]
    environment_variables_schema: Dict[str, Any]
    status: str
    is_featured: bool
    created_at: datetime
    updated_at: datetime
    submitted_by: Optional[str]
    approved_by: Optional[str]
    approved_at: Optional[datetime]
    search_vector: str
    usable: bool
    config: Dict[str, Any]

the challenge is to create an MCP agent that can search and dynamically connect to a server to perform some interesting task.

Set up

Join Discord chat

DISCORD JOIN LINK

We will use this to share links and/or information! You can use it to ask questions as well!

Clone the repo

git clone [email protected]:mcp-use/mcp-use-elastic-hack-a-night.git

2. Set up an Elastic Cloud Serverless project

  1. Log in or create an account at (elastic)[https://www.elastic.co/]
  2. Select the Elasticsearch use case
  3. Select the Elastic Cloud Serverless deployment option
  4. Create a new index called public_servers from file by clicking Upload File
  5. Upload the csv public_server_rows.csv in the repo
  6. In the import settings, select advanced, copy and replace the mapping for the fields created_at, updated_at and approved_at to ensure the date fields are the correct types to be searchable.
{
  "properties": {
    "approved_at": {
      "type": "date",
      "format": "yyyy-MM-dd HH:mm:ss.SSSX||yyyy-MM-dd HH:mm:ss.SSSSX||yyyy-MM-dd HH:mm:ss.SSSSSX||yyyy-MM-dd HH:mm:ss.SSSSSSX",
      "ignore_malformed": true
      },
    "categories": {
      "type": "keyword"
    },
    "config": {
      "type": "text"
    },
    "created_at": {
      "type": "date",
      "format": "yyyy-MM-dd HH:mm:ss.SSSX||yyyy-MM-dd HH:mm:ss.SSSSX||yyyy-MM-dd HH:mm:ss.SSSSSX||yyyy-MM-dd HH:mm:ss.SSSSSSX",
      "ignore_malformed": true
      },
    "description": {
      "type": "text"
    },
    "environment_variables_schema": {
      "type": "text"
    },
    "github_icon_url": {
      "type": "keyword"
    },
    "github_readme_url": {
      "type": "keyword"
    },
    "github_repo_url": {
      "type": "keyword"
    },
    "github_stars": {
      "type": "long"
    },
    "github_user_id": {
      "type": "long"
    },
在 GitHub 查看完整 README

安装

npx @playwright/mcp@latest
新手?先看 mcpskill.org 教程 →

配置

(elastic) ➜ elastic git:(main) ✗ python search.py [{'_index': 'public_servers', '_id': 'F0AtupgBA9pwI1pDAbJB', '_score': 5.6726255, '_source': {'environment_variables_schema': '{"type":"object","required":[],"properties":{}}', 'description': 'Integrates with the Tavily API to provide web search capabilities, enabling internet searches and fact-checking for up-to-date information retrieval.', 'created_at': '2025-08-13 02:47:33.760164+00', 'github_repo_url': 'https://github.com/algonacci/mcp-tavily-search', 'github_stars': 0, 'tools': '[]', 'usable': False, 'search_vector': "'api':7 'capabl':12 'check':19 'date':24 'enabl':13 'fact':18 'fact-check':17 'inform':25 'integr':3 'internet':14 'provid':9 'retriev':26 'search':2,11,15 'tavili':1,6 'up-to-d':21 'web':10", 'updated_at': '2025-08-13 02:47:33.76017+00', 'approved_at': '2025-08-13 02:47:33.760172+00', 'name': 'Tavily Search', 'namespace': 'algonacci', 'id': 'ae6de2d8-f963-35d8-0af8-ba57be494c1b', 'categories': '["general"]', 'github_user_id': 0, 'config': '{"mcpServers":{"tavily_search":{"args":["--directory","%USERPROFILE%/Documents/GitHub/mcp-tavily-search","run","python","main.py"],"command":"uv"}}}', 'slug': 'algonacci-tavily-search-tavily-search', 'github_i\