Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 17 additions & 22 deletions .github/workflows/release-hana-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ on:
required: false
type: string
default: '[]'
publish_mcp_server:
description: 'Also publish hana-cli-mcp-server to npm?'
publish_mcp_registry:
description: 'Also publish to MCP Registry?'
required: false
type: boolean
default: true

permissions:
contents: write
id-token: write

concurrency:
group: release-hana-cli
Expand Down Expand Up @@ -107,7 +108,7 @@ jobs:

- name: Commit version bump and changelog
run: |
git add package.json npm-shrinkwrap.json mcp-server/package.json mcp-server/npm-shrinkwrap.json CHANGELOG.json CHANGELOG.md
git add package.json npm-shrinkwrap.json server.json mcp-server/package.json mcp-server/npm-shrinkwrap.json CHANGELOG.json CHANGELOG.md
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "chore: release v${{ steps.calc.outputs.version }} [skip ci]"

Expand Down Expand Up @@ -200,14 +201,17 @@ jobs:
draft: false
prerelease: ${{ contains(steps.ver.outputs.version, '-') }}

publish-mcp-server:
name: Publish MCP Server to npm
publish-mcp-registry:
name: Publish to MCP Registry
needs: [publish, prepare, resolve-version]
if: |
always() &&
needs.publish.result == 'success' &&
(github.event_name == 'push' || inputs.publish_mcp_server == true)
(github.event_name == 'push' || inputs.publish_mcp_registry == true)
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Determine version
id: ver
Expand All @@ -223,21 +227,12 @@ jobs:
with:
ref: "v${{ steps.ver.outputs.version }}"

- name: Setup Node.js with npm registry
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: Install and build MCP server
working-directory: mcp-server
- name: Install mcp-publisher
run: |
npm ci
npm run build
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher

- name: Publish mcp-server to npm
working-directory: mcp-server
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Authenticate to MCP Registry
run: ./mcp-publisher login github-oidc

- name: Publish server to MCP Registry
run: ./mcp-publisher publish
16 changes: 15 additions & 1 deletion CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
{
"date": "2026-04-23",
"version": "4.202604.0",
"Added": [
"New mcpServerInstall command (hana-cli mcp) for one-command MCP server configuration in Claude Desktop, Claude Code, Cursor, Windsurf, Cline, VS Code, Continue, and Zed",
"New mcpServerStatus command (hana-cli mcp-status) to check MCP server installation status across all 8 supported AI assistant clients",
"MCP resources for knowledge base content and documentation index metadata"
],
"Changed": [
"Release version 4.202604.0"
"Major MCP server refactor: modular architecture replacing monolithic 1,700-line index.ts",
"Reduced MCP tool count by removing alias registrations and consolidating search tools",
"Updated MCP SDK from 1.27.1 to 1.29.0",
"Fixed MCP server version to read dynamically from package.json",
"Fixed fragile command name matching in output formatter",
"Added isError signaling to all MCP error response paths"
],
"Removed": [
"Removed simulated workflow execution tools (LLMs orchestrate multi-step tasks more effectively)",
"Removed no-op validateEnvironment function and low-value metadata tools"
]
},
{
Expand Down
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [4.202604.0] - 2026-04-23

**Added**

- New `mcpServerInstall` command (`hana-cli mcp`) — one-command setup for MCP server configuration in Claude Desktop, Claude Code, Cursor, Windsurf, Cline, VS Code, Continue, and Zed
- New `mcpServerStatus` command (`hana-cli mcp-status`) — check MCP server installation status across all 8 supported AI assistant clients
- MCP resources for knowledge base content (connection guide, security guide, best practices, project structure, parameter guides)
- MCP documentation index metadata resources (statistics, categories)

**Changed**

- Release version 4.202604.0
- Major MCP server refactor: rewrote monolithic index.ts (1,700 lines) into modular architecture (~200 line bootstrap + 5 handler modules)
- Reduced MCP tool count by removing alias tool registrations (aliases still resolve at call time)
- Consolidated 3 search tools (`hana_search_docs`, `hana_smart_search`, `hana_docs_search`) into single `hana_search` with scope parameter
- Moved 6 static knowledge tools to MCP resources for reduced LLM context usage
- Updated MCP SDK from 1.27.1 to 1.29.0
- Fixed MCP server version to read dynamically from package.json instead of hardcoded value
- Fixed fragile command name matching in output formatter (exact-match map instead of substring includes)
- Added `isError: true` signaling to all MCP error response paths

**Removed**

- Removed simulated workflow execution tools (`hana_execute_workflow`, `hana_preview_workflow`) — LLMs orchestrate multi-step tasks more effectively
- Removed no-op `validateEnvironment` function from MCP executor
- Removed low-value `hana_commands_with_examples`, `hana_docs_stats`, `hana_list_doc_categories` tools

## [4.202603.2] - 2026-03-13

Expand Down
36 changes: 36 additions & 0 deletions _i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1602,4 +1602,40 @@ didYouMeanSingle=\n\nDid you mean this?\n {0}
didYouMeanMultiple=\n\nDid you mean one of these?\n {0}
# Option Suggestions (Did You Mean for options)
didYouMeanOption=Did you mean --{0}?

# MCP Server Install Command
mcpServerInstall=Install the MCP server configuration into AI assistant clients (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, VS Code, Continue, Zed)
mcpServerInstallClient=Target client to configure (claude-desktop, claude-code, cursor, windsurf, cline, vscode, continue, zed, or auto to detect)
mcpServerInstallName=Server name in the MCP configuration
mcpServerInstallDryRun=Show what would be written without making changes
mcpServerInstallGlobal=Install globally (user-level) instead of project-level
mcpServerInstallExample1=Install MCP server for Claude Desktop
mcpServerInstallExample2=Preview the configuration without writing
mcpServerInstallExample3=Install globally for Claude Code
mcpServerInstallNotBuilt=MCP server has not been built yet. Run:
mcpServerInstallHeader=SAP HANA CLI - MCP Server Installation
mcpServerInstallServerPath=Server path:
mcpServerInstallServerName=Server name:
mcpServerInstallDryRunHeader=Dry run - configuration that would be written:
mcpServerInstallConfigPath=Config:
mcpServerInstallConfigExists=Exists:
mcpServerInstallSkipped=skipped (config file not found, use --client to target)
mcpServerInstallSuccess=configured successfully
mcpServerInstallFailed=failed to configure:
mcpServerInstallComplete=MCP server configured in {0} client(s).
mcpServerInstallRestart=Restart the client application to activate the MCP server.
mcpServerInstallNone=No clients were configured.
mcpServerInstallNoneHint=Use --client to specify a target, or create the config file first.

# MCP Server Status Command
mcpServerStatus=Check MCP server installation status across all supported AI assistant clients
mcpServerStatusExample=hana-cli mcpServerStatus
mcpServerStatusHeader=SAP HANA CLI - MCP Server Status
mcpServerStatusServerPath=Server path:
mcpServerStatusBuilt=Built:
mcpServerStatusClients=Client Configuration Status:
mcpServerStatusConfigured=configured
mcpServerStatusNotConfigured=config exists, not configured
mcpServerStatusNotFound=config not found
mcpServerStatusBuildHint=MCP server is not built. Build it first:
didYouMeanMultipleOptions=Did you mean one of these?\n --{0}
7 changes: 7 additions & 0 deletions bin/commandMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ export const commandMap = {
'massUpd': './massUpdate.js',
'massupd': './massUpdate.js',
'massUsers': './massUsers.js',
'mcpServerInstall': './mcpServerInstall.js',
'mcp': './mcpServerInstall.js',
'mcpInstall': './mcpServerInstall.js',
'mcp-install': './mcpServerInstall.js',
'mcpServerStatus': './mcpServerStatus.js',
'mcp-status': './mcpServerStatus.js',
'mcpStatus': './mcpServerStatus.js',
'memoryAnalysis': './memoryAnalysis.js',
'memoryLeaks': './memoryLeaks.js',
'memleak': './memoryLeaks.js',
Expand Down
2 changes: 2 additions & 0 deletions bin/commandMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ export const commandMetadata = {
openDBExplorer: { category: 'schema-tools', relatedCommands: ['tables', 'schemas', 'objects'] },
openBAS: { category: 'developer-tools', relatedCommands: ['cds', 'activateHDI'] },
issue: { category: 'developer-tools', relatedCommands: ['diagnose', 'helpDocu'] },
mcpServerInstall: { category: 'developer-tools', relatedCommands: ['mcpServerStatus', 'helpDocu'] },
mcpServerStatus: { category: 'developer-tools', relatedCommands: ['mcpServerInstall', 'helpDocu'] },

// UI Feature Flags
features: { category: 'system-tools', relatedCommands: ['featuresUI', 'systemInfo'] },
Expand Down
Loading
Loading