Skip to content

MCP: expose schema as a Resource #4865

Closed

Description

@robfrank

Part of #4859.

Motivation

MCP Resources are entirely unimplemented (confirmed: zero matches for resources/list/resources/read in the mcp package; capabilities in handleInitialize advertises only tools). Serving schema as a Resource lets clients auto-load structure without spending a tool-call turn on get_schema every session. Justification: #4 structured shaping, delivered via the correct protocol primitive rather than another tool — directly addresses the tool-count-discipline principle from #4859.

Proposed design

  • Implement resources/list and resources/read in both MCPHttpHandler and MCPStdioServer.
  • Advertise capabilities.resources = {listChanged: false, subscribe: false} in handleInitialize.
  • Resource URI scheme: arcadedb://{database}/schema.
  • resources/list enumerates one resource per database the authenticated user can access (respecting MCPConfiguration.isUserAllowed/allowedUsers).
  • resources/read returns the same JSON get_schema currently produces — refactor GetSchemaTool to extract a shared static schema-building helper, called by both the tool and the resource handler (avoid duplicating logic).
  • Keep the get_schema tool for backward compatibility; docs should note Resources as the preferred path for clients that support it.

Acceptance criteria

  • resources/list and resources/read respond correctly over both HTTP and stdio transports.
  • initialize response advertises the resources capability.
  • Schema content is identical between get_schema tool output and the resource's resources/read content (verified by a test asserting equality).
  • Access control matches get_schema's existing behavior (same users, same databases).
  • Tests added to MCPServerPluginTest/MCPStdioServerTest; docs updated.

Files to touch

MCPHttpHandler.java, MCPStdioServer.java, server/src/main/java/com/arcadedb/server/mcp/tools/GetSchemaTool.java (refactor for reuse), tests, docs.

Dependencies

None — can proceed in parallel with all tool issues.

Effort estimate

M — new protocol primitive across two transports, capability advertisement, refactor for shared logic.

Activity

  1. added
    enhancement
    mcp
    on Jul 2, 2026
  2. added this to the 26.8.1 milestone on Jul 2, 2026
  3. self-assigned this
    on Jul 2, 2026
  4. modified the milestones: 26.7.2, 26.8.1 on Jul 8, 2026
  5. added
    mcp
    enhancement
    and removed
    enhancement
    mcp
    on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementmcp

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions