Skip to content

Add command executor MCP server#1837

Merged
steveluc merged 5 commits intomainfrom
add-command-executor-mcp-server
Jan 17, 2026
Merged

Add command executor MCP server#1837
steveluc merged 5 commits intomainfrom
add-command-executor-mcp-server

Conversation

@steveluc
Copy link
Copy Markdown
Contributor

Summary

This PR introduces a new MCP (Model Context Protocol) server that enables Claude Code to execute TypeAgent commands through natural language. The server bridges Claude Code and the TypeAgent dispatcher, enabling music playback, list management, calendar operations, and other TypeAgent capabilities.

Key Features

  • WebSocket Connection: Connects Claude Code to TypeAgent dispatcher at ws://localhost:8999
  • Automatic Reconnection: Monitors connection health and reconnects every 5 seconds if needed
  • Lazy Connection: Server starts even if TypeAgent dispatcher isn't running yet
  • Comprehensive Logging: All activity logged to temp files (/tmp/typeagent-mcp/) for debugging
  • Clean Output: HTML image tags are stripped from responses for better readability in CLI

Natural Language Commands

The server translates natural language into TypeAgent actions:

  • Music: "play bohemian rhapsody by queen", "my ear wants to hear thriller"
  • Lists: "what's on my grocery list", "add milk to shopping list"
  • Calendar: "schedule meeting tomorrow at 2pm" (when calendar agent is available)

Caching Behavior

The TypeAgent dispatcher includes intelligent caching that learns from command patterns:

  • First use of a sentence structure: AI translation (~1-2s)
  • Subsequent uses: Cached translation (~0.001s)
  • Cache persists across different songs/items with same structure

Installation

Users add this to .mcp.json in the TypeAgent repo:

{
  "mcpServers": {
    "command-executor": {
      "command": "node",
      "args": ["packages/commandExecutor/dist/server.js"]
    }
  }
}

Files Added

  • packages/commandExecutor/ - Complete MCP server package
  • .mcp.json - Example MCP configuration
  • README with installation and usage instructions
  • Logging utilities and test client

Test Plan

  • Play music with various sentence structures
  • Manage lists (grocery, shopping)
  • Verify caching behavior (0.001s for cached, 1-2s for new patterns)
  • Test reconnection when TypeAgent server restarts
  • Verify clean output formatting

🤖 Generated with Claude Code

Introduces a new MCP (Model Context Protocol) server that enables Claude Code to execute TypeAgent commands for music playback, list management, calendar operations, and other natural language tasks.

Key features:
- Connects Claude Code to TypeAgent dispatcher via WebSocket
- Automatic reconnection with 5-second retry interval
- Comprehensive logging to temp files for debugging
- Supports natural language commands (e.g., "play bohemian rhapsody", "add milk to grocery list")
- Clean output formatting with HTML image tags stripped

Includes example configuration for .mcp.json and detailed installation instructions in README.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add trademark section to README
- Remove dist-test build outputs from git
- Fix package.json field ordering (use exports instead of main)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use exact trademark text format with proper line breaks
- Sort package.json scripts alphabetically

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@steveluc steveluc temporarily deployed to development-fork January 17, 2026 07:33 — with GitHub Actions Inactive
@steveluc steveluc temporarily deployed to development-fork January 17, 2026 07:33 — with GitHub Actions Inactive
@steveluc steveluc added this pull request to the merge queue Jan 17, 2026
Merged via the queue into main with commit 6d3b827 Jan 17, 2026
21 checks passed
@steveluc steveluc deleted the add-command-executor-mcp-server branch January 17, 2026 09:05
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.

1 participant