MCP server and importable AI tools for the Doist Comms API. Use the tools through an MCP server, or import them directly to plug Comms into your own AI conversational interface.
npm install @doist/comms-mcpExample with Vercel's AI SDK:
import { fetchInbox, reply, markDone } from '@doist/comms-mcp'
import { streamText } from 'ai'
const result = streamText({
model: yourModel,
system: 'You are a helpful Comms assistant',
tools: {
fetchInbox,
reply,
markDone,
},
})npx @doist/comms-mcpAdd to claude_desktop_config.json:
{
"mcpServers": {
"comms": {
"command": "npx",
"args": ["-y", "@doist/comms-mcp"],
"env": {
"COMMS_API_KEY": "your-comms-api-key-here"
}
}
}
}~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
{
"mcpServers": {
"comms": {
"command": "npx",
"args": ["-y", "@doist/comms-mcp"],
"env": {
"COMMS_API_KEY": "your-comms-api-key-here"
}
}
}
}claude mcp add comms npx @doist/comms-mcp
export COMMS_API_KEY=your-comms-api-key-here- Command Palette → MCP: Add Server
- Configure:
{
"servers": {
"comms": {
"command": "npx",
"args": ["-y", "@doist/comms-mcp"],
"env": {
"COMMS_API_KEY": "your-comms-api-key-here"
}
}
}
}By default the server talks to https://comms.todoist.com. To point at
staging or a custom deployment, also set COMMS_BASE_URL:
"env": {
"COMMS_API_KEY": "your-comms-api-key-here",
"COMMS_BASE_URL": "https://comms.staging.todoist.com"
}Generate a personal API token from the Comms app console, then export
it as COMMS_API_KEY (or paste it into the MCP client config above).
The tools are intentionally workflow-shaped rather than 1:1 wrappers around API endpoints, so an LLM can complete a useful action with a small number of calls.
- userInfo — Information about the current user and their workspaces
- fetchInbox — Threads and conversations from the inbox
- loadThread — Load a thread with its comments
- loadConversation — Load a conversation with its messages
- searchContent — Search a workspace for threads, comments, and messages
- getMentions — Threads, comments, and messages mentioning the current user
- createThread — Start a new channel thread
- updateObject / deleteObject — Edit or remove a thread, comment, or message
- reply — Reply to a thread or conversation
- react — Add a reaction to a thread, comment, conversation, or message
- markDone — Mark threads or conversations as read and/or archived
- buildLink — Build URLs to Comms resources
- listChannels / getGroups / getUsers / getWorkspaces — Discovery helpers
For details, see src/tools.
- MCP server uses the official @modelcontextprotocol/sdk
- Comms TypeScript SDK @doist/comms-sdk
- Node.js 18+
- npm
- A Comms API token
git clone https://github.com/Doist/comms-mcp.git
cd comms-mcp
npm install
cp .env.example .env # then add your COMMS_API_KEY
npm run buildnpm start— Build and run the MCP inspectornpm run dev— Watch mode with auto-restartnpm test— Jestnpm run type-check— TypeScriptnpm run format:check/npm run format:fix— oxlint + oxfmt
npx tsx scripts/run-tool.ts user-info '{}'
npx tsx scripts/run-tool.ts --list- Tests pass (
npm test) - Types pass (
npm run type-check) - Lint & format pass (
npm run format:check)
Use Conventional Commits — feat:, fix:, docs:, test:, chore:.
MIT