Skip to main content

opensolr-mcp

mcp-name: com.opensolr/opensolr-mcp

MCP (Model Context Protocol) server for Opensolr — gives any AI agent managed Apache Solr search as tools: hybrid (BM25 + kNN) retrieval, server-side GPU embeddings, document indexing, and grounded RAG answers.

No embedding model to configure. No vector database to run. One API key.

Tools

Tool What it does
opensolr_search Hybrid (keyword + semantic) or pure semantic search, with Solr filters
opensolr_ai_answer Grounded RAG answer generated only from your indexed content
opensolr_add_documents Index plain text + metadata (embedded server-side)
opensolr_delete_documents Remove documents by id
opensolr_list_indexes / opensolr_index_info Inspect the account's indexes
opensolr_create_index Provision a vector-enabled index (us, de, fi)
opensolr_vector_regions Live list of vector-enabled regions

Setup

Get a free Opensolr account (15-day trial, no card) at opensolr.com/register and copy your API key from Account.

Claude Desktop / Claude Code

{
  "mcpServers": {
    "opensolr": {
      "command": "uvx",
      "args": ["opensolr-mcp"],
      "env": {
        "OPENSOLR_EMAIL": "you@example.com",
        "OPENSOLR_API_KEY": "YOUR_OPENSOLR_API_KEY"
      }
    }
  }
}

Cursor / Windsurf / any MCP client

Same shape — stdio transport, command uvx opensolr-mcp (or pipx run opensolr-mcp), with OPENSOLR_EMAIL and OPENSOLR_API_KEY in env.

Example agent session

You: Index our FAQ answers, then find everything about refunds.

The agent calls opensolr_add_documents(index="faq__dense", texts=[...]), then opensolr_search(index="faq__dense", query="refund policy", hybrid=True) — BM25 catches the exact word "refund", kNN catches "giving customers their money back", and the scores fuse per document.

Notes

  • Vector-enabled indexes run on Opensolr's Solr 9.x environments — currently us (Chicago), de (Germany), fi (Finland), fetched live via opensolr_vector_regions. Additional dedicated regions can be deployed on request (paid add-on): support@opensolr.com.
  • Every index is also plain Apache Solr with the native /select API — nothing is locked behind the tools.
  • Python sibling for LangChain: langchain-opensolr · Product page: opensolr.com/langchain

How writing works (Data Ingestion API)

Writes go through Opensolr's Data Ingestion API — the same pipeline the Drupal and WordPress connectors use. It is asynchronous: documents are queued, then embeddings, sentiment, language and all crawler-identical derived fields are computed server-side, and documents become searchable within about a minute. Progress is visible in the Opensolr Control Panel and via the ingest_status API. Each document's identity is its uri (the Solr id is md5(uri)): pass a real URL in metadata ({"uri": "https://..."}), or a deterministic one is synthesized from your id. Re-submitting the same uri updates the document. Pass {"rtf": True, "uri": "https://.../file.pdf"} and the server extracts the text from PDF/DOCX/XLSX for you.

Lexical-only mode

Don't need vectors? Pure keyword search skips the embedding call entirely — zero AI quota, and it works on any Opensolr index, including non-vector ones and older Solr versions.

Your index schema

Documents follow the Opensolr document model (title, description, text, meta_* custom fields). To see the full schema: Control Panel → click your index → Configuration → Edit File → schema.xml. Prefer zero-effort data entry? Configure the Web Crawler in the Control Panel (Index Tools → WebCrawler): add your site URL, validate it, and Opensolr indexes the whole site for you.

MIT license.

Release files for opensolr-mcp 0.2.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 opensolr-mcp 0.2.0
File Size Uploaded
opensolr_mcp-0.2.0.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opensolr-mcp 0.2.0
File Interpreter ABI Platform
opensolr_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / opensolr_mcp-0.2.0.tar.gz

Download URL opensolr_mcp-0.2.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2e90c23d6a3409597511ddb5d017a43d0c4f635ee2f86ddf62de8acb16006f47
BLAKE2b-256 checksum
How to use checksums
775ae9b95a6c17d368a5db6eb98675a88debbb58d61bf44ca69402d45c79f4de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / opensolr_mcp-0.2.0-py3-none-any.whl

Download URL opensolr_mcp-0.2.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aa8958dcb743f2628078a6628dac69adfd8905ebe13c95a294534c2516cb9d3
BLAKE2b-256 checksum
How to use checksums
00f35f791a50c135327c21018dfc7a0469b4930c1682edfd9966ada172984ef0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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