Skip to content

[RORDEV-2225] Elastic MCP server with ReadonlyREST - #9

Open
coutoPL wants to merge 3 commits into
masterfrom
example/RORDEV-2225
Open

coutoPL wants to merge 3 commits into
masterfrom
example/RORDEV-2225

Conversation

@coutoPL

@coutoPL coutoPL commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Elasticsearch MCP server secured by ReadonlyREST

This example runs the Elasticsearch MCP server against a ROR-secured cluster. The MCP server has no credentials of its own — every client sends its own Authorization header, so ROR decides what each user's agent may read.

Run it

curl -sL https://raw.githubusercontent.com/beshu-tech/readonlyrest-examples/master/quickstart.sh | bash -s mcp-server --branch example/RORDEV-2225

Two users

User Password Can read
analyst analyst logs-*, orders-*
hr hr hr-salaries-*, orders-*

Both users can log into Kibana with these credentials (read-only). The same credentials are wired into two opencode agents, one per user.

Start an agent

docker exec -it opencode-analyst opencode   # sends analyst:analyst
docker exec -it opencode-hr opencode        # sends hr:hr

Log in first: run /connect in the TUI and sign in with your own model provider (any provider opencode supports). One sign-in covers both containers.

Now you are ready to test

Ask each agent "which indices can you see?" — they answer differently. Then ask opencode-analyst to read hr-salaries-2026: ROR blocks it, and the agent gets Elasticsearch's own index_not_found_exception. orders-* is readable by both.

Screenshot 2026-09-18 at 15 50 19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant