Skip to content

Serve MCP 2026-07-28 next to the initialize handshake, with elicitation - #31

Merged
JanGoebel merged 6 commits into
mainfrom
mcp-2026-07-28-elicitation
Oct 19, 2026
Merged

JanGoebel merged 6 commits into
mainfrom
mcp-2026-07-28-elicitation

Conversation

@JanGoebel

@JanGoebel JanGoebel commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

#30 is merged. main has been merged into this branch, so the diff now shows only this pull request's changes.

Summary

The server now also speaks MCP 2026-07-28, the current, stateless revision without initialize, on the same endpoint. Older clients that start with initialize keep getting exactly what they got before.

On top of that, tools can ask the user (elicitation) through the 2026-07-28 multi round-trip pattern. For example, a tool can confirm with the user before it moves hardware.

Before Now
Client speaking only 2026-07-28 requests fail (no initialize) served: _meta versioning, header checks, resultType, serverInfo, caching hints
server/discover unknown method supported versions, capabilities, server info
Versions initialize negotiates 2025-06-18, 2025-03-26, 2024-11-05 adds 2025-11-25 (the new fallback)
Unsupported MCP-Protocol-Version header 400, -32600 400, -32022 with the supported versions
A tool asking the user something not possible Confirm With User.vi / Ask User.vi → input_required, answer on the retry

Changes

  • Handle MCP Request.vi (new): decides the era per request; a request is 2026-07-28 when params._meta carries io.modelcontextprotocol/protocolVersion.

    For those requests it checks, in this order:

    1. MCP-Protocol-Version header vs _meta (400, -32020)
    2. the version (400, -32022)
    3. Mcp-Method (400, -32020)
    4. Mcp-Name, base64-decoded first (400, -32020)
    5. clientCapabilities (400, -32602)
    6. unknown methods, including ping (404, -32601)

    It then:

    • answers server/discover
    • adds resultType, _meta.serverInfo and, via Cache Hints, ttlMs / cacheScope
    • maps "resource not found" to -32602
    • turns questions a tool registered into an input_required result

    Legacy requests take the old path unchanged.

    Each step is its own private subVI, all new: Read MCP Request Metadata.vi, Check Modern MCP Request.vi, Set MCP Request Context.vi, Collect MCP Input Requests.vi and Complete Modern MCP Result.vi. They pass the request's metadata as the typedef MCP Request Metadata.ctl.

  • Ask User.vi, Confirm With User.vi (new, public): ask the user from inside a tool.

    • On the first run they return pending and register an elicitation/create form.
    • On the client's retry they return the user's answer.
    • For older clients, or clients without the elicitation capability, they return not supported.
  • Cache Hints.vi (new): ttlMs / cacheScope per method, kept in one place:

    • 60 s, public, for the lists and server/discover
    • 0, public, for resources/read
  • Build Unsupported Version Error.vi (new): the -32022 body with data.supported and data.requested.

  • Supported Protocol Versions.vi (modified): still the single list. It now has three outputs:

    • legacy versions (now including 2025-11-25), which is what initialize negotiates from
    • modern versions (2026-07-28)
    • all versions
  • Is Supported Protocol Version.vi, Validate HTTP Request.vi (modified): accept 2026-07-28 headers, and answer an unsupported version with -32022.

  • Process HTTP Request.vi (modified):

    • reads Mcp-Method and Mcp-Name
    • calls Handle MCP Request
    • takes the HTTP status (200 / 202 / 400 / 404) from it
  • readme.md: new sections on protocol versions and elicitation.

  • Tests:

    • new: Tests 53–57, plus the fixture fake tool confirm.vi and its registration VI
    • changed on purpose: Test 11 (-32022) and Test 29 (fallback 2025-11-25)

Code summary

Orange numbered boxes in each picture match the numbered points below it. Click a picture to see it full size. The full CI VI diff has every VI of this pull request.

VI Status Change in one line
Handle MCP Request.vi added Decides legacy vs. 2026-07-28 per request, validates, answers, and adds the new result fields. A pipeline of five private subVIs
Process HTTP Request.vi modified Reads Mcp-Method and Mcp-Name and hands the request to Handle MCP Request
Validate HTTP Request.vi modified An unsupported version header gets -32022 with the supported versions
Supported Protocol Versions.vi modified Legacy, modern and all versions from one list
Cache Hints.vi added ttlMs and cacheScope per method
Ask User.vi, Confirm With User.vi added Let a tool ask the user, then get the answer on the retry
Is Supported Protocol Version.vi, Build Unsupported Version Error.vi modified / added Accept 2026-07-28 headers; build the -32022 body
Tests added / changed Tests 53–57 and a fixture added; Tests 11 and 29 changed on purpose

