MCP Server

MCP Server

Seclai exposes a Model Context Protocol (MCP) server that lets AI-powered coding tools manage your agents and their definitions directly from your editor or terminal.

Overview

The MCP server provides tools for the full agent lifecycle:

  • List, create, update, and delete agents
  • Read and update agent definitions (steps, tags, configuration)
  • Manage knowledge bases — create, update, and delete KB configurations
  • Create, list, and configure content sources — create, view, update, and delete sources
  • Monitor alerts — list, view, resolve, and comment on alerts; manage alert configurations
  • Manage solutions — create, update, delete solutions and link/unlink agents, KBs, and sources
  • Agent AI assistant — generate step configs and full agent workflows
  • Solution AI assistants — generate and execute plans for managing sources, knowledge bases, and full solution configurations
  • Browse reference resources like the agent definition schema and string substitutions

This means you can ask your AI assistant things like "create a new agent that summarizes RSS feeds daily", "create a knowledge base from my podcast sources", "change the polling interval on my news feed to hourly", "show me any open alerts", "use the AI assistant to generate a transform step that extracts article titles", "create a solution to organize my podcast workflow", or "use the AI assistant to set up sources and a knowledge base for my new project" and it will use the MCP tools to make those changes in Seclai directly.

Prerequisites

Before setting up the MCP server, you need:

  1. A Seclai account with an active subscription that includes API access
  2. A user-scoped API key — create one from the API Keys page in your account settings. API keys created after this feature was added are automatically user-scoped. If you have an older key, re-create it to get a user-scoped version.
  3. An MCP-compatible client such as Claude Desktop, Claude Code, Cursor, or Windsurf

Your plan must have API access enabled. Free plans do not include API or MCP access. Upgrade your plan in account settings if needed.

MCP requires user-scoped API keys. If you get an error about user association, re-create your API key.


Available Tools

The MCP server provides these tools:

Agent Tools

ToolDescription
list_agentsList all agents in your account with pagination
get_agentGet an agent's metadata (name, description, trigger type)
get_agent_definitionGet the full agent definition including steps and change_id
create_agentCreate a new agent with an optional template
update_agentUpdate an agent's name and/or description
update_agent_definitionUpdate an agent's definition with optimistic locking
delete_agentDelete an agent (cannot be undone)

Knowledge Base Tools

ToolDescription
list_knowledge_basesList knowledge bases in your account with pagination
get_knowledge_baseGet a knowledge base's details including its linked sources
create_knowledge_baseCreate a new knowledge base with at least one source
update_knowledge_baseUpdate a knowledge base's name, description, or sources
delete_knowledge_baseDelete a knowledge base (fails if referenced by agents)

Content Source Tools

ToolDescription
list_sourcesList all content sources in your account with pagination
get_sourceGet detailed information about a content source
create_sourceCreate a new content source (RSS feed, website, file uploads, or custom index)
update_sourceUpdate a source's name, polling interval, or retention settings
delete_sourceDelete a content source (soft delete)

Alert Tools

ToolDescription
list_alertsList alerts for an agent or across your account, with filtering
get_alertGet full details of a specific alert instance
change_alert_statusResolve or re-open an alert
add_alert_commentAdd a comment to an alert
list_alert_configsList alert configurations for an agent
get_alert_configGet details of a specific alert configuration
create_alert_configCreate a new alert configuration for an agent
update_alert_configUpdate an existing alert configuration
delete_alert_configDelete an alert configuration

Solution Tools

Solutions let you group related agents, knowledge bases, and content sources into projects.

ToolDescription
list_solutionsList all solutions in your account with pagination
get_solutionGet solution details including linked agents, knowledge bases, and sources
create_solutionCreate a new solution to group related resources
update_solutionUpdate a solution's name and/or description
delete_solutionDelete a solution (does not delete linked resources — only the grouping)
link_solution_resourcesLink agents, knowledge bases, and/or source connections to a solution
unlink_solution_resourcesUnlink agents, knowledge bases, and/or source connections from a solution

