A bridge application that connects Slack and MS Teams with terminal-based LLM interfaces (Claude Code) running locally.
Built with Bun for fast startup and native TypeScript + SQLite support.
- Slack & Teams Support - Works with both platforms simultaneously
- Acknowledgement + Response - Immediate feedback when processing starts
- Platform-Appropriate Formatting - mrkdwn for Slack, Adaptive Cards for Teams
- Per-Channel Configuration - Map channels to specific working directories
- Session Persistence - Maintains conversation context with
--resumesupport - Intermediate Callbacks - LLM can send updates during long-running tasks via MCP
Slack/Teams → Promptty Bridge → Local Process (Claude Code)
↑ |
└─── IPC/stdout ──────┘
curl -fsSL https://bun.sh/install | bashcd /Users/casey/git/promptty
bun install
# Also install MCP server dependencies
cd mcp-server && bun install && cd ..Copy .env.example to .env and fill in your credentials:
cp .env.example .envFor Slack:
- Create a Slack app at https://api.slack.com/apps using
slack-app-manifest.json- Click "Create New App" → "From an app manifest"
- Select workspace and paste the manifest
- Create an App-Level Token: Basic Information → App-Level Tokens → Generate (scope:
connections:write) - Install to workspace: Install App → Install to Workspace
- Copy tokens to
.env:SLACK_APP_TOKEN- App-Level Token (xapp-...)SLACK_BOT_TOKEN- Bot User OAuth Token (xoxb-...)SLACK_SIGNING_SECRET- Signing Secret from Basic Information
For Teams:
- Register a bot at https://dev.botframework.com
- Get App ID and Password
- Configure messaging endpoint:
https://your-server/api/messages
Edit config.json to map channels to working directories:
{
"channels": {
"slack:T0123456789/C0123456789": {
"workingDirectory": "/path/to/your/project",
"command": "claude",
"sessionTTL": 14400000
}
},
"defaults": {
"command": "claude",
"sessionTTL": 14400000
}
}Finding Channel IDs:
- Slack: Right-click channel → "View channel details" → Copy Channel ID
- Teams: Use Graph API or check URL in web Teams
# Development (with hot reload)
bun dev
# Production
bun start| Variable | Description | Required |
|---|---|---|
SLACK_APP_TOKEN |
Slack app-level token (xapp-...) | For Slack |
SLACK_BOT_TOKEN |
Slack bot token (xoxb-...) | For Slack |
SLACK_SIGNING_SECRET |
Slack signing secret | For Slack |
TEAMS_APP_ID |
Teams bot app ID | For Teams |
TEAMS_APP_PASSWORD |
Teams bot password | For Teams |
LOG_LEVEL |
Log level (trace/debug/info/warn/error) | No (default: info) |
DATA_DIR |
Directory for SQLite database | No (default: ./data) |
CONFIG_PATH |
Path to config.json | No (default: ./config.json) |
CALLBACK_PORT |
Port for callback server | No (default: 3001) |
Each channel entry in config.json:
{
"workingDirectory": "/path/to/project",
"command": "claude",
"systemPrompt": "You are helping with...",
"sessionTTL": 14400000,
"allowedTools": ["Bash", "Read", "Write"]
}Claude Code can send messages back to chat channels and post progress updates using the Promptty MCP server.
mcp__promptty__post_update- Send progress updates to the current conversation threadmcp__promptty__send_message- Send messages to any configured channelmcp__promptty__list_channels- List available channels
CRITICAL: The workingDirectory in your config.json MUST be the directory containing the .mcp.json file. Claude Code discovers MCP servers from the working directory's .mcp.json.
-
Install MCP server in your project's working directory:
bun run src/cli/index.ts mcp install /path/to/your/project
This creates
.mcp.jsonin your project directory and enables MCP servers in Claude settings. -
Verify your config.json workingDirectory matches:
{ "defaults": { "workingDirectory": "/path/to/your/project" } }If
workingDirectorypoints to a different directory than where.mcp.jsonlives, MCP tools will not be available. -
Check MCP status:
bun run src/cli/index.ts mcp status /path/to/your/project
The mcp install command creates:
.mcp.json (in your project directory):
{
"mcpServers": {
"promptty": {
"command": "bun",
"args": ["run", "/path/to/promptty/mcp-server/index.ts"],
"env": {
"PROMPTTY_CALLBACK_URL": "http://127.0.0.1:3001"
}
}
}
}.claude/settings.local.json (enables project MCP servers):
{
"enableAllProjectMcpServers": true
}"MCP tools aren't available"
- Verify
workingDirectoryin config.json matches where.mcp.jsonis located - Check
.claude/settings.local.jsonhas"enableAllProjectMcpServers": true - Run
claude mcp listfrom your project directory to verify the promptty server connects
"No session ID available"
- This is an internal error. The
PROMPTTY_SESSION_IDenv var is automatically set by Promptty when invoking Claude Code.
Callbacks not reaching chat
- Verify callback server is running on the configured port (default 3001)
- Check
PROMPTTY_CALLBACK_URLin.mcp.jsonmatches the callback server port - Look for callback logs:
LOG_LEVEL=debug bun start
Once configured, Claude Code can:
# Post progress update to current thread
mcp__promptty__post_update(message="Analyzing files...", type="progress")
# List available channels
mcp__promptty__list_channels()
# Send to a specific channel
mcp__promptty__send_message(platform="slack", channel_id="C0123456789", message="Hello!")
Update types: progress, warning, success, error
Promptty maintains conversation context:
- Thread-based: Messages in the same thread share a session
- Resume support: Uses Claude Code's
--resumeflag - Auto-expiry: Sessions expire after TTL (default 4 hours)
- SQLite storage: Persisted to
data/promptty.db
promptty/
├── src/
│ ├── index.ts # Entry point
│ ├── config/ # Configuration loading
│ ├── db/ # Bun SQLite session storage
│ ├── llm/ # Claude Code executor
│ ├── platforms/ # Slack & Teams adapters
│ ├── callbacks/ # Callback HTTP server
│ ├── formatters/ # Response formatting
│ └── utils/ # Logging
├── mcp-server/ # MCP server for callbacks
├── skills/ # Claude Code skills
├── config.json # Channel configuration
└── data/ # SQLite database
# Run in watch mode
bun dev
# Type checking (optional, Bun runs TS directly)
bun run typecheck- Check Socket Mode is enabled in Slack app settings
- Verify bot has been added to the channel
- Check token scopes include
channels:historyandim:history
- Verify bot is registered and credentials are correct
- Check the messaging endpoint is accessible
- Ensure bot is added to the team/channel
Ensure claude is in your PATH:
which claude- Check working directory is writable
- Verify thread_ts is being captured correctly
- Check logs for session creation messages
MIT