Skip to content

mcp-data-platform-v0.12.0

Choose a tag to compare

@github-actions github-actions released this 04 Feb 01:50
· 410 commits to main since this release
96b4770

Overview

This release focuses on configuration improvements and enhanced integration capabilities. Key additions include PostgreSQL-backed audit logging, operational rule enforcement middleware, an MCP hints resource, and richer persona configuration options.

New Features

PostgreSQL-Backed Audit Logging (#47)

Audit logging now supports PostgreSQL as a persistent backend. The platform initializes database connections during startup and logs all tool calls to a PostgreSQL store with configurable retention and automatic cleanup.

How It Works:

  1. Configure your database DSN
  2. Enable audit logging
  3. Tool calls are logged with full context (user, persona, parameters, results)
  4. Background cleanup removes old entries based on retention policy
database:
  dsn: "${DATABASE_URL}"
  max_open_conns: 25

audit:
  enabled: true
  log_tool_calls: true
  retention_days: 90

The AuditStoreAdapter bridges the middleware audit interface to the PostgreSQL store, handling event conversion, parameter sanitization, and timestamp preservation.


MCP Rule Enforcement Middleware (#47)

New middleware that injects operational guidance into tool responses. When enabled, query tools (like trino_query) receive contextual hints encouraging users to check DataHub for data context first.

tuning:
  rules:
    require_datahub_check: true
    warn_on_deprecated: true
    quality_threshold: 0.7

When require_datahub_check is enabled and a user calls a query tool, the response includes:

💡 Tip: Consider using datahub_search or datahub_get_entity first
to understand the data context before querying.

This non-blocking guidance helps ensure users understand their data before writing queries.


Hints Resource (#47)

A new MCP resource at hints://operational provides operational tool guidance. The resource returns all registered hints as JSON, combining default hints with persona-specific hints.

Usage:

Clients can read the resource to get operational guidance:

Resource: hints://operational
MIME Type: application/json

Persona-specific hints are merged into the global hint set:

personas:
  definitions:
    analyst:
      hints:
        trino_query: "Always include a LIMIT clause"
        datahub_search: "Use filters to narrow results"

Enhanced Persona Configuration (#47)

Personas now support richer configuration with new fields:

Field Purpose
description Human-readable description of the persona's purpose
priority Determines precedence when multiple personas match (higher wins)
prompts.system_suffix Appended to system prompts
prompts.instructions Additional instructions for the persona

New Method: GetFullSystemPrompt()

Personas now have a method that combines all prompt components into a complete system message:

// Combines: SystemPrefix + Instructions + SystemSuffix
fullPrompt := persona.GetFullSystemPrompt()

Example Configuration:

personas:
  definitions:
    analyst:
      display_name: "Data Analyst"
      description: "Read-only access for data exploration and analysis"
      priority: 10
      roles: ["analyst"]
      tools:
        allow: ["trino_*", "datahub_*"]
        deny: ["*_delete_*"]
      prompts:
        system_prefix: "You are helping a data analyst."
        instructions: "Focus on data exploration and insights."
        system_suffix: "Always explain your reasoning."

Platform Info Persona Details (#47)

The platform_info tool now returns information about all registered personas, helping agents understand available access levels:

{
  "name": "mcp-data-platform",
  "version": "0.12.0",
  "personas": [
    {
      "name": "analyst",
      "display_name": "Data Analyst",
      "description": "Read-only access for data exploration and analysis"
    },
    {
      "name": "admin",
      "display_name": "Administrator",
      "description": "Full access to all tools and features"
    }
  ],
  "features": { ... }
}

Breaking Changes

Transport Configuration

The http transport option has been removed. Only stdio and sse transports are now supported:

server:
  transport: stdio  # or "sse" - "http" is no longer valid

Testing Improvements

Integration Tests with Testcontainers

New integration tests use Testcontainers to spin up real PostgreSQL instances for testing:

  • Database initialization and connection handling
  • Audit logging persistence and retrieval
  • Rule engine integration with middleware
  • Persona prompt generation
  • Full platform lifecycle

New Unit Tests

  • AuditStoreAdapter - Event logging, error handling, parameter sanitization
  • HintManager - Default hints, persona-specific hints, hint merging
  • Persona configurations - Full prompt generation, priority handling

Dependencies

New dependencies added:

  • github.com/testcontainers/testcontainers-go - Container-based integration testing
  • github.com/testcontainers/testcontainers-go/modules/postgres - PostgreSQL test containers

Upgrade Guide

  1. Update to v0.12.0
  2. If using transport: http, change to transport: sse
  3. (Optional) Configure PostgreSQL for audit logging
  4. (Optional) Add description, priority, and enhanced prompts to personas
  5. (Optional) Enable rule enforcement for DataHub hints

Verification

Check Result
Unit Tests PASS
Integration Tests PASS
Race Detection PASS
Linting 0 issues
Security Scan 0 issues

Changelog

Others

Installation

Homebrew (macOS)

brew install txn2/tap/mcp-data-platform

Claude Code CLI

claude mcp add mcp-data-platform -- mcp-data-platform

Docker

docker pull ghcr.io/txn2/mcp-data-platform:v0.12.0

Verification

All release artifacts are signed with Cosign. Verify with:

cosign verify-blob --bundle mcp-data-platform_0.12.0_linux_amd64.tar.gz.sigstore.json \
  mcp-data-platform_0.12.0_linux_amd64.tar.gz