feat: refactor MCP server and add install command#135
Merged
jung-thomas merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Major refactor of the MCP server (mcp-server/src/) and new CLI commands: **MCP Server Modularization** - Split monolithic index.ts (1,821 lines) into ~250-line bootstrap + 5 tool modules - New modules: tools/types.ts, tools/discovery-tools.ts, tools/content-tools.ts, tools/search-tools.ts, tools/cli-tools.ts **Tool Count Reduction (~230 → ~166)** - Remove alias tool registrations (aliases still resolve when called) - Consolidate search tools into single hana_search with scope parameter - Move static knowledge tools to MCP resources - Remove simulated workflow execution (LLMs orchestrate better) **Bug Fixes** - Add isError: true to all error responses (MCP protocol compliance) - Fix output formatter fragile substring matching (Map lookup instead of includes()) - Read version from package.json instead of hardcoded '1.0.0' - Remove no-op validateEnvironment function **New Commands** - hana-cli mcp (mcpServerInstall) — auto-configure MCP server in AI clients - hana-cli mcp-status (mcpServerStatus) — check MCP configuration across clients - Supports Claude Desktop, Claude Code, Cursor, VSCode, and Windsurf **MCP Registry Publishing** - Add server.json for MCP Registry discovery - Add publish-mcp-registry job to release workflow (GitHub OIDC auth) - Bump server.json version in prepare-release.js **Documentation** - Update MCP integration docs with three install paths - Add command docs for mcp-server-install and mcp-server-status - Update development docs to reflect new architecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
index.ts(1,821 → ~250 lines) into 5 focused tool modules undermcp-server/src/tools/isError: trueto all error responses, fix output formatter substring matching, read version from package.json, remove no-opvalidateEnvironmenthana-cli mcpinstall command for auto-configuring MCP server in Claude Desktop, Claude Code, Cursor, VSCode, and Windsurfhana-cli mcp-statusto check MCP configuration across all supported clientsserver.jsonand GitHub OIDC authentication in release workflowTest plan
cd mcp-server && npm run buildcompiles cleannode mcp-server/build/index.jsstarts without errors (CTRL+C to stop)hana-cli mcp --dry-run --client claude-codeshows config without writinghana-cli mcp-statusreports current MCP configuration statusnpm testpasseshana_sfor status) still resolve when called