Skip to content

MCP Server Development

The Model Context Protocol (MCP) Server implementation for HANA CLI.

Overview

The MCP Server exposes HANA CLI functionality to AI coding assistants like Claude, enabling:

  • AI-assisted database queries
  • Automated schema analysis
  • Intelligent data recommendations
  • Code generation for data operations

Repository Files

Complete technical documentation is available in the project:

Quick Start

Installation

bash
cd mcp-server
npm install
npm run build

Configuration

In your IDE (VS Code with Claude Extension):

json
{
  "mcpServers": {
    "hana-cli": {
      "command": "node",
      "args": ["../mcp-server/build/index.js"],
      "env": {
        "HANA_HOST": "your-server.com",
        "HANA_PORT": "30013",
        "HANA_USER": "dbuser",
        "HANA_PASSWORD": "password"
      }
    }
  }
}

Features

Resources

  • Access database metadata and schemas
  • Query table structures
  • Inspect database objects

Tools

  • Execute data operations
  • Run analysis commands
  • Perform data transformations

Prompts

  • Pre-built interaction templates
  • Common use case starters
  • Best practice suggestions

Implementation Phases

Phase 1: Core Implementation

Basic MCP server setup with fundamental tools and resources.

Phase 2: Enhancement

Advanced features, improved error handling, comprehensive testing.

Phase 3: Integration

Full IDE integration, optimization, production readiness.

Troubleshooting

For common issues and solutions, see:

Common issues:

  • Connection failures
  • Permission problems
  • Tool execution errors
  • Timeout issues

Use Cases

Database Analysis

"Analyze data quality in my SALES schema"

  • MCP inspects schema structure
  • Runs validation commands
  • Generates analysis report

Schema Migration

"What are differences between DEV and PROD?"

  • MCP compares schemas
  • Identifies missing objects
  • Suggests migration steps

Import/Export

"Generate import script for CSV files in data/ folder"

  • MCP inspects table structures
  • Generates import commands
  • Suggests column mapping

Contributing

Interested in improving MCP Server? See:

Technical Details

  • Framework: Model Context Protocol (MCP)
  • Language: TypeScript/JavaScript
  • Transport: Stdio-based communication
  • Build: TypeScript compilation
  • Testing: Comprehensive test suite

Support

See Also

Released under the Apache License 2.0