Agent AI Assistant Tools

ToolDescription
generate_step_configGenerate or refine a single step's configuration using AI
generate_agent_stepsGenerate a complete agent workflow from a natural language prompt
get_ai_conversation_historyView past AI assistant conversation turns for a step
mark_ai_suggestionAccept or decline a proposed AI configuration

Solution AI Assistant Tools

The solution AI assistants use a propose-then-accept workflow: you describe what you want in natural language, the assistant generates a plan with proposed actions, and you review and accept or decline the plan before any changes are made. Destructive actions (deletions) require explicit confirmation.

ToolDescription
generate_source_planGenerate a plan for creating, updating, or deleting content sources within a solution
generate_kb_planGenerate a plan for creating, updating, or deleting knowledge bases within a solution
generate_solution_planGenerate a comprehensive plan that can span sources, knowledge bases, and agents
accept_solution_planAccept and execute a previously proposed plan (set confirm_deletions: true for deletions)
decline_solution_planDecline a proposed plan — it will be marked as declined and cannot be executed

Available Resources

The server also exposes reference resources that your AI assistant can read for context:

ResourceURIDescription
Agent Definition Schemaseclai://schema/agent-definitionFull schema reference for agent definitions
String Substitutionsseclai://schema/string-substitutionsAll supported string substitution expressions

Setup

The MCP server endpoint is:

https://api.seclai.com/mcp

It uses the Streamable HTTP transport and authenticates with your API key via the X-API-Key header, exactly like the REST API.

Claude Desktop

