v0.5.2 release - Contributors, Sponsors and Enquiries are most welcome 😌

MCP Tools

Pre-built Model Context Protocol tools for Figma and n8n integrations

Overview

AgentSea includes built-in MCP tools for popular services, allowing your agents to interact with Figma designs and n8n workflows out of the box. These tools are production-ready with built-in retry logic, error handling, and comprehensive validation.

🎨

Figma Tools

Interact with Figma files, nodes, images, and comments programmatically

Available Tools:

  • • Get file information & structure
  • • Retrieve specific nodes by ID
  • • Export images (PNG, SVG, PDF)
  • • Read and post comments
  • • Version control access
âš¡

n8n Tools

Execute and manage n8n workflows for powerful automation

Available Tools:

  • • Execute workflows with data
  • • Monitor execution status
  • • List available workflows
  • • Trigger webhooks
  • • Get workflow details

Figma Tools

The Figma tools allow agents to interact with Figma's design files, components, and collaboration features.

Setup

First, obtain a Figma access token:

  1. Go to your Figma account settings
  2. Navigate to "Personal Access Tokens"
  3. Generate a new token
  4. Set it as an environment variable:
bash
export FIGMA_ACCESS_TOKEN="your_figma_token_here"

Available Figma Tools

Tool NameDescriptionKey Parameters
figma_get_fileGet file info and structurefileKey, version?, depth?
figma_get_nodesGet specific nodes by IDfileKey, nodeIds[]
figma_get_imagesExport imagesfileKey, nodeIds[], format?, scale?
figma_get_commentsGet all commentsfileKey
figma_post_commentPost a new commentfileKey, message, clientMeta?

Figma Usage Example

typescript
import {
  Agent,
  figmaGetFileTool,
  figmaGetImagesTool,
  figmaPostCommentTool,
} from '@lov3kaizen/agentsea-core';

const agent = new Agent({
  name: 'figma-agent',
  description: 'Agent with Figma integration',
  model: 'claude-sonnet-4-20250514',
  provider: 'anthropic',
  tools: [
    figmaGetFileTool,
    figmaGetImagesTool,
    figmaPostCommentTool,
  ],
});

// Agent can now interact with Figma
const response = await agent.execute(
  'Get the Figma file "abc123" and export all frames as PNG images at 2x scale',
  context,
);

Figma Workflow Examples

Design Review Automation

Get latest designs, export screenshots, and post feedback comments automatically

Asset Pipeline

Export design assets, optimize images, and update documentation

Version Tracking

Monitor design changes, track versions, and notify team members

n8n Tools

The n8n tools allow agents to execute and manage automation workflows, making it easy to integrate complex business processes.

Setup

Configure your n8n connection:

bash
export N8N_API_KEY="your_n8n_api_key"
export N8N_BASE_URL="https://your-n8n-instance.com"

Available n8n Tools

Tool NameDescriptionKey Parameters
n8n_execute_workflowRun a workflowworkflowId, data?, waitForCompletion?
n8n_get_executionCheck execution statusexecutionId
n8n_list_workflowsList available workflowsactive?, tags?[], limit?
n8n_trigger_webhookTrigger a webhookwebhookPath, method?, data?
n8n_get_workflowGet workflow detailsworkflowId

n8n Usage Example

typescript
import {
  Agent,
  n8nExecuteWorkflowTool,
  n8nListWorkflowsTool,
  n8nTriggerWebhookTool,
} from '@lov3kaizen/agentsea-core';

const agent = new Agent({
  name: 'automation-agent',
  description: 'Agent with n8n workflow automation',
  model: 'claude-sonnet-4-20250514',
  provider: 'anthropic',
  tools: [
    n8nExecuteWorkflowTool,
    n8nListWorkflowsTool,
    n8nTriggerWebhookTool,
  ],
});

// Agent can now execute workflows
const response = await agent.execute(
  'Execute the "Data Processing" workflow with this data: {"name": "John", "email": "john@example.com"}',
  context,
);

n8n Workflow Examples

Data Processing Pipeline

Trigger workflows to process, transform, and store data automatically

Customer Onboarding

Execute multi-step onboarding workflows with dynamic data

Notification System

Trigger webhooks to send notifications across multiple channels

Combined Workflow Example

Use both Figma and n8n tools together to create powerful automation pipelines:

typescript
import {
  Agent,
  figmaGetFileTool,
  figmaGetImagesTool,
  figmaPostCommentTool,
  n8nTriggerWebhookTool,
} from '@lov3kaizen/agentsea-core';

const agent = new Agent({
  name: 'design-automation',
  description: 'Automated design-to-production pipeline',
  model: 'claude-sonnet-4-20250514',
  provider: 'anthropic',
  tools: [
    figmaGetFileTool,
    figmaGetImagesTool,
    figmaPostCommentTool,
    n8nTriggerWebhookTool,
  ],
});

// Multi-step automation
const response = await agent.execute(
  `
  1. Get the latest version of Figma file "design123"
  2. Export the main frame as a high-res PNG
  3. Trigger the n8n webhook at "webhook/process-design" with the image URL
  4. Post a comment on the Figma file: "Design exported and sent for processing"
  `,
  context,
);

Error Handling & Retries

All MCP tools include built-in error handling and retry logic:

  • Max Attempts: 3 automatic retries
  • Backoff Strategy: Exponential backoff
  • Initial Delay: 1000ms
  • Max Delay: 10000ms
typescript
// Tools automatically retry on failure
try {
  const result = await agent.execute(
    'Get Figma file and trigger n8n workflow',
    context
  );
} catch (error) {
  // Error after all retries exhausted
  console.error('Automation failed:', error.message);
}

Best Practices

  • Environment Variables: Always use environment variables for API keys in production
  • Rate Limiting: Be mindful of API rate limits for both Figma and n8n
  • Webhook Security: Secure your n8n webhooks with authentication
  • Data Validation: Validate workflow input data before execution
  • Error Monitoring: Log and monitor errors for debugging
  • Caching: Cache Figma file data when possible to reduce API calls
  • Testing: Test n8n workflows independently before integrating with agents

Common Use Cases

🎨 Design Review Automation

Automatically export designs, process them, and post feedback

📦 Asset Export Pipeline

Export design assets and trigger processing workflows

🔔 Design Change Notifications

Monitor Figma changes and notify stakeholders via n8n

🚀 Automated Deployment

Trigger deployment workflows based on design approvals

📊 Analytics & Reporting

Collect design metrics and generate reports automatically

🔄 Version Synchronization

Keep designs and documentation in sync across tools

API Documentation

For detailed API references, see:

Next Steps