Skip to content

[MCP] E2E tests, docs, and migration from external addon #623

@kylebernhardy

Description

@kylebernhardy

Scope. Final v1 PR: end-to-end test suite using an off-the-shelf MCP SDK, user-facing documentation, sample MCP client configs, and the deprecation path for the external HarperFast/mcp-server addon.

Design reference. Sections "Verification", "Migration from the external addon", and "Client Configuration & Invocation" in #465.

Acceptance criteria

  • New integration suite under test/integration/mcp/ driven by @modelcontextprotocol/sdk (TypeScript SDK).
    • Operations profile: initializetools/listtools/call for describe_all, add_user, create_schema, with varied roles.
    • Application profile: same flow for get_*, search_*, create_*, update_*, delete_* on a seeded table.
    • Pagination round-trip on search_*.
    • tools/list_changed fires after alter_role in another session.
    • Restricted-attribute write rejected.
    • Both Streamable HTTP and harper mcp stdio (UDS) connections exercised.
  • Public docs: a new MCP section under existing Harper docs covering: enabling the feature, the two profiles, RBAC behavior, harper mcp CLI usage, Claude Desktop / Cursor / Zed config examples, and the migration mapping from the external addon.
  • HarperFast/mcp-server repo: deprecation README pointing to the native integration; archive the repo on this PR's merge.
  • Release notes drafted for inclusion in Harper's next changelog.
  • npm run test:integration:mcp registered as a script and added to the integration shard rotation in CI.

Out of scope. Shipping defaults that auto-enable MCP (static/defaultConfig.yaml continues to omit the mcp: block — MCP stays opt-in via block presence). v1.1 work: OAuth, scoped MCP tokens, rate-limit telemetry.

Stacks on. #617, #618, #619, #620, #621, #622 (all v1 functional work).

Branch & PR conventions

Smoke test

npm run test:integration:mcp
# Expected: green across the new MCP suite.
# Plus: claude-desktop loaded with the doc-provided config can list and invoke
# at least one tool against a local Harper.

Tracking. Part of #465. Sub-issue #11 of 11. Final v1 PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpModel Context Protocol (MCP) server: protocol, profiles, stdio CLIdocumentationImprovements or additions to documentationenhancementNew feature or requestfeature:mcp-v1Rollout of native MCP server v1 (HarperFast/harper#465). Removed when v1 closes.testsMostly focused on tests, testing infrastructure, etc.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions