Skip to content

mcp-datahub-v1.0.1

Choose a tag to compare

@github-actions github-actions released this 01 Mar 02:08
· 62 commits to main since this release
Immutable release. Only release title and notes can be modified.
2854166

What's Changed

Bug Fix: All DataHub tools now work correctly in Claude.ai

v1.0.0 introduced outputSchema declarations for all tools. MCP hosts such as Claude.ai
interpret outputSchema as a guarantee that structuredContent will be present in every
tools/call response. All read handlers were returning nil as the second return value, so
go-sdk never populated structuredContent — causing every DataHub tool to display
"Error occurred during tool execution" in Claude.ai despite the server-side call succeeding.

This patch fixes all affected read handlers.


Root cause

go-sdk only serializes structuredContent when the handler returns a non-nil second value:

```go
var outval any = out
if outval != nil { // ← all read handlers returned nil → skipped every time
res.StructuredContent = marshal(outval)
}
```

Every read handler was written as `return result, nil, nil` — correct before output schemas
existed, broken once `outputSchema` was declared in `tools/list`.


Changes

New output wrapper types (pkg/tools/outputs.go)

List handlers return raw slices, which cannot be returned directly as structured output without
a wrapping object. Three new types bridge the gap:

Type Field
`ListDomainsOutput` `Domains []types.Domain`
`ListTagsOutput` `Tags []types.Tag`
`ListDataProductsOutput` `DataProducts []types.DataProduct`

Read handlers — structured output now returned

Handler Structured output
`handleListDomains` `&ListDomainsOutput{Domains: domains}`
`handleListTags` `&ListTagsOutput{Tags: tags}`
`handleListDataProducts` `&ListDataProductsOutput{DataProducts: products}`
`handleGetDataProduct` `*types.DataProduct`
`handleGetColumnLineage` `*types.ColumnLineage`
`handleGetQueries` `*types.QueryList`
`handleGetGlossaryTerm` `*types.GlossaryTerm`
`handleGetEntity` `*types.Entity` or enriched `map[string]any` (both paths)
`handleGetSchema` `*types.SchemaMetadata` or enriched `map[string]any` (both paths)
`handleGetLineage` `*types.LineageResult` or enriched `map[string]any` (both paths)
`handleSearch` result or enriched `map[string]any` (via `formatJSONResult`)

Output schema corrections (pkg/tools/output_schemas.go)

Three schemas were rejecting valid responses at the go-sdk validation layer:

Schema Field Before After
`schemaGetSchema` `fields` `"type": "array"` `"type": ["array", "null"]`
`schemaGetLineage` `direction` `enum: ["upstream","downstream"]` enum removed
`schemaGetQueries` `queries` `"type": "array"` `"type": ["array", "null"]`
`schemaGetQueries` `urn` (non-existent) present replaced with `total`

The `direction` enum used lowercase values; the DataHub API returns `UPSTREAM`/`DOWNSTREAM`
(uppercase) and may return an empty string for certain lineage types.

Tests (pkg/tools/structured_output_test.go)

18 new tests verifying that every read handler returns non-nil structured output on success,
covering both the with-query-provider and without-query-provider code paths. The
`TestToolsViaServer` integration test exercises every read tool end-to-end through the actual
MCP server to confirm go-sdk accepts the structured output without schema validation errors.

Package coverage: 89.1%.


Upgrade

This is a drop-in patch — no configuration changes required. Replace your binary or Docker
image and all DataHub tools will begin returning structured output immediately.

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.0.1_darwin_arm64.mcpb
  • macOS Intel: mcp-datahub_1.0.1_darwin_amd64.mcpb
  • Windows: mcp-datahub_1.0.1_windows_amd64.mcpb

Homebrew (macOS)

```bash
brew install txn2/tap/mcp-datahub
```

Claude Code CLI

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

Docker

```bash
docker pull ghcr.io/txn2/mcp-datahub:v1.0.1
```

Verification

All release artifacts are signed with Cosign. Verify with:
```bash
cosign verify-blob --bundle mcp-datahub_1.0.1_linux_amd64.tar.gz.sigstore.json
mcp-datahub_1.0.1_linux_amd64.tar.gz
```

Full changelog: v1.0.0...v1.0.1