Skip to content

Finish MCP (#22): refusals name the AI setting, help topic, SDK client test - #28

Open
vanatteveldt wants to merge 4 commits into
claude/annotinder-server-architecture-psxrk6from
claude/mcp-version-2
Open

vanatteveldt wants to merge 4 commits into
claude/annotinder-server-architecture-psxrk6from
claude/mcp-version-2

Conversation

@vanatteveldt

Copy link
Copy Markdown
Member

Four commits from claude/mcp-version-2 that we forgot to push before #23 was merged. They finish #22.

  • AI policy refusals name the setting (fc1d3eae): a tool refused by a study's AI policy now says which setting would allow it ("AI can also deploy and pause", "AI can read answers", …) and where an admin changes it; a study on "No AI" says so. Before, the message listed scope names and Claude guessed at causes (archived, deleted). Found in the connector test of 3 Dec.
  • Help topic "Working with an AI assistant" (e425dc66): connecting (including the new confirmation step), the AI policy per study, things to ask, deploying, ending access (removing the connector doesn't revoke the key), what goes to the AI provider. Linked from the keys section, the AI policy card and the consent page; researcher-api.md and design-privacy.md point to it; the MCP server instructions send assistants to annotinder://help/ai-assistant for questions about their access.
  • An MCP test with the SDK's own client (9833ba63, 080a5651): the other MCP tests write JSON-RPC by hand; this one connects the SDK's Client and Streamable HTTP transport (handshake, protocol version), lists tools, calls one, reads a resource, gets a policy refusal as a tool error, and fails with an expired key. So an SDK update or transport change that breaks real clients shows in the tests.

Rebased on this branch after #23 (conflicts in auth.ts, ApiKeysSection.tsx, ConnectPage.tsx and researcher-api.md resolved onto the new components). Tested with Claude's connector on the test instance; see the closing comment on #22.

While doing this we ran into three test problems, none in this PR: a timezone bug in migrations.test.ts, a flaky rateLimit.test.ts on CI, and CLAUDE.md's server check skipping tsconfig.test.json. See #27.

🤖 Generated with Claude Code

vanatteveldt and others added 4 commits December 4, 2026 23:29
…such

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… consent

- New help topic ai-assistant.md: connecting, the study's AI policy,
  things to ask, deploying, ending access (removing the connector doesn't
  revoke the key), what goes to the AI provider
- Help buttons to it on the API keys section, the AI policy card and the
  consent page (MCP); design-privacy and researcher-api point to it
- MCP server instructions send assistants to annotinder://help/ai-assistant
  for questions about their access; test checks the resource is listed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The other MCP tests write JSON-RPC by hand. This one connects the SDK's
Client and Streamable HTTP transport to the app (handshake, protocol
version), lists tools, calls one, reads a resource, gets an AI policy
refusal as a tool error, and fails to connect with an expired key (401
invalid_token): so an SDK update or a transport change that breaks real
clients shows in the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…json)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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