Skip to content

Improve SDK integration, add multi-instance support and plugin loading#20

Open
EON-LEE wants to merge 1 commit intompociot:mainfrom
EON-LEE:feature/sdk-improvements
Open

Improve SDK integration, add multi-instance support and plugin loading#20
EON-LEE wants to merge 1 commit intompociot:mainfrom
EON-LEE:feature/sdk-improvements

Conversation

@EON-LEE
Copy link

@EON-LEE EON-LEE commented Feb 22, 2026

Title: Improve SDK integration, add multi-instance support and plugin loading

Body:

Summary

  • Replace MCP-based permission server with in-process canUseTool callback for simpler, more
    reliable tool approval
  • Add settingSources support so Claude Code plugins and settings work through the bot
    automatically
  • Support running multiple bot instances from a single codebase via ENV_FILE
  • Add configurable slash commands, bot display name, and system prompt customization
  • Add BASE_DIRECTORY fallback in working directory resolution
  • Update Slack app manifest with additional required scopes (channels:read, groups:read,
    mpim:read, interactivity)
  • Update README with comprehensive documentation

Key Changes

Permission handling (permission-mcp-server.ts)

Replaced the standalone MCP stdio server with simple exported functions (requestSlackApproval,
resolveApproval). The canUseTool SDK callback handles permission requests in-process instead of
spawning a separate MCP server.

Configuration (config.ts)

Added settingSources, systemPromptAppend, botDisplayName, slashCommand, and ENV_FILE
support.

Claude handler (claude-handler.ts)

Uses canUseTool callback instead of permissionMode + permissionPromptToolName, which avoids
the "MCP tool not found" error.

Test plan

  • Bot responds to DMs and channel mentions
  • Tool approval buttons work when message starts with plan
  • Multiple instances run independently with ENV_FILE=.env.bot2 npm run dev
  • Claude Code plugins load via settingSources

- Replace MCP-based permission server with in-process canUseTool callback
- Add settingSources support for loading Claude Code plugins/settings
- Add configurable slash commands, bot display name, and system prompt append
- Support multiple bot instances via ENV_FILE environment variable
- Add BASE_DIRECTORY fallback in working directory resolution
- Update Slack app manifest with additional required scopes
- Update README with comprehensive documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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