• Johnny's avatar
    feat(mcp): refactor MCP server to standard protocol structure · 803d488a
    Johnny authored
    - Replace PAT-only auth with optional auth supporting both PAT and JWT
      via auth.Authenticator.Authenticate(); unauthenticated requests see
      only public memos, matching REST API visibility semantics
    - Inline auth middleware into mcp.go following fileserver pattern;
      remove auth_middleware.go
    - Introduce memoJSON response type that correctly serialises store.Memo
      (including Payload.Tags and Payload.Property) without proto marshalling
    - Add tools: list_memo_comments, create_memo_comment, list_tags
    - Extend list_memos with state (NORMAL/ARCHIVED), order_by_pinned, and
      page parameters
    - Extend update_memo with pinned and state parameters
    - Extract #tags from content on create/update via regex to pre-populate
      Payload.Tags without requiring a full markdown service rebuild
    - Add MCP Resources: memo://memos/{uid} template returns memo as
      Markdown with YAML frontmatter, allowing clients to read memos by URI
    - Add MCP Prompts: capture (save a thought) and review (search + summarise)
    803d488a
mcp.go 1.52 KB