Skip to content

mcp-datahub-v1.8.1

Choose a tag to compare

@github-actions github-actions released this 04 Apr 21:25
Immutable release. Only release title and notes can be modified.
ee23900

mcp-datahub v1.8.1 — Fix OutputSchema Validation on Empty Search Results

Fixes a bug where datahub_search returned "entities": null instead of "entities": [] when a search matched zero results, causing MCP OutputSchema validation failures. This affected both keyword and semantic search modes.

Bug fix

datahub_search returns null entities on zero results (#131)

When a search query matched no entities, SearchResult.Entities was never initialized (Go nil slice), and json.Marshal serialized it as null. The OutputSchema declares entities as "type": "array" which rejects null, causing clients to receive a validation error instead of an empty result set.

Root cause: doSearchAcrossEntities and Search created the SearchResult struct without initializing the Entities slice. The slice was only populated via append in a loop over results — zero results meant the loop never executed and Entities stayed nil.

Fix: Initialize Entities with make([]SearchEntity, 0, len(results)) in both code paths. This produces "entities": [] in JSON and pre-allocates the right capacity when results do exist.

Affected methods:

  • client.SearchAcrossEntities() (keyword + semantic via doSearchAcrossEntities)
  • client.Search() (legacy type-scoped search)

Upgrading

This is a patch release with no breaking changes. All users of v1.8.0 should upgrade.


Installation

Claude Desktop (macOS/Windows)

Download the .mcpb bundle for your platform and double-click to install:

  • macOS Apple Silicon (M1/M2/M3/M4): mcp-datahub_1.8.1_darwin_arm64.mcpb
  • macOS Intel: mcp-datahub_1.8.1_darwin_amd64.mcpb
  • Windows: mcp-datahub_1.8.1_windows_amd64.mcpb

Homebrew (macOS)

brew install txn2/tap/mcp-datahub

Claude Code CLI

claude mcp add datahub \
  -e DATAHUB_URL=https://your-datahub.example.com/api/graphql \
  -e DATAHUB_TOKEN=your-token \
  -- mcp-datahub

Docker

docker pull ghcr.io/txn2/mcp-datahub:v1.8.1

Verification

All release artifacts are signed with Cosign. Verify with:

cosign verify-blob --bundle mcp-datahub_1.8.1_linux_amd64.tar.gz.sigstore.json \
  mcp-datahub_1.8.1_linux_amd64.tar.gz