Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions content/doap/solr-mcp.rdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"?>
<rdf:RDF xml:lang="en"
xmlns="http://usefulinc.com/ns/doap#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:asfext="http://projects.apache.org/ns/asfext#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Project rdf:about="https://solr.apache.org/mcp">
<created>2025-10-26</created>
<license rdf:resource="https://spdx.org/licenses/Apache-2.0" />
<name>Apache Solr MCP Server</name>
<homepage rdf:resource="https://solr.apache.org/mcp" />
<asfext:pmc rdf:resource="https://solr.apache.org" />
<shortdesc>Model Context Protocol server for Apache Solr</shortdesc>
<bug-database rdf:resource="https://github.com/apache/solr-mcp/issues" />
<mailing-list rdf:resource="https://solr.apache.org/community.html#mailing-lists-chat" />
<download-page rdf:resource="https://solr.apache.org/mcp/downloads.html" />
<programming-language>Java</programming-language>
<category rdf:resource="https://projects.apache.org/category/cloud" />
<category rdf:resource="https://projects.apache.org/category/search"/>
<category rdf:resource="https://projects.apache.org/category/java"/>
<repository>
<GitRepository>
<location rdf:resource="https://gitbox.apache.org/repos/asf/solr-mcp.git"/>
<browse rdf:resource="https://gitbox.apache.org/repos/asf?p=solr-mcp.git"/>
</GitRepository>
</repository>
<maintainer>
<foaf:Person>
<foaf:name>Apache Solr Team</foaf:name>
<foaf:mbox rdf:resource="mailto:dev@solr.apache.org"/>
</foaf:Person>
</maintainer>
<!-- NOTE: please insert releases in numeric order, NOT chronologically. -->
</Project>
</rdf:RDF>
90 changes: 90 additions & 0 deletions content/pages/mcp/clients/claude-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Title: Claude Code
URL: mcp/clients/claude-code.html
save_as: mcp/clients/claude-code.html
template: mcp/client

[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is Anthropic's CLI tool for Claude. It supports MCP servers via the `claude mcp add` command or a `.mcp.json` project file.

***

## STDIO Mode (Recommended) ##

### CLI ###

```bash
# JAR
claude mcp add --transport stdio \
-e SOLR_URL=http://localhost:8983/solr/ \
solr-mcp -- java -jar /absolute/path/to/solr-mcp-1.0.0-SNAPSHOT.jar

# Docker (local image — build first with ./gradlew jibDockerBuild)
claude mcp add --transport stdio solr-mcp -- \
docker run -i --rm -e SOLR_URL=http://host.docker.internal:8983/solr/ \
solr-mcp:latest
```

### `.mcp.json` ###

Add to your project root:

**JAR:**

```json
{
"mcpServers": {
"solr-mcp": {
"type": "stdio",
"command": "java",
"args": ["-jar", "/absolute/path/to/solr-mcp-1.0.0-SNAPSHOT.jar"],
"env": { "SOLR_URL": "http://localhost:8983/solr/" }
}
}
}
```

**Docker (local image):**

```json
{
"mcpServers": {
"solr-mcp": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "SOLR_URL=http://host.docker.internal:8983/solr/",
"solr-mcp:latest"]
}
}
}
```

***

## HTTP Mode ##

Start the server first (see [Running the Server](https://github.com/apache/solr-mcp#running-the-server)), then:

### CLI ###

```bash
claude mcp add --transport http solr-mcp http://localhost:8080/mcp
```

### `.mcp.json` ###

```json
{
"mcpServers": {
"solr-mcp": {
"type": "http",
"url": "http://localhost:8080/mcp"
}
}
}
```

### Secured HTTP (OAuth2) ###

Claude Code detects the OAuth2 challenge from the server and initiates the authorization flow automatically. The configuration is the same as unsecured HTTP.

See [Security](/mcp/security.html) for server-side OAuth2 setup.
110 changes: 110 additions & 0 deletions content/pages/mcp/clients/claude-desktop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
Title: Claude Desktop
URL: mcp/clients/claude-desktop.html
save_as: mcp/clients/claude-desktop.html
template: mcp/client

[Claude Desktop](https://claude.ai/download) is Anthropic's desktop application for Claude. It supports MCP servers via STDIO and HTTP transports.

### Configuration File

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

Restart Claude Desktop after any configuration change.

***

## STDIO Mode (Recommended) ##

STDIO mode communicates via stdin/stdout. This is the simplest setup for local use.

### JAR ###

Requires Java 25+ and a [built JAR](https://github.com/apache/solr-mcp#running-the-server) (`./gradlew build`).

```json
{
"mcpServers": {
"solr-mcp": {
"command": "java",
"args": ["-jar", "/absolute/path/to/solr-mcp-1.0.0-SNAPSHOT.jar"],
"env": {
"SOLR_URL": "http://localhost:8983/solr/"
}
}
}
}
```

### Docker (local image) ###

Build the image first: `./gradlew jibDockerBuild`

```json
{
"mcpServers": {
"solr-mcp": {
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "SOLR_URL=http://host.docker.internal:8983/solr/",
"solr-mcp:latest"]
}
}
}
```

**Linux users**: add `"--add-host=host.docker.internal:host-gateway"` to the `args` array.

***

## HTTP Mode ##

HTTP mode connects to a running MCP server via REST endpoints. Start the server first, then configure Claude Desktop to connect using `mcp-remote`.

### Start the Server ###

```bash
# JAR
PROFILES=http java -jar build/libs/solr-mcp-1.0.0-SNAPSHOT.jar

# Or Gradle
PROFILES=http ./gradlew bootRun

# Or Docker (local image)
docker run -p 8080:8080 --rm \
-e PROFILES=http \
-e SOLR_URL=http://host.docker.internal:8983/solr/ \
solr-mcp:latest
```

### Configure Claude Desktop ###

```json
{
"mcpServers": {
"solr-mcp": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8080/mcp"]
}
}
}
```

### Secured HTTP (OAuth2) ###

When OAuth2 is enabled on the server, `mcp-remote` handles the authorization flow automatically&mdash;it discovers the authorization server and opens a browser for consent.

```json
{
"mcpServers": {
"solr-mcp": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8080/mcp", "--allow-http"]
}
}
}
```

The `--allow-http` flag is needed for `http://` URLs (development). Omit it in production with HTTPS.

See [Security](/mcp/security.html) for server-side OAuth2 setup.
73 changes: 73 additions & 0 deletions content/pages/mcp/clients/cursor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Title: Cursor
URL: mcp/clients/cursor.html
save_as: mcp/clients/cursor.html
template: mcp/client

[Cursor](https://cursor.sh/) supports MCP servers natively via project configuration files or the Cursor Settings UI.

***

## STDIO Mode (Recommended) ##

### Project Configuration (`.cursor/mcp.json`) ###

Create `.cursor/mcp.json` in your project root:

**JAR:**

```json
{
"mcpServers": {
"solr-mcp": {
"command": "java",
"args": ["-jar", "/absolute/path/to/solr-mcp-1.0.0-SNAPSHOT.jar"],
"env": { "SOLR_URL": "http://localhost:8983/solr/" }
}
}
}
```

**Docker (local image &mdash; build first with `./gradlew jibDockerBuild`):**

```json
{
"mcpServers": {
"solr-mcp": {
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "SOLR_URL=http://host.docker.internal:8983/solr/",
"solr-mcp:latest"]
}
}
}
```

### Cursor Settings UI ###

1. Open **Cursor Settings** (gear icon or <kbd>Cmd+,</kbd> / <kbd>Ctrl+,</kbd>)
2. Navigate to **Features** > **MCP Servers**
3. Click **Add New MCP Server**
4. Enter:
* **Name**: `solr-mcp`
* **Type**: `command`
* **Command**: `java -jar /absolute/path/to/solr-mcp-1.0.0-SNAPSHOT.jar`

***

## HTTP Mode ##

Start the server first (see [Running the Server](https://github.com/apache/solr-mcp#running-the-server)), then:

```json
{
"mcpServers": {
"solr-mcp": {
"url": "http://localhost:8080/mcp"
}
}
}
```

The configuration is the same for secured and unsecured HTTP. Cursor handles the MCP OAuth2 flow automatically.

See the [Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol) for the latest configuration format.
Loading