ask-me-maybe
v0.2.1
Published
Ask Me Maybe — an MCP server that enables AI assistants to ask humans questions via Slack, with extended timeouts and partial message support. Forked from trtd56/AskOnSlackMCP.
Downloads
382
Maintainers
Readme
Ask Me Maybe — MCP Server
An MCP server that enables AI assistants to ask humans questions via messaging platforms, with extended timeouts, reminder pings, and a partial message protocol for multi-part answers.
Forked from trtd56/AskOnSlackMCP (MIT License).
Features
- Extended timeouts — Configurable base timeout (default 5 min), extended to 45 min when the user signals they're still composing
- Partial message protocol — End a message with
...to say "I'm still typing." The bot buffers partials and concatenates them when you send a final message without dots - Reminder pings — Automated reminders in-thread as the deadline approaches (default: 2 min and 30 sec before expiry)
- MCP progress notifications — Periodic keepalive signals so MCP clients don't prematurely cancel long-running requests
- Multi-channel architecture — Pluggable connector design (Slack first, Telegram planned)
- Thread-based conversations — Each question starts a new thread for clean context
Quick Start
With Claude Code
Add a .mcp.json to your project root:
{
"mcpServers": {
"ask-me-maybe": {
"command": "npx",
"args": [
"ask-me-maybe",
"--slack-bot-token", "xoxb-your-bot-token",
"--slack-app-token", "xapp-your-app-token",
"--slack-channel-id", "C1234567890",
"--slack-user-id", "U1234567890"
]
}
}
}With Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ask-me-maybe": {
"command": "npx",
"args": [
"ask-me-maybe",
"--slack-bot-token", "xoxb-your-bot-token",
"--slack-app-token", "xapp-your-app-token",
"--slack-channel-id", "C1234567890",
"--slack-user-id", "U1234567890"
]
}
}
}Slack App Setup
- Create a new Slack app at https://api.slack.com/apps
- Bot Token Scopes (OAuth & Permissions):
chat:write— Send messageschannels:history— Read thread replieschannels:read— Access channel info
- Socket Mode — Enable it, generate an App-Level Token with
connections:writescope - Event Subscriptions — Subscribe to bot events:
message.channels— Messages in public channels
- Install the app to your workspace
- Invite the bot to your channel:
/invite @YourBotName
Configuration
Required arguments
| Argument | Description |
|---|---|
| --slack-bot-token | Bot User OAuth Token (xoxb-...) |
| --slack-app-token | App-Level Token for Socket Mode (xapp-...) |
| --slack-channel-id | Channel ID where the bot operates |
| --slack-user-id | User ID to mention when asking questions |
Optional arguments
| Argument | Default | Description |
|---|---|---|
| --timeout | 300 | Base timeout in seconds (before any user response) |
| --extended-timeout | 2700 | Timeout in seconds after each partial message (45 min) |
| --max-session-duration | 5340 | Hard ceiling in seconds for entire session (89 min) |
| --max-partials | 20 | Maximum partial messages before auto-closing |
| --reminder-intervals | 120,30 | Comma-separated seconds-before-deadline for reminders |
| --log-level | INFO | Logging level |
How It Works
The partial message protocol
When the bot asks you a question in Slack, you can compose your answer across multiple messages:
- Partial message — End with
...or…to signal "I'm still typing" - Final message — Send without trailing dots to complete your answer
You: I think we should use Postgres...
Bot: Partial message received — waiting for the rest. (45 min remaining)
You: but maybe MySQL for the read replicas...
Bot: Partial message received — waiting for the rest. (45 min remaining)
You: actually, let's just go full Postgres.The bot concatenates all parts and returns to the AI assistant:
I think we should use Postgres
but maybe MySQL for the read replicas
actually, let's just go full Postgres.Timeout behavior
- Base timeout (5 min) — How long the bot waits for your first response
- Extended timeout (45 min) — Each partial resets the deadline to this duration
- Hard ceiling (89 min) — Absolute maximum session length, regardless of partials
- Reminders — The bot pings the thread at 2 min and 30 sec before deadline
Available Tools
ask_me_maybe
Ask a human a question via a messaging platform. The tool blocks until a response is received.
Parameters:
question(string): The question to ask. Be specific and provide context.
Development
Scripts
| Command | Description |
|---|---|
| npm run build | Compile TypeScript |
| npm run dev | Run with hot-reloading |
| npm test | Run tests (watch mode) |
| npm run test:ci | Run tests with coverage |
Architecture
Three-layer design:
MCP Server (index.ts)
└── ConversationManager (conversation-manager.ts)
└── ChannelConnector (connectors/)
└── SlackConnector (connectors/slack/)- MCP Server — Tool registration, progress keepalive, cancellation handling
- ConversationManager — Timeouts, partial detection, buffering, reminders. Channel-agnostic.
- ChannelConnector — Platform-specific messaging. Implement the interface to add a new channel.
Project structure
src/
├── index.ts # MCP server, CLI, orchestration
├── conversation-manager.ts # Core: timeouts, partials, reminders
├── messages.ts # All LLM-facing and user-facing text
├── types.ts # Shared types and config
├── connectors/
│ ├── connector.ts # ChannelConnector interface
│ └── slack/
│ ├── slack-connector.ts # Slack ChannelConnector implementation
│ └── slack-handler.ts # Low-level Slack connection management
tests/
├── conversation-manager.test.ts # Core logic tests (mock connector)
├── messages.test.ts # Message formatting tests
├── index.test.ts # CLI parsing tests
├── types.test.ts # Type definition tests
└── connectors/slack/
└── slack-connector.test.ts # Slack connector testsAttribution
Forked from AskOnSlackMCP by trtd56, licensed under the MIT License.
License
MIT