Handle MCP Request.vi — added

The new entry point for every request body. A request is treated as 2026-07-28 when params._meta carries io.modelcontextprotocol/protocolVersion. Anything else takes the old path unchanged. The diagram is a short pipeline: each step is its own private subVI, and the per-request metadata travels between them as one typedef cluster, MCP Request Metadata.ctl.

  1. Read MCP Request Metadata.vi reads method, id, the _meta protocol version and client capabilities, params.name / params.uri, inputResponses and elicitation. It also decides the era and flags server/discover and batches.
  2. Check Modern MCP Request.vi runs the checks for 2026-07-28 requests, in order. Each failed check picks its HTTP status (400 / 404), its code and its message:
    1. header vs _meta version: -32020
    2. supported version: -32022
    3. Mcp-Method: -32020
    4. Mcp-Name, base64-decoded first: -32020
    5. client capabilities present: -32602
    6. known method: 404 / -32601
  3. Set MCP Request Context.vi puts the era, capabilities and inputResponses into the "MCP Request Context" queue, so that Ask User can read them while the tool runs.
  4. Handler: when the request was refused or is server/discover, nothing is handled. Otherwise the False frame calls the unchanged Handle Server Request Batch.vi, exactly as before. This is why Tests 1–52 are unchanged.
  5. Collect MCP Input Requests.vi collects the questions a tool registered in "MCP Input Requests" and releases both queues.
  6. Complete Modern MCP Result.vi adds resultType, _meta.serverInfo and the cache hints, answers server/discover, maps "resource not found" to -32602, and builds input_required when a tool asked something. Legacy responses pass through untouched.
  7. The refusal from step 2, or the completed response, becomes response and status code.

Handler frame (step 4, False):

The five subVIs, whole diagrams

Read MCP Request Metadata.vi

Check Modern MCP Request.vi

Set MCP Request Context.vi

Collect MCP Input Requests.vi

Complete Modern MCP Result.vi

Process HTTP Request.vi — modified

  1. New: reads the Mcp-Method and Mcp-Name request headers.
  2. New: the second Request Header.vi call that reads them.
  3. The three MCP headers go to Handle MCP Request.vi, which replaces Handle Server Request Batch.vi here. The old 200/202 decision is gone, because the status now comes from Handle MCP Request.

Validate HTTP Request.vi, Supported Protocol Versions.vi — modified

Validate HTTP Request Supported Protocol Versions
1. An unsupported MCP-Protocol-Version header now gets its body from Build Unsupported Version Error.vi: -32022 with data.supported (all versions) and data.requested. 1. The legacy list now includes 2025-11-25. 2. New: the modern list, [2026-07-28]. 3. New: all versions (modern + legacy). The labels of 2 and 3 overlap on the diagram (see Known rough edges).

Cache Hints.vi — added

  1. server/discover and the four list methods are cacheable.
  2. Lists get 60 000 ms, and resources/read gets 0, because files can change at any time.
  3. Every cacheable result is public, since no result depends on the caller.

Ask User.vi, Confirm With User.vi — added

Ask User reads the request context. On a retry that carries inputResponses.<key>, it returns that answer. On a 2026-07-28 request from a client that declared elicitation, it registers the question and returns pending. Otherwise it returns not supported. Confirm With User calls it with an empty schema and turns the action into three Booleans.

Ask User, register frame (True):

  1. Builds {"<key>":{"method":"elicitation/create","params":{"mode":"form","message":…,"requestedSchema":…}}}. The key and message are JSON-escaped by the JSONtext calls, which this local rendering shows as grey "?". The CI report has them.
  2. An empty or non-object schema becomes the confirmation schema {"type":"object","properties":{}}.
  3. The question is appended to the "MCP Input Requests" queue, which Handle MCP Request reads after the tool ends.
Confirm With User

Tests — added and changed

  • Test 53 (test modern tools list.vi): a 2026-07-28 tools/list has resultType, ttlMs, cacheScope and serverInfo; a legacy one has none of them.
  • Test 54 (test server discover.vi): the server/discover fields; initialize never negotiates 2026-07-28.
  • Test 55 (test modern headers.vi): header mismatches, lower-case header names, a base64 Mcp-Name.
  • Test 56 (test modern errors.vi): unsupported version, missing capabilities, unknown method, ping, resources/read.
  • Test 57 (test elicitation.vi): input_required, accept, decline, no capability, legacy request, using the fixture fake tool confirm.vi.
  • Test 11 (changed on purpose): an unsupported version header now expects -32022.
  • Test 29 (changed on purpose): the fallback for an unknown requested version is now 2025-11-25.