Add the following to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "seclai": {
      "type": "streamable-http",
      "url": "https://api.seclai.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Restart Claude Desktop after saving. The Seclai tools will appear in the tools menu.

Claude Code (CLI)

Add the server with the Claude Code CLI:

claude mcp add seclai \
  --transport streamable-http \
  "https://api.seclai.com/mcp" \
  --header "X-API-Key: YOUR_API_KEY"

Or add it to your project's .mcp.json file:

{
  "mcpServers": {
    "seclai": {
      "type": "streamable-http",
      "url": "https://api.seclai.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Cursor

  1. Open Cursor Settings (Cmd+, on macOS, Ctrl+, on Windows/Linux)
  2. Navigate to MCP in the sidebar
  3. Click Add new MCP server
  4. Set:
    • Name: seclai
    • Type: streamable-http
    • URL: https://api.seclai.com/mcp
  5. Save

Then add your API key header. In your project's .cursor/mcp.json:

{
  "mcpServers": {
    "seclai": {
      "type": "streamable-http",
      "url": "https://api.seclai.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Windsurf

Add to your ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "seclai": {
      "type": "streamable-http",
      "url": "https://api.seclai.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Other MCP Clients

Any client that supports the Streamable HTTP MCP transport can connect. Configure it with:

  • URL: https://api.seclai.com/mcp
  • Transport: Streamable HTTP
  • Header: X-API-Key: YOUR_API_KEY

Usage Examples

Once connected, you can interact with Seclai through natural language. Here are some examples:

List your agents:

"Show me all my Seclai agents"

Create a new agent:

"Create a new Seclai agent called 'Daily News Digest' with a schedule trigger and the summarizer template"

Read an agent's definition:

"Get the full definition for my Daily News Digest agent"

Modify an agent's steps:

"Add a retrieval step before the display step in my Daily News Digest agent that searches the news knowledge base"

Delete an agent:

"Delete the test agent I created earlier"

List your knowledge bases:

"Show me all my knowledge bases"

Create a knowledge base:

"Create a knowledge base called 'Podcast Archive' using my podcast sources"

Create and manage sources:

"Create an RSS feed source for https://example.com/feed.xml"

"Show me all my content sources and change the news feed to poll hourly"

Manage solutions:

"Create a solution called 'Podcast Pipeline' for my podcast-related agents and sources"

"Link my summarizer agent and podcast knowledge base to the Podcast Pipeline solution"

Use the solution AI assistants:

"Use the AI assistant to set up RSS feed sources for my three favorite news sites within the News Digest solution"

"Generate a knowledge base plan for my podcast solution that creates a KB from all my podcast sources"

"Generate a comprehensive plan for my solution that adds a new source, creates a KB, and configures an agent"

"Accept the proposed plan" or "Accept the plan and confirm the deletions"

"Decline the proposed plan, I want to try a different approach"

View and manage alerts:

"Show me any open alerts for my Daily News Digest agent"

"Resolve alert abc123 with a comment that the upstream API is fixed now"

Configure alert rules:

"Set up an alert that fires after 3 consecutive failures on my Daily News Digest agent"

"Show me all alert configurations for my agent"

Use the agent AI assistant to generate configs:

"Use the AI assistant to generate a transform step configuration that extracts article titles and URLs"

"Generate a full agent workflow that monitors RSS feeds and sends a daily email summary"

Review agent AI suggestions:

"Show me the AI conversation history for the transform step of my agent"

"Accept the last AI suggestion for my transform step"

Your AI assistant will use the MCP tools to perform these actions. It can also read the agent definition schema and string substitutions resources for reference when building definitions.

Optimistic Locking

When updating agent definitions, the MCP server uses optimistic locking to prevent overwriting concurrent changes:

  1. Call get_agent_definition — the response includes a change_id
  2. Call update_agent_definition with the expected_change_id set to the change_id from step 1
  3. If the definition was modified between steps 1 and 2, you'll get a conflict error — re-read and retry

Your AI assistant handles this automatically. If you see a conflict error, simply repeat your request and it will re-read the latest definition before applying changes.

Agent Templates

When creating agents, you can specify a template to start with a pre-configured definition:

TemplateDescription
blankEmpty agent with no steps
retrieval_exampleDemonstrates knowledge base retrieval
simple_qaBasic question-answering agent
summarizerSummarizes content from sources
json_extractorExtracts structured data from content
content_change_notifierMonitors sources for changes and notifies
scheduled_reportGenerates reports on a schedule
webhook_pipelineProcesses incoming webhook data

Rate Limits

MCP calls are rate-limited per account based on your subscription plan. Each tool call counts as one MCP call. The limit is enforced as a sliding window per minute.

PlanMCP Calls per Minute
FreeNo MCP access
Starter30
Team75
Pro300

When you exceed the limit, tool calls will return an error with a retry_after value indicating how many seconds to wait before retrying. Most AI assistants will handle this automatically.

If you need higher limits, contact us about an Enterprise plan or request a per-account override.


Troubleshooting

"Invalid API key" error

  • Verify your API key is correct and hasn't been archived or deleted
  • Ensure your account is in good standing (not suspended or delinquent)
  • Confirm your plan includes API access
  • MCP requires user-scoped API keys — if you get a "user-scoped" error, re-create your key

"MCP requires a user-scoped API key" error

  • Your API key was created before user-scoping was introduced
  • Create a new API key from your account settings — new keys are automatically user-scoped
  • Delete or archive your old key to avoid confusion

"Rate limit exceeded" error

  • Wait the number of seconds indicated in the error before retrying
  • Consider upgrading your plan if you consistently hit the limit
  • Check that you aren't running multiple MCP clients with the same key simultaneously

Tools not appearing in your client

  • Restart your MCP client after configuration changes
  • Verify the URL is exactly https://api.seclai.com/mcp
  • Check that you're using the streamable-http transport type (not sse or stdio)
  • Look at your client's MCP logs for connection errors

"Missing X-API-Key header" error

  • Ensure the X-API-Key header is configured in your MCP client settings
  • Some clients require restarting after adding headers

Conflict errors when updating definitions

  • This means the definition was changed since you last read it
  • Simply retry your request — your AI assistant will re-read the latest definition and try again

Next steps: