Integrations
Todoist
Manage tasks, projects, and labels
The Todoist integration provides access to Todoist's API through the Integrate MCP server.
Installation
The Todoist integration is included with the SDK:
import { todoistIntegration } from "integrate-sdk/server";Setup
1. Create a Todoist App
- Go to Todoist App Console
- Create a new app
- Configure OAuth settings
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Todoist integration to your server configuration. The integration automatically reads TODOIST_CLIENT_ID and TODOIST_CLIENT_SECRET from your environment variables:
import { createMCPServer, todoistIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
todoistIntegration({
scopes: ["data:read_write"], // Optional
}),
],
});You can override the environment variables by passing explicit values:
todoistIntegration({
clientId: process.env.CUSTOM_TODOIST_ID,
clientSecret: process.env.CUSTOM_TODOIST_SECRET,
scopes: ["data:read_write"],
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("todoist");
const tasks = await client.todoist.listTasks({});If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, todoistIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [todoistIntegration()],
});Configuration Options
Prop
Type
Available Tools
Projects
todoist_list_projects- List projectstodoist_get_project- Get a specific projecttodoist_create_project- Create a new project
Tasks
todoist_list_tasks- List taskstodoist_get_task- Get a specific tasktodoist_create_task- Create a new tasktodoist_complete_task- Mark a task as complete
Labels
todoist_list_labels- List labelstodoist_create_label- Create a new label
Examples
Create a Task
const result = await client.todoist.createTask({
content: "Review pull request",
description: "Review the authentication PR",
projectId: "2203306141",
priority: 4,
dueString: "tomorrow at 10:00",
labels: ["work", "urgent"],
});
console.log("Task created:", result);List Tasks
const result = await client.todoist.listTasks({
projectId: "2203306141",
filter: "today | overdue",
});
console.log("Tasks:", result);Create a Project
const result = await client.todoist.createProject({
name: "New Project",
color: "blue",
isFavorite: true,
});
console.log("Project created:", result);Complete a Task
const result = await client.todoist.completeTask({
taskId: "1234567890",
});
console.log("Task completed:", result);OAuth Scopes
The default scope is ['data:read_write']. Available scopes:
data:read- Read tasks, projects, and labelsdata:read_write- Full access to read and write data (default)data:delete- Delete tasks, projects, and labels
Error Handling
try {
const result = await client.todoist.createTask({
content: "New task",
projectId: "2203306141",
});
} catch (error) {
if (error.message.includes("not found")) {
console.error("Project not found");
} else if (error.message.includes("authentication")) {
console.error("Authentication failed");
} else {
console.error("Unexpected error:", error);
}
}Next Steps
- Explore the Linear Integration
- Explore the Notion Integration
- See Advanced Usage for more examples