Integration

MCP Server

Human-in-the-loop reviews for autonomous AI agents via Model Context Protocol.

The Datashift MCP server enables agent-initiated review: the agent itself decides when to request human input. When your agent encounters uncertainty, needs approval, or wants human feedback, it can submit a task and receive the result via MCP notifications.

Agent-Initiated vs Developer-Enforced

With MCP, the agent decides when to ask for review based on its own reasoning. This differs from the REST API/SDK where developers define which actions require review in code.

Example Use Cases

  • • Agent encounters uncertainty and wants human confirmation
  • • Agent is about to take a high-risk action and seeks approval
  • • Agent flags output it's not confident about for human review
  • • Agent escalates complex issues beyond its capability
  • • Agent wants human verification of important findings

How It Works

1

Agent submits task

Agent calls submit_task with data to be reviewed

2

Human reviews

Reviewer receives notification (Slack, Discord, Teams, or email) and completes the review

3

Agent gets notified

MCP server sends notifications/resources/updated with the task URI

4

Agent reads result

Agent reads the task resource to get the review decision and continues accordingly

Configuration

Add the Datashift MCP server to your agent's MCP configuration. The server URL and credentials are available in the Console under Settings → Credentials → MCP.

json
{
  "mcpServers": {
    "datashift": {
      "url": "https://mcp.datashift.io/mcp",
      "headers": {
        "Authorization": "Bearer <your-access-token>"
      }
    }
  }
}

The MCP server uses Streamable HTTP transport with real-time notifications.

Available Tools

submit_task

Submit a task for human review. Automatically subscribes to completion notifications.

ParameterTypeDescription
queue_keystringQueue identifier (required)
dataobjectContent to be reviewed (required)
contextobjectBackground info for reviewers
metadataobjectFilterable attributes
summarystringShort description (max 255 chars)

Returns task ID and resource URI (task:///<id>) for tracking.

list_queues

List all queues available to your organization. Returns queue configurations including review types and assignment strategies.

get_queue_config

Get detailed configuration for a specific queue.

ParameterTypeDescription
queue_keystringQueue identifier (required)

Resources

task:///<task_id>

Read the current status and result of a task. When a review is completed, the MCP server sends a notifications/resources/updated notification with this URI.

json
{
  "id": "task_abc123",
  "state": "reviewed",
  "reviewed_at": "2024-01-15T10:30:00Z",
  "queue_key": "content-approvals",
  "reviews": [{
    "result": ["approved"],
    "data": {},
    "reviewer_id": "reviewer_xyz",
    "reviewed_at": "2024-01-15T10:30:00Z"
  }]
}

Example Flow

Here's how an autonomous coding agent might use Datashift to get deployment approval:

text
Agent: I've completed the code changes. Let me submit for deployment approval.

[Agent calls submit_task]
{
  "queue_key": "deployment-approvals",
  "data": {
    "repository": "acme/web-app",
    "branch": "feature/new-checkout",
    "changes": ["src/checkout.ts", "src/payment.ts"],
    "tests_passed": true
  },
  "summary": "Deploy new checkout flow to production"
}

[Task submitted, agent continues other work...]

[Review completed, MCP notification received]
notifications/resources/updated: task:///task_abc123

[Agent reads task resource]
{
  "state": "reviewed",
  "reviews": [{ "result": ["approved"] }]
}

Agent: Deployment approved! Proceeding with production deploy.