Verified

After the split of Handle MCP Request.vi (commit 0c9ad88): on the runner, all 58 Caraya tests and 24 of 24 required protocol checks passed, and every VI was compared, including the six new files. Locally, in 64-bit LabVIEW 2026, the same results: 182 PASS, 0 FAIL; protocol tester 24 of 24. All new files are LabVIEW 20.0, source-only, owned by MCP Server.lvlib, and runnable. The interface, description and icon of Handle MCP Request.vi are unchanged. The split is a pure restructure, so no test changed and no new negative control was run.

Before the split:

On the runner: all 58 Caraya tests and the protocol tester passed, and all VIs were compared. For the package build, see the update comment.

Locally, in 64-bit LabVIEW 2026, inside the project, after reopening it so the saved files ran:

  • Full Caraya suite: 182 PASS, 0 FAIL.
  • Protocol tester: 24 of 24 required checks.
  • Examples: Datalogger, Full Featured and Simple still compile with no broken wires.
  • Negative control: Test 54 with a wrong expected ttlMs fails on exactly that assertion (Tests 55–57 then show Caraya's usual cascade errors). It passes again once restored, and the wrong value never reached disk.
  • Saved files: all 19 changed or new VIs are LabVIEW 20.0 with their owning library. The .lvlib diffs only add items.

Not verified

  • A real client speaking 2026-07-28. No such client was available, so the tests send hand-built requests that follow the spec.
  • LabVIEW 2020 itself.

Known rough edges

  • Requests run one at a time. The context Ask User needs is held in a single-slot queue around each request. This changes nothing a client can see: Process HTTP Request.vi was already non-reentrant on main, so requests were handled one at a time before too. Handling requests in parallel would mean making the request path reentrant, which belongs in its own pull request.
  • serverInfo and capabilities for 2026-07-28 results come from calling initialize.vi with a synthetic request. It also rewrites the server's own parameter table, with the same values.
  • Queue names. The two queue names are string constants in two VIs, not in one shared constant VI.
  • Automatic error handling is off on the new VIs, because unwired JSONtext errors raised modal dialogs. Errors are merged and cleared on the diagram instead.
  • Elicitation scope. It is offered only for tools/call and only in form mode, not URL mode.
  • initialize with 2026-07-28 _meta gets 404, since initialize belongs to the legacy era.
  • Diagram layout. The new diagrams are generated (Handle MCP Request and its five subVIs included), so they are readable but not hand-arranged. In Supported Protocol Versions.vi, the labels "modern versions" and "all versions" overlap.

Maintainer steps

None. The package build (test-build) fails on every pull request since #29 was merged, because the build job checks main's tools/ci out into _ci/ inside the workspace and the .vipb packs the whole repository, so Print Diagram Frames.vi is found twice. The fix is separate from this pull request.

🤖 Generated with Claude Code

CalmyJane and others added 2 commits October 18, 2026 04:06
The server spoke only the handshake-based versions up to 2025-06-18.
Clients that speak only MCP 2026-07-28, which is stateless and has no
initialize, could not use it, and a tool had no way to ask the user
anything.

Each request is now judged on its own:
- A request with io.modelcontextprotocol/protocolVersion in _meta is
  served as 2026-07-28. Its headers (MCP-Protocol-Version, Mcp-Method,
  Mcp-Name, base64 values decoded) must match the body (otherwise 400,
  -32020). It needs clientCapabilities (otherwise 400, -32602), and
  unknown methods, including ping, are 404 / -32601. Results carry
  resultType and serverInfo in _meta, and lists and resources/read carry
  ttlMs and cacheScope. A missing resource is -32602. server/discover
  is new.
- Anything else takes the old path unchanged. 2025-11-25 is added to
  the versions initialize negotiates, and it is now the fallback for an
  unknown requested version.
- An unsupported MCP-Protocol-Version header is answered with 400 and
  -32022 listing every supported version, in both eras, so clients that
  speak both recognise the server.

Elicitation follows the 2026-07-28 multi round-trip pattern: a tool
that asks returns input_required with an elicitation/create form, and
the client calls the tool again with the answer. Older clients and
clients without the elicitation capability get "not supported" in the
tool.

New VIs:
- Handle MCP Request.vi: per-request era detection, validation, HTTP
  status and the 2026-07-28 result fields.
- Ask User.vi, Confirm With User.vi (public): ask the user from inside a
  tool; pending on the first run, the answer on the retry.
- Cache Hints.vi: the ttlMs and cacheScope per method, in one place.
- Build Unsupported Version Error.vi: the -32022 error body.

Requests are still handled one at a time, as before
(Process HTTP Request.vi is not reentrant). The readme describes both
protocol eras and how to use elicitation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New fixture fake tool confirm.vi asks for confirmation with Confirm
With User.vi and reports which path it took; Add Fixture Confirm
Tool.vi registers it.

- Test 53: 2026-07-28 tools/list has resultType, ttlMs, cacheScope and
  serverInfo; a legacy tools/list has none of them
- Test 54: server/discover fields and versions; initialize never
  negotiates 2026-07-28
- Test 55: header checks, including lower-case header names and a
  base64 Mcp-Name
- Test 56: unsupported version, missing capabilities, unknown method,
  ping and resources/read errors for 2026-07-28 requests
- Test 57: elicitation (input_required, accept, decline, no capability,
  legacy request)

Changed on purpose:
- Test 11 expects -32022 instead of -32600 for an unsupported
  MCP-Protocol-Version header
- Test 29 expects the fallback 2025-11-25 instead of 2025-06-18, the
  newest version initialize can negotiate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Tests

✅ All 58 tests passed.

Per-test results
Test VI Result Checks
Test 1: Initialize Test Initialize.vi ✅ pass Assert True: pass
Test 2: Initialized Test Initialized.vi ✅ pass Assert True: pass
Test 3: tools/list Test tools list.vi ✅ pass Assert True: pass
Test 4: prompts/list test prompts list.vi ✅ pass Assert True: pass
Test 5: resources/list test resources list.vi ✅ pass Assert True: pass
Test 6: tools call test tools call.vi ✅ pass Assert True: pass
Test 7: empty JSON object is an invalid request test empty msg.vi ✅ pass Assert True: pass
Test 8: call broken tool test broken tool.vi ✅ pass Assert True: pass
Test 6: tools call test tools call array.vi ✅ pass Assert True: pass
Test 9: GET is rejected with 405 test http get rejected.vi ✅ pass GET -> 405 with Allow: POST and error -32600: pass
Test 10: Origin validation test http origin.vi ✅ pass Origin http://evil.example -> 403 with error -32600: pass
Origin http://localhost:6274 -> 200 with result: pass
Test 11: MCP-Protocol-Version validation test http protocol version.vi ✅ pass MCP-Protocol-Version 1999-01-01 -> 400 with error -32022 (Unsupported protocol version, the MCP 2026-07-28 code in both eras): pass
MCP-Protocol-Version 2025-06-18 -> 200 with result: pass
Test 12: notification answered with 202 test notification accepted.vi ✅ pass notifications/initialized -> 202 with empty body: pass
Test 13: request with id answered with 200 test request status.vi ✅ pass tools/list with id 1 -> 200 with result and id 1: pass
Test 14: unknown method test unknown method.vi ✅ pass does/not/exist with id 5 -> 200 with error -32601 and id 5: pass
Test 15: unknown notification test unknown notification.vi ✅ pass notifications/cancelled -> 202 with empty body: pass
Test 16: ping test ping.vi ✅ pass ping with id 3 -> 200 with result {} and id 3: pass
Test 17: string request id test string id.vi ✅ pass tools/list with id "abc-1" -> 200 with result and id "abc-1": pass
Test 18: unknown prompt test unknown prompt.vi ✅ pass prompts/get no-such-prompt with id 7 -> JSON-RPC error -32602 with id 7, no status/source: pass
Test 19: unknown resource test unknown resource.vi ✅ pass resources/read of an unknown uri with id 8 -> JSON-RPC error -32002 with id 8, no status/source: pass
Test 20: resources/read returns UTF-8 text unchanged test resource text utf8.vi ✅ pass text of labview://fixture_utf8 decodes to the bytes of fixture_utf8.txt: pass
Test 21: resources/read returns a binary file as Base64 test resource blob.vi ✅ pass blob of labview://fixture_binary is the Base64 of the bytes of fixture_binary.png: pass
Test 22: unknown tool test unknown tool.vi ✅ pass tools/call no_such_tool -> error -32602 with message Unknown tool: no_such_tool and id 22: pass
Test 23: tools/call with arguments that are not an object test tool call without arguments.vi ✅ pass tools/call fake_tool_add with arguments 5 -> error -32602 with message Invalid arguments... and id 23: pass
Test 24: broken tool is a tool execution error test broken tool message.vi ✅ pass tools/call fake_tool_broken_vi -> result with isError true and a text that says not executable: pass
Test 25: prompts/get without arguments test prompt without arguments.vi ✅ pass prompts/get fake_prompt_concatanate_strings without arguments -> result with messages: pass
Test 26: request without method test request without method.vi ✅ pass a message with id 26 and no method -> error -32600 with id 26: pass
Test 27: malformed JSON test malformed json.vi ✅ pass truncated JSON -> error -32700 with id null: pass
Test 28: array inputs say what their items are test tools list array items.vi ✅ pass fake_tool_arrays: pass
Test 29: protocol version negotiation test protocol version negotiation.vi ✅ pass initialize asking for 2024-11-05 -> protocolVersion 2024-11-05: pass
initialize asking for 1999-01-01 -> protocolVersion 2025-11-25 (the newest legacy version): pass
Test 30: resources/templates/list test resource templates list.vi ✅ pass resources/templates/list -> result with resourceTemplates []: pass
Test 31: tools/call without arguments test tool call default arguments.vi ✅ pass tools/call fake_tool_add without arguments -> result with the sum 0, no error, id 31: pass
Test 32: a tool that returns an error sets isError test tool error result.vi ✅ pass fake_tool_return_error with status true -> result with isError true, code and source still in the content: pass
fake_tool_return_error with status false -> result without isError: pass
Test 33: internal errors show no LabVIEW internals test internal error message.vi ✅ pass prompts/get fake_prompt_broken_vi -> error -32603 with a message without call chain, markup, tags or path: pass
Test 34: prompts/list says which arguments are required test prompts list required.vi ✅ pass fake_prompt_required_argument: pass
Test 35: prompts/get checks required arguments test prompt required argument.vi ✅ pass prompts/get fake_prompt_required_argument without topic -> error -32602 that names topic, id 36: pass
prompts/get fake_prompt_required_argument with topic -> result whose text contains both argument values: pass
Test 36: JSON-RPC batch test batch.vi ✅ pass batch of ping (id 38), a notification and tools/list (id b) -> 200 with an array of two answers in that order: pass
batch of two notifications -> 202 with empty body: pass
empty batch -> error -32600 with id null: pass
Test 37: a JSON value that is not an object test non object message.vi ✅ pass body 5 -> error -32600 with id null: pass
body "text" -> error -32600 with id null: pass
body null -> error -32600 with id null: pass
Test 38: tools/call checks required arguments test tool required arguments.vi ✅ pass tools/call fake_tool_required_input without arguments -> result with isError true and the text Missing required argument(s): b, a (the order of inputSchema.required), no JSON-RPC error, id 40: pass
tools/call fake_tool_required_input with arguments {} -> result with isError true naming b and a, no JSON-RPC error, id 41: pass
tools/call fake_tool_required_input with only a -> result with isError true naming only b, no JSON-RPC error, id 42: pass
tools/call fake_tool_required_input with a 2 and b 3 -> result 6, no error, id 43: pass
Test 39: initialize with an unknown protocol version test protocol version fallback.vi ✅ pass initialize asking for 1999-01-01 -> protocolVersion is the first entry of Supported Protocol Versions.vi: pass
Test 40: initialize reports the LabVIEW version test labview version.vi ✅ pass initialize -> serverInfo.additionalDetails.labviewVersion equals the Version Number of this LabVIEW: pass
Test 41: tools/list shows the MCP names of special labels test tools list mcp names.vi ✅ pass tools/list fake_tool_special_labels -> Length (mm) and Factor #1 & 50% are listed as length__mm_ and factor__1___50_ in properties and in required, id 44: pass
tools/list fake_tool_special_labels -> every name in properties and required matches ^[a-zA-Z0-9_-]{1,64}$: pass
Test 42: tools/call reaches special labels by their MCP names test tools call mcp names.vi ✅ pass tools/call fake_tool_special_labels with length__mm_ 2.5 and factor__1___50_ 4 -> result {"result__mm_":10}, no error, id 45: pass
Test 43: Add Tool refuses inputs whose MCP names clash test add tool name clash.vi ✅ pass Add Tool fake tool name clash.vi with the inputs a b and a_b -> error 5010 naming both controls and the MCP name a_b: pass
tools/list after the refused Add Tool -> fake_tool_name_clash is not listed, id 46: pass
Test 44: Add Prompt refuses arguments whose MCP names clash test add prompt name clash.vi ✅ pass Add Prompt fake prompt name clash.vi with the arguments a b and a_b -> error 5010 naming both controls and the MCP name a_b: pass
prompts/list after the refused Add Prompt -> fake_prompt_name_clash is not listed, id 47: pass
Test 45: 3D arrays and arrays of paths, enums and clusters say what their items are test tools list array shapes.vi ✅ pass fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
Test 46: timestamps, clusters and types without a JSON type are described in tools/list test tools list schema details.vi ✅ pass fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_array_shapes: pass
fake_tool_array_shapes: pass
Test 47: tools/call converts timestamps, clusters, enums and 2D and 3D arrays test tools call schema shapes.vi ✅ pass fake_tool_array_shapes with a 3D array [[[1,2],[3,4]],[[5,6],[7,8]]] -> no isError, the tool gets all 8 elements: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes: pass
fake_tool_schema_shapes with timestamp 2026-10-17T12:34:56Z -> no isError, time out 2026-10-17T12:34:56.000Z: pass
Test 48: every array schema in tools/list says what its items are test tools list every array has items.vi ✅ pass tools/list of the test server: pass
Test 49: tools/list gives element descriptions, integer ranges, data entry limits, units and defaults test tools list descriptions defaults ranges.vi ✅ pass fake_tool_schema_shapes: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
fake_tool_schema_details: pass
Test 50: tools/call returns structuredContent without picture outputs, and none on isError results test tools call structured content.vi ✅ pass tools/call fake_tool_required_input without arguments (id 503) -> isError true and no structuredContent: pass
fake_tool_picture_outputs: pass
tools/call fake_tool_return_error with status false (id 502) -> structuredContent carries the error cluster output as an ordinary object: pass
fake_tool_picture_outputs: pass
tools/call fake_tool_return_error with status true (id 501) -> isError true and no structuredContent: pass
tools/call fake_tool_picture_outputs (id 50) -> structuredContent is present and equals the text JSON without its picture placeholder: pass
Test 51: tools/list gives an outputSchema that matches structuredContent test tools list output schema.vi ✅ pass fake_tool_picture_outputs: pass
fake_tool_picture_outputs: pass
tools/list fake_tool_no_inputs_outputs (no outputs) -> no outputSchema: pass
tools/list fake_tool_picture_outputs -> outputSchema is an object schema whose properties and required are count, label, mode and time: pass
fake_tool_picture_outputs: pass
Test 52: tools/list sends title and annotations only when they are set test tools list title annotations.vi ✅ pass tools/list fake_tool_add (registered without title and annotations) -> neither title nor annotations: pass
tools/list fake_tool_annotated (registered with a title) -> title "Annotated Fixture Tool": pass
fake_tool_annotated (readOnlyHint true, destructiveHint false, the others not set) -> annotations with exactly readOnlyHint true and destructiveHint false: pass
Test 53: modern results carry resultType, cache hints and serverInfo; legacy results do not test modern tools list.vi ✅ pass modern tools/list -> _meta io.modelcontextprotocol/serverInfo with name and version: pass
legacy tools/list (id 531, no _meta) -> tools without resultType, ttlMs, cacheScope or _meta: pass
modern tools/list (id 53, MCP 2026-07-28 headers and _meta) -> 200 with tools, resultType complete, ttlMs 60000 and cacheScope public: pass
Test 54: server/discover, and initialize never negotiates 2026-07-28 test server discover.vi ✅ pass initialize asking for 2025-11-25 (id 542) -> 2025-11-25: pass
server/discover (id 54) -> 200, resultType complete, supportedVersions with 2026-07-28 and 2025-11-25: pass
server/discover -> capabilities tools, prompts and resources (as initialize), _meta serverInfo, ttlMs 60000, cacheScope public: pass
initialize asking for 2026-07-28 (id 541) -> the newest legacy version 2025-11-25, never 2026-07-28: pass
Test 55: modern requests are refused when their headers do not match the body test modern headers.vi ✅ pass tools/call with an Mcp-Name that is not params.name (id 554) -> 400 with error -32020: pass
MCP-Protocol-Version 2025-11-25 while _meta says 2026-07-28 (id 553) -> 400 with error -32020: pass
tools/call with Mcp-Name =?base64?...?= of fake_tool_add, lower-case header names (id 552) -> 200 with the tool result: pass
tools/call without an Mcp-Name header (id 551) -> 400 with error -32020: pass
Mcp-Method prompts/list on a tools/list request (id 55) -> 400 with error -32020: pass
Test 56: unsupported versions, missing capabilities and unknown methods in the modern era test modern errors.vi ✅ pass modern resources/read of an unknown uri (id 565) -> error -32602 (legacy keeps -32002): pass
modern ping (id 564), which MCP 2026-07-28 removed -> 404 with error -32601: pass
modern request with the legacy version 2025-11-25 in _meta (id 561) -> 400, error -32022, data.supported with 2025-11-25: pass
unknown version 2027-01-01 in header and _meta (id 56) -> 400, error -32022, data.supported with 2026-07-28, data.requested 2027-01-01: pass
modern request with the unknown method foo/bar (id 563) -> 404 with error -32601: pass
modern request without io.modelcontextprotocol/clientCapabilities (id 562) -> 400 with error -32602: pass
Test 57: elicitation by input_required and retry with inputResponses test elicitation.vi ✅ pass legacy tools/call (id 574) -> outcome not supported: pass
retry with inputResponses confirm_action accept (id 571) -> complete result with outcome confirmed: pass
modern tools/call of fake_tool_confirm with the elicitation capability (id 57) -> resultType input_required with inputRequests.confirm_action: pass
retry with inputResponses confirm_action decline (id 572) -> outcome declined: pass
modern tools/call without the elicitation capability (id 573) -> outcome not supported, no input_required: pass

Protocol tests

✅ Test-McpServer.ps1 passed against the test server.

Protocol tester output (0 failed required checks)
Testing MCP server at http://127.0.0.1:36987/mcp/server

[PASS] (required) Lifecycle - initialize answers 200 with a JSON result
[PASS] (required) Lifecycle - initialize answer is JSON-RPC 2.0 with the request id
[PASS] (required) Lifecycle - initialize result has protocolVersion, capabilities and serverInfo.name
[PASS] (required) Lifecycle - Content-Type of the answer is application/json
[PASS] (advisory) Lifecycle - a client asking for 2024-11-05 gets that version back
[PASS] (required) Lifecycle - notifications/initialized is accepted with 202 and no body
[PASS] (required) Transport - GET answers 405 or opens an event stream
[PASS] (advisory) Transport - 405 answer names the allowed method in an Allow header
[PASS] (required) Transport - a request from a foreign Origin is rejected (403)
[PASS] (required) Transport - a request from a localhost Origin is accepted
[PASS] (required) Transport - an unsupported MCP-Protocol-Version header is rejected (400)
[PASS] (required) Transport - the negotiated MCP-Protocol-Version header is accepted
[PASS] (required) JSON-RPC - ping is answered with an empty result
[PASS] (required) JSON-RPC - an unknown method gets error -32601 with the request id
[PASS] (required) JSON-RPC - an unknown notification is not answered
[PASS] (required) JSON-RPC - a string request id is returned unchanged
[PASS] (required) JSON-RPC - malformed JSON gets error -32700
[PASS] (advisory) JSON-RPC - a request without a method gets error -32600
[PASS] (required) Tools - tools/list returns a tools array
[PASS] (required) Tools - every tool has a name and an inputSchema of type object (1 tools)
[PASS] (advisory) Tools - array parameters say what their items are
[PASS] (required) Tools - calling an unknown tool is answered with an error
[PASS] (required) Prompts - prompts/list returns a prompts array
[PASS] (required) Prompts - every prompt has a name (1 prompts)
[PASS] (required) Prompts - getting an unknown prompt is answered with an error
[PASS] (required) Resources - resources/list returns a resources array
[PASS] (required) Resources - every resource has a uri and a name (2 resources)
[PASS] (required) Resources - reading an unknown resource is answered with an error
[PASS] (advisory) Resources - resources/templates/list returns a resourceTemplates array

Required: 24 of 24 passed. Advisory: 0 failed.

VI changes

Open the full VI diff

VIs: 7 modified, 18 added, 0 deleted

VI Changes Changed spot, now
Is Supported Protocol Version.vi
src/MCP Server
2
Process HTTP Request.vi
src/MCP Server
3
Supported Protocol Versions.vi
src/MCP Server
7
Validate HTTP Request.vi
src/MCP Server
2
Test_MCP_Server.vi
tests
2
test http protocol version.vi
tests
3
1 more modified VIs
VI Changes Changed spot, now
test protocol version negotiation.vi
tests
3
Added VIs (18)
VI Block diagram
Ask User.vi
src/MCP Server
Build Unsupported Version Error.vi
src/MCP Server
Cache Hints.vi
src/MCP Server
Check Modern MCP Request.vi
src/MCP Server
Collect MCP Input Requests.vi
src/MCP Server
Complete Modern MCP Result.vi
src/MCP Server
Confirm With User.vi
src/MCP Server
Handle MCP Request.vi
src/MCP Server
MCP Request Metadata.ctl
src/MCP Server
Read MCP Request Metadata.vi
src/MCP Server
Set MCP Request Context.vi
src/MCP Server
Add Fixture Confirm Tool.vi
tests
fake tool confirm.vi
tests
test elicitation.vi
tests
test modern errors.vi
tests
test modern headers.vi
tests
test modern tools list.vi
tests
test server discover.vi
tests

Report for commit 26089fc. The installable test package is under Artifacts of this run once the build job has finished.

@JanGoebel

Copy link
Copy Markdown
Owner Author

The test-build job failed with vipb_build made no progress for 600 s, the same as every build since 2026-10-17 21:45 UTC. The cause is the build timeout on the runner, not this pull request; see #32. Tests (58) and the VI diff passed. After the templates from #32 are copied to .github/workflows, rerun the job.

Brings in the VIPM build timeouts of the live workflows, so this pull
request's checks run with them.

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

Copy link
Copy Markdown
Owner Author

Update: merged main into this branch. Nothing in this pull request changed. The merge brings in the new VIPM build timeouts of the live workflows (#32 plus the workflow commits on main), so the package build gets enough time. The same merge made #30's build pass (run 39130683128). A new run is queued.

@JanGoebel JanGoebel closed this Oct 18, 2026
@JanGoebel JanGoebel reopened this Oct 18, 2026
CalmyJane and others added 2 commits October 19, 2026 03:33
PR #30 was merged into main; this brings main's CI and diff-report
changes (#29, #35) into the branch. The toolkit and test files that both
branches touched are PR #30's final versions on main, which this branch
already builds on, so the branch's versions are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Handle MCP Request.vi was one flat diagram of about 120 nodes, which made
the request path hard to follow and review. It is now a short pipeline of
subVIs, one per step, with the same interface, description and icon, and
the same behaviour.

New private subVIs in MCP Server.lvlib (Private/SubVIs):
- MCP Request Metadata.ctl: typedef for what is read from a request
  (method, id, era, discover, batch, protocol version, client
  capabilities, name or uri, elicitation, input responses).
- Read MCP Request Metadata.vi: reads that metadata and decides whether
  the request is 2026-07-28 or legacy.
- Check Modern MCP Request.vi: the 2026-07-28 checks in their original
  order, returning the refusal status and response.
- Set MCP Request Context.vi: puts the request context into the queue
  Ask User reads while a tool runs.
- Collect MCP Input Requests.vi: collects the questions a tool asked and
  releases both queues.
- Complete Modern MCP Result.vi: adds resultType, serverInfo and cache
  hints, answers server/discover, maps resource-not-found and builds
  input_required.

The legacy path still calls Handle Server Request Batch.vi unchanged.
Diagrams are auto-arranged.

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

Copy link
Copy Markdown
Owner Author

Update: two pushes since the last update.

Tests: on the runner, 58 of 58 Caraya tests and 24 of 24 required protocol checks passed, and every VI was compared. The results were the same locally in 64-bit LabVIEW 2026.

Open: test-build fails with duplicate source VIs: Print Diagram Frames.vi. This comes from main, not from this pull request, and affects every open pull request. The build job checks main's tools/ci out into _ci/ inside the workspace, and the .vipb packs the whole repository. The new diagrams are auto-arranged.

Brings in #36, which keeps tools/ out of the VI package; the test build
failed on the duplicate Print Diagram Frames.vi it removes.

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

Copy link
Copy Markdown
Owner Author

Update: merged main (26089fc)

@JanGoebel
JanGoebel merged commit 818f310 into main Oct 19, 2026
2 checks passed
JanGoebel pushed a commit that referenced this pull request Oct 19, 2026
#31 split Handle MCP Request.vi into one subVI per step, and this branch
had changed the old single VI. The binary VI cannot be merged, so this
branch's changes are re-applied to the split VIs in place:

- Set MCP Request Context.vi gets a "stream" input and adds "id",
  "progressToken" and "stream" to the request context.
- Handle MCP Request.vi passes its new "stream" input on to it.
- Prepare Request Dispatch.vi calls Read MCP Request Metadata.vi and
  Check Modern MCP Request.vi instead of Validate MCP Request.vi.

Validate MCP Request.vi is no longer called anywhere and is removed from
the library and the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JanGoebel pushed a commit that referenced this pull request Oct 19, 2026
Brings in #31's split of Handle MCP Request.vi, re-applied on
progress-and-cancellation, and the current main. The only conflict was the
library's member list: both branches added VIs to the same folder, and
both sets are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
metman-oss pushed a commit to metman-oss/LabVIEW-MCP-Server-Toolkit that referenced this pull request Oct 31, 2026
Ask User.vi, Confirm With User.vi, Report Progress.vi and Cancel
Requested.vi are public since JanGoebel#31 and JanGoebel#33, but the package's Functions
palette still listed only Start, Add Tool, Add Prompt, Add Resource
(File) and Stop, with Stop twice (once at row 0, outside the visible
grid).

The MCP Server SDK palette now has one row with the five basic VIs and
an "Advanced" sub-palette below them, holding the four VIs a tool calls
while it runs: Ask User, Confirm With User, Report Progress and Cancel
Requested. The duplicate Stop entry is gone. The sub-palette icon follows
the style VIPM generated for the main palette icon (text on white, the
company band at the bottom).

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.

2 participants