VS Code / GitHub Copilot

VS Code supports MCP servers through built-in MCP support (VS Code 1.99+). Solr MCP tools are available in GitHub Copilot Chat when using Agent mode.


STDIO Mode (Recommended)

Workspace Configuration (.vscode/mcp.json)

Create .vscode/mcp.json in your project root:

JAR:

{
  "servers": {
    "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 — build first with ./gradlew jibDockerBuild):

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

User Settings (settings.json)

Open VS Code Settings (JSON) and add:

{
  "mcp": {
    "servers": {
      "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/" }
      }
    }
  }
}

HTTP Mode

Start the server in HTTP mode first (PROFILES=http java -jar build/libs/solr-mcp-1.0.0-SNAPSHOT.jar, or PROFILES=http ./gradlew bootRun), then:

{
  "servers": {
    "solr-mcp": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

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

See the VS Code MCP documentation for the latest configuration format.