Skip to content

feat(core): Enhance MCP registry with new templates and features - #800

Merged
haiphucnguyen merged 4 commits into
mainfrom
feature/add-mcp-templates
Nov 4, 2026
Merged

haiphucnguyen merged 4 commits into
mainfrom
feature/add-mcp-templates

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

Summary

  • Adds 'Travel' and 'Finance' categories to the MCP server catalog.
  • Introduces new specialized MCP server templates, including sequential thinking.
  • Updates MCP instance management to correctly update existing configurations using index lookup.
  • Refines date and time tooling to robustly handle optional (nullable) timezones.

Related Issue(s)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling / CI

What Changed & Why

How to Test

./gradlew test

Screenshots / Recordings (if applicable)

Checklist

  • I have read the CONTRIBUTING guide
  • My branch is up to date with main
  • I ran ./gradlew spotlessApply and ./gradlew detekt locally
  • I ran ./gradlew test and all tests pass
  • I added/updated tests for my changes (if applicable)
  • I added/updated documentation (if applicable)
  • My commits are signed off (DCO) — git commit -s
  • This PR is focused on a single feature/fix

Additional Notes

- Adds 'Travel' and 'Finance' categories to the MCP server catalog.
- Introduces new specialized MCP server templates, including sequential thinking.
- Updates MCP instance management to correctly update existing configurations using index lookup.
- Refines date and time tooling to robustly handle optional (nullable) timezones.

BREAKING CHANGE: The `DateTimeTools` function now accepts a nullable `timezone` string (`String?`). Callers must handle potential null values when resolving zones.
Copilot AI lite review requested due to automatic review settings November 3, 2026 23:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved security, accessibility, and configuration defects remain, including potential API-key leakage in debug logs, missing selected and focus semantics for category chips, and ignored Playwright settings.

3 open issues
What changed in this PR

This pull request expands the MCP server catalog with new categories and templates, improves instance replacement and timezone handling, and introduces a shared catalog filter-chip component.

Changes:

  • Adds Travel and Finance categories with Sequential Thinking, Memory, Playwright, Google Maps, and Yahoo Finance templates.
  • Updates MCP instance replacement while preserving configuration order.
  • Supports nullable timezone inputs with local-time fallback.
  • Replaces catalog-specific filter chips with a reusable themed component.
File Summary Review findings
shared-jvm/​src/​main/​kotlin/​io/​askimo/​tools/​datetime/​DateTimeTools.kt Accepts nullable timezone values and preserves local-time fallback behavior. None.
shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​mcp/​McpServerTemplateRegistry.kt Registers new MCP categories and server templates. Critical (1 vote): A plaintext Google Maps API key can be written to debug logs through the resolved environment map. Moderate (2 votes): Playwright settings use environment variables instead of the command-line options supported by @playwright/mcp. Nit (1 vote): The real Chrome profile guidance should warn about profile-lock failures when Chrome is running.
shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​mcp/​config/​McpInstancesConfig.kt Replaces matching MCP instances by index while preserving order. Moderate (1 vote): Only the first duplicate ID is replaced, potentially leaving stale duplicate instances in the configuration.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​mcp/​McpServerCatalogDialog.kt Uses the shared filter-chip component for catalog categories. None.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​common/​theme/​AppComponents.kt Adds a reusable themed filter-chip component with hover and selection styling. Moderate (4 votes): Replacing FilterChip removes selectable semantics and visible keyboard focus indication; the component should expose selection semantics and an explicit focus indication.

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Critical secret-leak paths remain in connector startup, command diagnostics, exception messages, and captured process output, while the template also passes Playwright settings in unsupported environment variables.

1 open issue
4 previously missed issues

In code that hasn't changed since last review

High severity Resolved template secrets bypass command and environment redaction

shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​mcp/​McpInstance.kt:58

resolveSecrets runs before toConnector, and template-mode definitions are already materialized by McpServerTemplateRegistry.resolve (placeholders replaced and parameters cleared). Therefore commandSources/envSources can contain the actual secret with no {{...}} variable; redactList/redactMap then return it unchanged. This debug statement can emit command or environment secrets (for example, the Google Maps key). Make the redaction key/definition-aware or redact against the resolved secret values before logging.

This issue also appears on line 85 of the same file.

High severity Resolved HTTP URL is still logged without secret redaction

shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​mcp/​McpInstance.kt:85

This masks only this McpInstance log entry, but HttpMcpConnector.createTransport() subsequently logs the same resolved URL directly. A definition with a secret in its HTTP URL will still leak that value at connector startup; move the redaction into the connector/config boundary or remove the raw URL log there.

High severity Transport startup logs unredacted secret command arguments

shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​mcp/​connectors/​StdioMcpConnector.kt:35

redactErrorText only applies heuristic patterns and has no access to the definition's declared secret parameters. A secret command argument that does not match those patterns (for example, a short token) is still logged verbatim here, even though McpInstance masked it earlier. Pass an already-redacted command into the transport or stop logging command values.

High severity Probe errors and captured output can expose secrets

shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​mcp/​connectors/​StdioMcpConnector.kt:66

Only the interpolated command is redacted here; ${e.message} remains raw, and the non-zero-exit branch below also returns captured stderr/stdout without redaction. A process-start error can include a secret-valued executable, and a failing MCP process can echo environment/arguments, so this diagnostic can leak the very values this change is meant to protect. Redact exception text and captured output before putting them in ProbeResult.Failed.

6 resolved since last review

Review effort: Lite

@haiphucnguyen
haiphucnguyen merged commit 68d6987 into main Nov 4, 2026
13 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/add-mcp-templates branch November 4, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants