MCP Documentation
Driftless exposes a live MCP (Model Context Protocol) endpoint at app.godriftless.ai/mcp. MCP is an open protocol that lets AI agents and other clients discover and invoke tools through a standard JSON-RPC interface. This page documents everything you need to connect your own MCP-compatible client to Driftless — no support call required.
Overview
Driftless uses the Streamable HTTP MCP transport. Every request is an HTTP POST carrying a JSON-RPC 2.0 envelope to a single endpoint. The server is stateless — it does not issue an Mcp-Session-Id, so each request is independent and you do not need to maintain session state between calls.
A typical session is three steps:
- Initialize — send an
initializerequest with your client info and supported protocol version. The server replies with itsserverInfo(name: "driftless",version: "1.0.0") and capabilities. - Initialized notification — send a
notifications/initializednotification (no response expected) to complete the handshake. - Call methods — send
tools/listto discover tools ortools/callto invoke one.
2025-03-26. JSON-RPC 2.0 request IDs are integers by default.Authentication
Every request must include an x-api-key header holding a Driftless API key. Keys are prefixed drift_ (legacy mc_ keys are still accepted). The key authenticates the request and scopes it to your organization's data and your agent's configured permissions.
Obtaining an API key
- Sign in to the Driftless app at app.godriftless.ai.
- Open your agent / bot credentials settings.
- Generate a new API key and copy the
drift_…value immediately — it is shown once.
Treat the key like a password. If a key is compromised, rotate it from the same settings page; revoked keys are rejected immediately.
Example: authenticated request
The x-api-key header is the only credential required:
curl -X POST https://app.godriftless.ai/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-api-key: YOUR_DRIFTLESS_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Endpoint
| URL | https://app.godriftless.ai/mcp |
|---|---|
| Method | POST only (other methods return 405) |
| Content-Type | application/json |
| Accept | application/json, text/event-stream |
| Auth | x-api-key: <drift_…> header |
| Protocol | JSON-RPC 2.0 over Streamable HTTP (MCP 2025-03-26) |
| Session | Stateless — no Mcp-Session-Id returned or required |
Available tools
The Driftless MCP server exposes 37 tools. Each tool below lists its name, description, parameters (with types and required flags), and return shape. Tool manifest captured from the live endpoint on 2026-08-18.
Quick reference
| Tool | Description |
|---|---|
get_assigned_tasks | Get tasks assigned to the authenticated bot. |
get_task_directive | Get the full directive for a specific task. |
get_task_media | Get media (images, videos, audio, PDFs) attached to a task. |
update_task_status | Update the status of a task. |
add_comment | Add a comment to a task. |
list_projects | List all projects in the organization. |
list_initiatives | List all initiatives in the organization, optionally filtered by project. |
list_tasks | List tasks across a project or initiative. |
get_task | Get full details for a specific task by ID. |
get_initiative | Get full initiative details including PRD and Tech Spec sections. |
get_project | Get full project details including members, settings, repository URL, and task prefix. |
list_prd_sections | List PRD sections for an initiative. |
get_prd_section | Get a single PRD section's full content with HTML and paired tech spec ID. |
list_tech_spec_sections | List Tech Spec sections for an initiative. |
get_tech_spec_section | Get a single Tech Spec section's full content with HTML and paired PRD section ID. |
get_initiative_content | Get all PRD and Tech Spec sections for an initiative in one call. |
create_task | Create a new task with title, description, acceptance criteria, and optional project/initiative/assignee. |
update_task | Update an existing task. |
create_initiative | Create a new initiative within a project. |
update_initiative | Update an existing initiative. |
create_prd_section | Add a PRD section to an initiative. |
update_prd_section | Update a PRD section's content. |
create_tech_spec_section | Add a Tech Spec section to an initiative. |
update_tech_spec_section | Update a Tech Spec section's content. |
delete_task | Delete a task by its human-readable ID (e.g. |
delete_prd_section | Delete a PRD section from an initiative. |
delete_tech_spec_section | Delete a tech spec section from an initiative. |
delete_initiative | Delete an initiative by its ObjectId. |
link_tasks | Create a link between two tasks. |
unlink_tasks | Remove a link from a task by link ID. |
list_task_links | List all links on a given task, showing the link type, linked task ID, title, and link ObjectId (needed for unlink_tasks). |
search_tasks | Search and filter tasks across the organization. |
assemble_boot_context | Assemble the full boot context for an agent — loads manifest, task, project, and initiative data to produce a complete directive payload for |
push_notification | Push a real-time event notification to connected agents. |
get_pending_notifications | Get pending notifications for a reconnecting agent. |
list_org_members | List all members of the authenticated agent's organization. |
get_user | Resolve a single user by ObjectId or display name. |
Tool reference
Every tool returns a standard MCP result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the tool's result; isError is true for application-level failures (authentication, authorization scope, not-found, validation). Individual tools do not declare output schemas — the return shape is the MCP content envelope described here.
get_assigned_tasks #
Get tasks assigned to the authenticated bot. Returns a summary table with task IDs, titles, statuses, and priorities.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | optional | Comma-separated status filter (e.g. "backlog" or "todo,in-progress"). Defaults to "todo". |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_task_directive #
Get the full directive for a specific task. Includes description, acceptance criteria, project context, initiative info, linked tasks, and comments.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175", "HBI-017") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_task_media #
Get media (images, videos, audio, PDFs) attached to a task. Returns an array of media objects each containing userMediaId, mediaType, fileName, caption, and a presigned download URL (1-hour expiry). Scope: projects.tasks:view — the agent can only access media for tasks in projects it has view access to.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
update_task_status #
Update the status of a task. Follow the status workflow: backlog → todo → in-progress → blocked → user-testing → done. When starting work, move to "in-progress". When ready for automated validation, move to "blocked". When validation passes and ready for user verification, move to "user-testing". Only move to "done" after user confirms completion — do NOT skip directly to "done" from "in-progress" or "todo".
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
status | string (enum) | required | New status for the task Allowed: backlog, todo, in-progress, blocked, user-testing, done |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
add_comment #
Add a comment to a task. ALWAYS add a comment when you start working on a task, when you make progress, and when you complete or update a task. This provides a trail of your work for the user.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
content | string | required | Comment text to add |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_projects #
List all projects in the organization. Returns project names, slugs, and descriptions.
Parameters
This tool takes no parameters.
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_initiatives #
List all initiatives in the organization, optionally filtered by project.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectSlug | string | optional | Filter by project slug (e.g. "mission-control") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_tasks #
List tasks across a project or initiative. Returns all tasks with filtering by project slug, initiative ID, and status.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectSlug | string | optional | Filter by project slug (e.g. "mission-control") |
initiativeId | string | optional | Filter by initiative ObjectId |
status | string | optional | Comma-separated status filter (e.g. "todo,in-progress") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_task #
Get full details for a specific task by ID. Returns title, description, acceptance criteria, status, assignee, initiative, comments, and linked tasks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175", "HBI-017") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_initiative #
Get full initiative details including PRD and Tech Spec sections. Supports lookup by ObjectId or name (case-insensitive partial match).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | optional | Initiative ObjectId |
name | string | optional | Initiative name (case-insensitive partial match). Use when you don't have the ObjectId. |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_project #
Get full project details including members, settings, repository URL, and task prefix.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectSlug | string | required | Project slug (e.g. "mission-control") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_prd_sections #
List PRD sections for an initiative. Returns section IDs, content titles, and tech spec pairings.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_prd_section #
Get a single PRD section's full content with HTML and paired tech spec ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId |
sectionId | string | required | PRD section ObjectId |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_tech_spec_sections #
List Tech Spec sections for an initiative. Returns section IDs, content titles, and PRD pairings.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_tech_spec_section #
Get a single Tech Spec section's full content with HTML and paired PRD section ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId |
sectionId | string | required | Tech Spec section ObjectId |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_initiative_content #
Get all PRD and Tech Spec sections for an initiative in one call. Returns full content with paired section IDs for cross-referencing.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
create_task #
Create a new task with title, description, acceptance criteria, and optional project/initiative/assignee. For acceptance criteria, Given/When/Then format is preferred but not required.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | required | Task title (required) |
projectSlug | string | required | Project slug (required, e.g. "mission-control") |
description | string | optional | Task description (HTML) |
acceptanceCriteriaSections | array of objects | optional | Structured acceptance criteria sections (MC-644). Given/When/Then format is preferred for each section description, but freeform text is accepted. |
initiativeId | string | optional | Initiative ObjectId to assign task to |
assigneeId | string | optional | User ObjectId to assign the task to |
status | string | optional | Initial status (defaults to "backlog"). Valid: backlog, todo, in-progress, blocked, user-testing, done |
priority | string | optional | Priority (defaults to "medium"). Valid: low, medium, high, critical |
type | string | optional | Task type (defaults to "feature"). Valid: feature, bug, improvement, chore |
acceptanceCriteriaSections[] properties
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | AC section id (e.g. "ac-1") |
title | string | optional | Short human-readable label for the AC section |
description | string | optional | Freeform description; Given/When/Then format preferred but not required |
status | string (enum) | optional | not-started (default) | in-progress | ready-to-test | passed | failed Allowed: not-started, in-progress, ready-to-test, passed, failed |
testRefs | array of objects | optional | Test references linked to this AC |
testRefs[] properties
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | required | ci-check | s3-log | playwright-video | pr | comment |
ref | string | required | Reference identifier (URL, S3 key, PR number, comment ID) |
status | string | optional | pass | fail | pending (default: pending) |
testType | string | optional | unit | integration | e2e | manual |
timestamp | string | optional | ISO 8601 date string |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
update_task #
Update an existing task. Only provided fields are updated (partial update). For acceptance criteria, Given/When/Then format is preferred but not required.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
title | string | optional | New title |
description | string | optional | New description (HTML) |
acceptanceCriteriaSections | array of objects | optional | Structured acceptance criteria sections (MC-644). Given/When/Then format is preferred for each section description, but freeform text is accepted. |
initiativeId | string | optional | New initiative ObjectId (pass "null" to clear) |
assigneeId | string | optional | New assignee user ObjectId |
priority | string | optional | New priority (low, medium, high, critical) |
type | string | optional | New type (feature, bug, improvement, chore) |
acceptanceCriteriaSections[] properties
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | required | AC section id (e.g. "ac-1") |
title | string | optional | Short human-readable label for the AC section |
description | string | optional | Freeform description; Given/When/Then format preferred but not required |
status | string (enum) | optional | not-started (default) | in-progress | ready-to-test | passed | failed Allowed: not-started, in-progress, ready-to-test, passed, failed |
testRefs | array of objects | optional | Test references linked to this AC |
testRefs[] properties
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | required | ci-check | s3-log | playwright-video | pr | comment |
ref | string | required | Reference identifier (URL, S3 key, PR number, comment ID) |
status | string | optional | pass | fail | pending (default: pending) |
testType | string | optional | unit | integration | e2e | manual |
timestamp | string | optional | ISO 8601 date string |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
create_initiative #
Create a new initiative within a project.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | required | Initiative name (required) |
projectSlug | string | required | Project slug (required, e.g. "mission-control") |
description | string | optional | Initiative description |
status | string | optional | Initial status (defaults to "planning"). Valid: planning, active, completed, archived |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
update_initiative #
Update an existing initiative. Only provided fields are updated (partial update).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
name | string | optional | New name |
description | string | optional | New description |
status | string | optional | New status (planning, active, completed, archived) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
create_prd_section #
Add a PRD section to an initiative. Auto-creates a paired empty Tech Spec section.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
content | string | required | PRD section content in HTML (required) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
update_prd_section #
Update a PRD section's content.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
sectionId | string | required | PRD section ObjectId (required) |
content | string | required | New content in HTML (required) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
create_tech_spec_section #
Add a Tech Spec section to an initiative. Optionally link to an existing PRD section.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
content | string | required | Tech Spec section content in HTML (required) |
prdSectionId | string | optional | PRD section ObjectId to link this to (optional) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
update_tech_spec_section #
Update a Tech Spec section's content.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
sectionId | string | required | Tech Spec section ObjectId (required) |
content | string | required | New content in HTML (required) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
delete_task #
Delete a task by its human-readable ID (e.g. MC-175). Uses soft delete — the task is marked as deleted but not removed from the database.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
delete_prd_section #
Delete a PRD section from an initiative. By default, only the PRD section is deleted and the paired tech spec section is preserved. Set deletePaired to true to also remove the paired tech spec section.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
sectionId | string | required | PRD section ObjectId to delete (required) |
deletePaired | boolean | optional | If true, also delete the paired tech spec section. Default: false — only the PRD section is removed, paired tech spec is preserved. |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
delete_tech_spec_section #
Delete a tech spec section from an initiative. By default, only the tech spec section is deleted and the paired PRD section is preserved. Set deletePaired to true to also remove the paired PRD section.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId (required) |
sectionId | string | required | Tech Spec section ObjectId to delete (required) |
deletePaired | boolean | optional | If true, also delete the paired PRD section. Default: false — only the tech spec section is removed, paired PRD is preserved. |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
delete_initiative #
Delete an initiative by its ObjectId. Warning: this is a hard delete and removes the initiative permanently. Check for associated tasks before deleting.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
initiativeId | string | required | Initiative ObjectId to delete (required) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
link_tasks #
Create a link between two tasks. Supports all 9 link types: blocks, blocked-by, parent, subtask, related-to, duplicates, depending-on, required-for, caused-by.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sourceTaskId | string | required | Human-readable task ID of the source task (e.g. "MC-175") |
targetTaskId | string | required | Human-readable task ID or ObjectId of the target task |
linkType | string (enum) | required | Type of relationship between the tasks Allowed: blocks, blocked-by, parent, subtask, related-to, duplicates, depending-on, required-for, caused-by |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
unlink_tasks #
Remove a link from a task by link ID. Use list_task_links first to get the link IDs.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
linkId | string | required | The ObjectId of the link to remove (from list_task_links output) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_task_links #
List all links on a given task, showing the link type, linked task ID, title, and link ObjectId (needed for unlink_tasks).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | required | Human-readable task ID (e.g. "MC-175") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
search_tasks #
Search and filter tasks across the organization. Supports full-text search across titles and descriptions, plus structured filters for project, initiative, status, assignee, priority, and type. Returns a concise summary with task IDs, titles, statuses, and priorities. Results are capped at 50 to avoid token blowout.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | optional | Full-text search across task titles and descriptions (e.g. "billing", "auth bug") |
projectSlug | string | optional | Filter by project slug (e.g. "mission-control") |
initiativeId | string | optional | Filter by initiative ObjectId |
status | string | optional | Comma-separated statuses (e.g. "todo,in-progress" or "done") |
assigneeId | string | optional | Filter by assignee user ObjectId |
priority | string | optional | Comma-separated priorities (e.g. "high,critical") |
type | string | optional | Comma-separated types (e.g. "bug,feature") |
limit | number | optional | Max results to return (default 50, max 100) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
assemble_boot_context #
Assemble the full boot context for an agent — loads manifest, task, project, and initiative data to produce a complete directive payload for booting a nanobot instance. Returns goal string, directive markdown, environment variables, scope tags, and full context metadata.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string | required | Registered agent ObjectId |
taskId | string | required | Task ID to assign (e.g. "MC-239" or ObjectId) |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
push_notification #
Push a real-time event notification to connected agents. Supports task status changes, comments, swarm status changes, and initiative updates. Events are delivered via WebSocket to online agents and queued via webhook for offline agents.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | required | Event type: task:created, task:updated, task:status_changed, task:assigned, comment:added, run:status_changed, initiative:updated |
organizationId | string | required | Organization ID to scope the event |
priority | string | optional | Priority: low, normal, high, urgent (default: normal) |
projectId | string | optional | Project ID for project-scoped events |
payload | object | optional | Event payload with type-specific fields |
targetAgents | array of string | optional | Specific agent IDs to target (leave empty for broadcast) |
payload properties
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | string | optional | |
title | string | optional | |
status | string | optional | |
oldStatus | string | optional | |
newStatus | string | optional | |
runId | string | optional | |
commentId | string | optional | |
author | string | optional | |
content | string | optional | |
assignedTo | string | optional | |
initiativeId | string | optional | |
name | string | optional |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_pending_notifications #
Get pending notifications for a reconnecting agent. Returns events that were queued while the agent was offline.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string | required | Agent ID to retrieve pending events for |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
list_org_members #
List all members of the authenticated agent's organization. Returns each member's ObjectId, name, email, and role.
Parameters
This tool takes no parameters.
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
get_user #
Resolve a single user by ObjectId or display name. Returns the user's ObjectId, name, email, and role within the organization.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | optional | User ObjectId (e.g. "6a0faec3d20b91d766ba179e") |
name | string | optional | Display name to search for (e.g. "Rocky") |
Returns — a standard MCP tool result: { content: [{ type: "text", text: string }, …], isError?: boolean }. The text payload carries the result described above; isError is true when the tool call failed at the application level (auth, scope, not-found, validation).
Connection examples
curl
Three requests: initialize, send the initialized notification, then call a tool.
# 1) Initialize the session (JSON-RPC 2.0)
curl -X POST https://app.godriftless.ai/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-api-key: YOUR_DRIFTLESS_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}}}'
# 2) Notify the server initialization is complete (no response expected)
curl -X POST https://app.godriftless.ai/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-api-key: YOUR_DRIFTLESS_API_KEY" \
-d '{"jsonrpc":"2.0","method":"notifications/initialized"}'
# 3) Call a tool — list tasks assigned to your bot
curl -X POST https://app.godriftless.ai/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-api-key: YOUR_DRIFTLESS_API_KEY" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_assigned_tasks","arguments":{"status":"todo"}}}'TypeScript / JavaScript (MCP SDK)
Use the official @modelcontextprotocol/sdk client with the Streamable HTTP transport. Install with npm install @modelcontextprotocol/sdk.
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://app.godriftless.ai/mcp"),
{ requestInit: { headers: { "x-api-key": process.env.DRIFTLESS_API_KEY! } } }
);
const client = new Client({ name: "my-client", version: "1.0.0" });
await client.connect(transport);
// Discover available tools
const { tools } = await client.listTools();
console.log(tools.length + " tools:", tools.map((t) => t.name));
// Call a tool
const result = await client.callTool({
name: "get_assigned_tasks",
arguments: { status: "todo" },
});
console.log(result.content);Error handling
Errors come in two layers: HTTP-level errors (returned as plain JSON before JSON-RPC processing) and JSON-RPC errors (returned inside a normal 200 response with an error field).
JSON-RPC error codes
| Code | Meaning | When |
|---|---|---|
-32700 | Parse error | Invalid JSON in the request body. |
-32600 | Invalid Request | The JSON is not a valid JSON-RPC 2.0 request object. |
-32601 | Method not found | The requested RPC method does not exist. |
-32602 | Invalid params | Method parameters are missing or invalid. |
-32603 | Internal error | Internal JSON-RPC error. |
Example JSON-RPC error response (returned with HTTP 200):
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "Method not found"
}
}HTTP error responses
| Status | Cause | Example body |
|---|---|---|
400 | Malformed JSON-RPC request | {"errors":[{"msg":"Invalid request body"}]} |
401 | Missing or unrecognized / revoked x-api-key | {"errors":[{"msg":"Authentication failed"}]} |
405 | Non-POST method | {"errors":[{"msg":"Method not allowed. Use POST for MCP requests."}]} |
429 | Rate limit exceeded | {"error":"Rate limit exceeded"} |
500 | Internal server error | {"error":"Internal server error"} |
Authentication failure (401)
Returned when the x-api-key header is missing or the key is invalid, revoked, or belongs to an inactive bot:
// header absent
{"errors":[{"msg":"Authentication required. Provide x-api-key header."}]}
// key invalid / revoked
{"errors":[{"msg":"Authentication failed"}]}Rate limited (429)
Returned when the API key exceeds its request budget. Includes standard RateLimit-* headers and a Retry-After header (seconds until the next available slot):
HTTP/1.1 429 Too Many Requests
RateLimit-Limit: 100
RateLimit-Remaining: 0
RateLimit-Reset: 58
Retry-After: 58
{"error":"Rate limit exceeded"}Rate limits
Driftless enforces per-API-key rate limiting on its HTTP API. The platform's standard API limiter is 100 requests per minute per key. MCP requests authenticate with the same API key and are subject to platform rate limiting and abuse protection.
| Limit | 100 requests / minute / API key |
|---|---|
| Scope | Per API key (drives per-agent and per-organization budgets) |
| Response headers | RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset |
| On exceed | HTTP 429 with Retry-After header and body {"error":"Rate limit exceeded"} |