Elasticsearch Semantic Search MCP Server
MCP サーバー: Elasticsearch セマンティック検索ツール
デモリポジトリ: https://j.blaszyk.me/tech-blog/mcp-server-elasticsearch-semantic-search/
目次
Related MCP server: ElasticMind-MCP
概要
このリポジトリは、 ElasticsearchでインデックスされたSearch Labs ブログ投稿を通じてセマンティック検索を行うための MCP サーバーの Python 実装を提供します。
Elastic Open Crawlerを使用してブログ投稿をクロールし、 search-labs-postsインデックスに保存していることを前提としています。
MCPサーバーの実行
ES_URLとES_AP_KEYを.envファイルに追加します (最小限の権限で API キーを生成する方法については、こちらをご覧ください)
MCP Inspectorでサーバーを起動します。
make dev実行したら、次の MCP インスペクターにアクセスします: http://localhost:5173
Claude Desktopとの統合
MCP サーバーをClaude Desktopに追加するには:
make install-claude-configこれにより、ホームディレクトリのclaude_desktop_config.jsonが更新されます。次回の再起動時に、Claude アプリはサーバーを検出し、宣言されたツールを読み込みます。
クロール検索ラボのブログ投稿
1. クローラーの設定を確認する
Elastic Open Crawler が動作するかどうかを確認するには、次のコマンドを実行します。
docker run --rm \
--entrypoint /bin/bash \
-v "$(pwd)/crawler-config:/app/config" \
--network host \
docker.elastic.co/integrations/crawler:latest \
-c "bin/crawler crawl config/test-crawler.yml"これにより、クロールされたコンテンツが1 ページから印刷されます。
2. Elasticsearchを設定する
Elasticsearch URL と API キーを設定します。
最小限のクローラー権限を持つ API キーを生成します:
POST /_security/api_key
{
"name": "crawler-search-labs",
"role_descriptors": {
"crawler-search-labs-role": {
"cluster": ["monitor"],
"indices": [
{
"names": ["search-labs-posts"],
"privileges": ["all"]
}
]
}
},
"metadata": {
"application": "crawler"
}
}応答からencoded値をコピーし、 API_KEYとして設定します。
3. セマンティック検索のインデックスマッピングを更新する
search-labs-postsインデックスが存在することを確認してください。存在しない場合は作成してください。
PUT search-labs-postsセマンティック検索を有効にするにはマッピングを更新します。
PUT search-labs-posts/_mappings
{
"properties": {
"body": {
"type": "text",
"copy_to": "semantic_body"
},
"semantic_body": {
"type": "semantic_text",
"inference_id": ".elser-2-elasticsearch"
}
}
}bodyフィールドは**、Elasticsearch の ELSER モデルを使用してセマンティック テキスト**としてインデックス化されます。
4. 這い始める
クローラーを実行してインデックスを作成します。
docker run --rm \
--entrypoint /bin/bash \
-v "$(pwd)/crawler-config:/app/config" \
--network host \
docker.elastic.co/integrations/crawler:latest \
-c "bin/crawler crawl config/elastic-search-labs-crawler.yml"[!TIP]新しい Elasticsearch クラスターを使用する場合は、インデックスを作成する前にELSER モデルが開始するまで待機します。
5. インデックスされたドキュメントを検証する
ドキュメントがインデックスされたかどうかを確認します。
GET search-labs-posts/_countインデックス内のドキュメントの総数が返されます。Kibanaでも確認できます。
完了! Search Labsのブログ投稿でセマンティック検索ができるようになりました
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn unofficial MCP server that provides semantic search capabilities for Hugging Face models and datasets, enabling Claude and other MCP-compatible clients to search, discover, and explore the Hugging Face ecosystem using natural language queries.20MIT
- FlicenseAqualityDmaintenanceAn MCP server that indexes PDF documentation and text into Elasticsearch for semantic search and retrieval. It enables users to query knowledge bases, ingest new files, and dynamically update content through MCP-compatible clients like Claude Desktop and Cursor.41
- FlicenseNot gradedqualityDmaintenanceA semantic search system for Claude Code transcript history, exposed as an MCP server so Claude Code can query its own past sessions.
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables semantic and keyword search over Claude Code conversation history stored locally, using hybrid search, local embeddings, and time-decay scoring.23MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
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/jedrazb/elastic-semantic-search-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server