Skip to content

feat(mcp): support MCP Resources and Resource Templates #192

Description

@allenporter

Feature Description

Following the upgrade to MCP SDK v2.0.0, the Supernote MCP server should expose notebook contents as MCP Resources and Resource Templates using custom supernote:// URIs.

Currently, the MCP server only exposes Tools (search_notebook_chunks and get_notebook_transcript). Exposing native MCP Resources will allow AI clients (e.g. Claude Desktop, Cursor, Gemini) to directly attach, browse, and reference notebooks and pages into context.

Proposed Resource URI Scheme

  • supernote://notebooks – List all available notebooks.
  • supernote://notebooks/{file_id} – Notebook metadata and page index listing.
  • supernote://notebooks/{file_id}/pages/{page_index}/transcript – Raw transcript text of a specific page.
  • supernote://notebooks/{file_id}/pages/{page_index}/image – Rendered SVG/PNG vector image of handwritten note page.

Proposed Implementation

  • Implement @mcp.resource() and @mcp.resource_template() endpoints in supernote/server/mcp/server.py.
  • Add test coverage for resource listing and reading in tests/server/mcp/test_resources.py.
  • Update MCP documentation in docs/mcp.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions