Skip to main content

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.

Simply configure your AI agent (see Usage below). The agent will automatically:

  1. Download and install the package via uvx
  2. Start the server when needed
  3. 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 .

# 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

Metadata

Release files for opensearch-knowledge-base-mcp-server 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opensearch-knowledge-base-mcp-server 1.0.0
File Size Uploaded Provenance
opensearch_knowledge_base_mcp_server-1.0.0.tar.gz 13.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for opensearch-knowledge-base-mcp-server 1.0.0
File Interpreter ABI Platform
opensearch_knowledge_base_mcp_server-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / opensearch_knowledge_base_mcp_server-1.0.0.tar.gz

Download URL opensearch_knowledge_base_mcp_server-1.0.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7a4bdbb025b2958ca267e15624c29f1c11ce1602d1a00661a3a8565b632fbe2e
BLAKE2b-256 checksum
How to use checksums
a432feebc8aba7c197398c911aac85b0e02b4247070dc040a9672d71455c602c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / opensearch_knowledge_base_mcp_server-1.0.0-py3-none-any.whl

Download URL opensearch_knowledge_base_mcp_server-1.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4c2f4f8889e358002779c495d118efb007166f757a5ed23d63d6c413576611a
BLAKE2b-256 checksum
How to use checksums
1bd860c1ebe6926fe9365be0a4882c39424abe44b0b0cda87e92a40e473d80d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for opensearch-knowledge-base-mcp-server 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page