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:
- A Seclai account with an active subscription that includes API access
- 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.
- 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
| Tool | Description |
|---|---|
list_agents | List all agents in your account with pagination |
get_agent | Get an agent's metadata (name, description, trigger type) |
get_agent_definition | Get the full agent definition including steps and change_id |
create_agent | Create a new agent with an optional template |
update_agent | Update an agent's name and/or description |
update_agent_definition | Update an agent's definition with optimistic locking |
delete_agent | Delete an agent (cannot be undone) |
Knowledge Base Tools
| Tool | Description |
|---|---|
list_knowledge_bases | List knowledge bases in your account with pagination |
get_knowledge_base | Get a knowledge base's details including its linked sources |
create_knowledge_base | Create a new knowledge base with at least one source |
update_knowledge_base | Update a knowledge base's name, description, or sources |
delete_knowledge_base | Delete a knowledge base (fails if referenced by agents) |
Content Source Tools
| Tool | Description |
|---|---|
list_sources | List all content sources in your account with pagination |
get_source | Get detailed information about a content source |
create_source | Create a new content source (RSS feed, website, file uploads, or custom index) |
update_source | Update a source's name, polling interval, or retention settings |
delete_source | Delete a content source (soft delete) |
Alert Tools
| Tool | Description |
|---|---|
list_alerts | List alerts for an agent or across your account, with filtering |
get_alert | Get full details of a specific alert instance |
change_alert_status | Resolve or re-open an alert |
add_alert_comment | Add a comment to an alert |
list_alert_configs | List alert configurations for an agent |
get_alert_config | Get details of a specific alert configuration |
create_alert_config | Create a new alert configuration for an agent |
update_alert_config | Update an existing alert configuration |
delete_alert_config | Delete an alert configuration |
Solution Tools
Solutions let you group related agents, knowledge bases, and content sources into projects.
| Tool | Description |
|---|---|
list_solutions | List all solutions in your account with pagination |
get_solution | Get solution details including linked agents, knowledge bases, and sources |
create_solution | Create a new solution to group related resources |
update_solution | Update a solution's name and/or description |
delete_solution | Delete a solution (does not delete linked resources — only the grouping) |
link_solution_resources | Link agents, knowledge bases, and/or source connections to a solution |
unlink_solution_resources | Unlink agents, knowledge bases, and/or source connections from a solution |
Agent AI Assistant Tools
| Tool | Description |
|---|---|
generate_step_config | Generate or refine a single step's configuration using AI |
generate_agent_steps | Generate a complete agent workflow from a natural language prompt |
get_ai_conversation_history | View past AI assistant conversation turns for a step |
mark_ai_suggestion | Accept 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.
| Tool | Description |
|---|---|
generate_source_plan | Generate a plan for creating, updating, or deleting content sources within a solution |
generate_kb_plan | Generate a plan for creating, updating, or deleting knowledge bases within a solution |
generate_solution_plan | Generate a comprehensive plan that can span sources, knowledge bases, and agents |
accept_solution_plan | Accept and execute a previously proposed plan (set confirm_deletions: true for deletions) |
decline_solution_plan | Decline 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:
| Resource | URI | Description |
|---|---|---|
| Agent Definition Schema | seclai://schema/agent-definition | Full schema reference for agent definitions |
| String Substitutions | seclai://schema/string-substitutions | All 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
- Open Cursor Settings (Cmd+, on macOS, Ctrl+, on Windows/Linux)
- Navigate to MCP in the sidebar
- Click Add new MCP server
- Set:
- Name:
seclai - Type:
streamable-http - URL:
https://api.seclai.com/mcp
- Name:
- 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:
- Call
get_agent_definition— the response includes achange_id - Call
update_agent_definitionwith theexpected_change_idset to thechange_idfrom step 1 - If the definition was modified between steps 1 and 2, you'll get a
conflicterror — 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:
| Template | Description |
|---|---|
blank | Empty agent with no steps |
retrieval_example | Demonstrates knowledge base retrieval |
simple_qa | Basic question-answering agent |
summarizer | Summarizes content from sources |
json_extractor | Extracts structured data from content |
content_change_notifier | Monitors sources for changes and notifies |
scheduled_report | Generates reports on a schedule |
webhook_pipeline | Processes 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.
| Plan | MCP Calls per Minute |
|---|---|
| Free | No MCP access |
| Starter | 30 |
| Team | 75 |
| Pro | 300 |
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-httptransport type (notsseorstdio) - Look at your client's MCP logs for connection errors
"Missing X-API-Key header" error
- Ensure the
X-API-Keyheader 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:
- API Keys — Create and manage API keys
- Agents — Learn about agent concepts
- Agent Steps — Reference for all step types
- API Introduction — REST API overview