MCP server for OpenSearch Knowledge Base - Search OpenSearch best practices and documentation from any AI agent
Project description
OpenSearch Knowledge Base MCP Server
Model Context Protocol (MCP) server that exposes the OpenSearch Knowledge Base API as a tool for AI agents.
Features
- MCP Tool:
search_opensearch_knowledge- Search OpenSearch best practices and documentation - Session Support: Maintain conversation context across multiple queries
- Source Citations: Returns relevant sources with relevance scores
- Easy Integration: Works with any MCP-compatible AI agent (Claude Desktop, Cline, etc.)
Installation
Important: You don't need to manually run the server! The AI agent will automatically start and manage the MCP server process when needed.
For End Users (Recommended)
Simply configure your AI agent (see Usage below). The agent will automatically:
- Download and install the package via
uvx - Start the server when needed
- Stop the server when done
No manual installation or server management required!
For Development
# Clone the repository
git clone <your-repo>
cd mcp-server
# Install in development mode
pip install -e .
# Test the server
python test_simple.py
# The package is now available as a command
# (But you still don't need to run it manually - let your AI agent do it!)
Configuration
The server requires two environment variables:
OPENSEARCH_KB_API_URL: Your API Gateway URL (e.g.,https://xxx.execute-api.us-east-1.amazonaws.com)OPENSEARCH_KB_API_TOKEN: Your API token (obtained from the Admin UI or API)
Usage with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"opensearch-knowledge-base": {
"command": "uvx",
"args": ["opensearch-knowledge-base-mcp-server"],
"env": {
"OPENSEARCH_KB_API_URL": "https://your-api-gateway-url",
"OPENSEARCH_KB_API_TOKEN": "your-api-token"
}
}
}
}
Or if installed locally:
{
"mcpServers": {
"opensearch-knowledge-base": {
"command": "python",
"args": ["/path/to/mcp-server/server.py"],
"env": {
"OPENSEARCH_KB_API_URL": "https://your-api-gateway-url",
"OPENSEARCH_KB_API_TOKEN": "your-api-token"
}
}
}
}
Usage with Cline (VS Code)
Add to your Cline MCP settings:
{
"mcpServers": {
"opensearch-knowledge-base": {
"command": "uvx",
"args": ["opensearch-knowledge-base-mcp-server"],
"env": {
"OPENSEARCH_KB_API_URL": "https://your-api-gateway-url",
"OPENSEARCH_KB_API_TOKEN": "your-api-token"
}
}
}
}
Usage with Kiro IDE
Add to your Kiro MCP configuration (.kiro/settings/mcp.json):
{
"mcpServers": {
"opensearch-knowledge-base": {
"command": "uvx",
"args": ["opensearch-knowledge-base-mcp-server"],
"env": {
"OPENSEARCH_KB_API_URL": "https://your-api-gateway-url",
"OPENSEARCH_KB_API_TOKEN": "your-api-token"
},
"disabled": false,
"autoApprove": ["search_opensearch_knowledge"]
}
}
}
Tool: search_opensearch_knowledge
Search the OpenSearch Knowledge Base for best practices, configuration guides, and troubleshooting information.
Parameters
-
question(required): Your question about OpenSearch- Example: "How to optimize OpenSearch indexing performance?"
- Example: "What are the best practices for cluster sizing?"
- Example: "How to troubleshoot slow queries?"
-
session_id(optional): Session ID for conversation continuity- Use the same session_id across queries to maintain context
- If not provided, each query is independent
Example Usage
In Claude Desktop or any MCP-compatible client:
User: Use the search_opensearch_knowledge tool to find information about
optimizing OpenSearch indexing performance
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opensearch_kb_mcp_server-1.0.1.tar.gz.
File metadata
- Download URL: opensearch_kb_mcp_server-1.0.1.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c3384cfe69fca03c9014269bfb2af288c448a2e7c623bb777bd74a118b5277
|
|
| MD5 |
41a372830b6d2778e0536d04b9b96934
|
|
| BLAKE2b-256 |
cfecb4efc2bf87a16353fbfddfdb8acd187801c7691837f5702a9c49260e336a
|
File details
Details for the file opensearch_kb_mcp_server-1.0.1-py3-none-any.whl.
File metadata
- Download URL: opensearch_kb_mcp_server-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6035f770d1efb34dda67ee2446c9613581f3bf52a293c26fc5bb989f9d91f017
|
|
| MD5 |
28f6a11a30d780c7db7e171713aebb07
|
|
| BLAKE2b-256 |
c8f7411f30d17d32de870757b380f87be10007050fef4cd312964200208182c3
|