Castle MCP by usefulapi is an MCP server published by io.usefulapi, hosted at castle.usefulapi.io. When last checked on 2026-11-21 it was working: it answers and lists its tools. It declares 14 tools, including castle_get_events_schema, castle_search_events, castle_group_events, castle_search_lists, castle_get_list.
Investigate security events and manage the allow/deny lists an analyst acts on.
4,216 connections through 5 shared values. Tap any node.
Inferred from the host name and headers: what a server runs on, not who runs it.
List the event fields you can filter and group on, with their types. Read this first — the other query tools need real field names. Castle: GET /v1/events/schema.
No parameters.
{
"name": "castle_get_events_schema",
"title": "Get the event schema",
"description": "List the event fields you can filter and group on, with their types. Read this first — the other query tools need real field names. Castle: GET /v1/events/schema.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
},
"annotations": {
"title": "Get the event schema",
"readOnlyHint": true
}
}None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Query the security event stream — logins, registrations, transactions and their risk verdicts. Read-only despite being a POST: Castle takes the query in the body. Castle: POST /v1/events/query.
| Parameter | Type | Description |
|---|---|---|
| page | integer | 1-based page number. |
| columns | array | Only return these event fields. |
| filters * | array | Castle query filters, ANDed together. Each is {field, op, value} — e.g. {"field":"user.email","op":"$eq","value":"a@example.com"}. Operators: $eq, $neq, $in, $nin, $like, $nlike, $contains, $ncontains, $starts_with, $nstarts_with, $ends_with, $nends_with, $matches, $nmatches, $ip_range, $nip_range, … |
| query_type | string | Return matching records, just a count, or both. Defaults to records. |
| results_size | integer | Results per page, 1-100. |
{
"name": "castle_search_events",
"title": "Search security events",
"description": "Query the security event stream — logins, registrations, transactions and their risk verdicts. Read-only despite being a POST: Castle takes the query in the body. Castle: POST /v1/events/query.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"filters"
],
"properties": {
"page": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "1-based page number."
},
"columns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Only return these event fields."
},
"filters": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"description": "Castle query filters, ANDed together. Each is {field, op, value} — e.g. {\"field\":\"user.email\",\"op\":\"$eq\",\"value\":\"a@example.com\"}. Operators: $eq, $neq, $in, $nin, $like, $nlike, $contains, $ncontains, $starts_with, $nstarts_with, $ends_with, $nends_with, $matches, $nmatches, $ip_range, $nip_range, $relative_range (value {gt,gteq,lt,lteq} in seconds ago), $range, $exists. Call castle_get_events_schema first to see the available field names."
},
"query_type": {
"enum": [
"$records",
"$count",
"$records_with_count"
],
"type": "string",
"description": "Return matching records, just a count, or both. Defaults to records."
},
"results_size": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Results per page, 1-100."
}
}
},
"annotations": {
"title": "Search security events",
"readOnlyHint": true
}
}Aggregate matching events by one or more fields — the fast way to see which IPs, devices or countries dominate a spike. Read-only despite being a POST. Castle: POST /v1/events/group.
| Parameter | Type | Description |
|---|---|---|
| page | integer | 1-based page number. |
| filters * | array | Castle query filters, ANDed together. Each is {field, op, value} — e.g. {"field":"user.email","op":"$eq","value":"a@example.com"}. Operators: $eq, $neq, $in, $nin, $like, $nlike, $contains, $ncontains, $starts_with, $nstarts_with, $ends_with, $nends_with, $matches, $nmatches, $ip_range, $nip_range, … |
| results_size | integer | Results per page, 1-100. |
| group_by_fields * | array | Fields to group by, e.g. ["ip", "user.email"]. Names come from the event schema. |
{
"name": "castle_group_events",
"title": "Group security events",
"description": "Aggregate matching events by one or more fields — the fast way to see which IPs, devices or countries dominate a spike. Read-only despite being a POST. Castle: POST /v1/events/group.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"filters",
"group_by_fields"
],
"properties": {
"page": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "1-based page number."
},
"filters": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"description": "Castle query filters, ANDed together. Each is {field, op, value} — e.g. {\"field\":\"user.email\",\"op\":\"$eq\",\"value\":\"a@example.com\"}. Operators: $eq, $neq, $in, $nin, $like, $nlike, $contains, $ncontains, $starts_with, $nstarts_with, $ends_with, $nends_with, $matches, $nmatches, $ip_range, $nip_range, $relative_range (value {gt,gteq,lt,lteq} in seconds ago), $range, $exists. Call castle_get_events_schema first to see the available field names."
},
"results_size": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Results per page, 1-100."
},
"group_by_fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Fields to group by, e.g. [\"ip\", \"user.email\"]. Names come from the event schema."
}
}
},
"annotations": {
"title": "Group security events",
"readOnlyHint": true
}
}Find the allow/deny lists defined in the environment. Read-only despite being a POST. Castle: POST /v1/lists/query.
| Parameter | Type | Description |
|---|---|---|
| page | integer | 1-based page number. |
| filters | array | Optional {field, op, value} filters over the lists themselves. |
| results_size | integer | Results per page, 1-100. |
{
"name": "castle_search_lists",
"title": "Search lists",
"description": "Find the allow/deny lists defined in the environment. Read-only despite being a POST. Castle: POST /v1/lists/query.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"page": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "1-based page number."
},
"filters": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"description": "Optional {field, op, value} filters over the lists themselves."
},
"results_size": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Results per page, 1-100."
}
}
},
"annotations": {
"title": "Search lists",
"readOnlyHint": true
}
}Fetch a single list with its primary and secondary field definitions. Castle: GET /v1/lists/{id}.
| Parameter | Type | Description |
|---|---|---|
| list_id * | string | The list's id. |
{
"name": "castle_get_list",
"title": "Get one list",
"description": "Fetch a single list with its primary and secondary field definitions. Castle: GET /v1/lists/{id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id"
],
"properties": {
"list_id": {
"type": "string",
"description": "The list's id."
}
}
},
"annotations": {
"title": "Get one list",
"readOnlyHint": true
}
}Search the entries of one list — the blocked IPs, emails or device ids it holds. Read-only despite being a POST. Castle: POST /v1/lists/{list_id}/items/query.
| Parameter | Type | Description |
|---|---|---|
| page | integer | 1-based page number. |
| filters | array | Optional {field, op, value} filters over the items. |
| list_id * | string | The list to search. |
| results_size | integer | Results per page, 1-100. |
{
"name": "castle_search_list_items",
"title": "Search items in a list",
"description": "Search the entries of one list — the blocked IPs, emails or device ids it holds. Read-only despite being a POST. Castle: POST /v1/lists/{list_id}/items/query.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id"
],
"properties": {
"page": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "1-based page number."
},
"filters": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"description": "Optional {field, op, value} filters over the items."
},
"list_id": {
"type": "string",
"description": "The list to search."
},
"results_size": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Results per page, 1-100."
}
}
},
"annotations": {
"title": "Search items in a list",
"readOnlyHint": true
}
}Count the entries in one list, with the same optional filters as the search. Read-only despite being a POST. Castle: POST /v1/lists/{list_id}/items/count.
| Parameter | Type | Description |
|---|---|---|
| filters | array | Optional {field, op, value} filters over the items. |
| list_id * | string | The list to count. |
{
"name": "castle_count_list_items",
"title": "Count items in a list",
"description": "Count the entries in one list, with the same optional filters as the search. Read-only despite being a POST. Castle: POST /v1/lists/{list_id}/items/count.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id"
],
"properties": {
"filters": {
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"description": "Optional {field, op, value} filters over the items."
},
"list_id": {
"type": "string",
"description": "The list to count."
}
}
},
"annotations": {
"title": "Count items in a list",
"readOnlyHint": true
}
}Fetch a single list entry — its value, who added it, the comment and its archive time. Castle: GET /v1/lists/{list_id}/items/{id}.
| Parameter | Type | Description |
|---|---|---|
| item_id * | string | The item's id. |
| list_id * | string | The list holding the item. |
{
"name": "castle_get_list_item",
"title": "Get one list item",
"description": "Fetch a single list entry — its value, who added it, the comment and its archive time. Castle: GET /v1/lists/{list_id}/items/{id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id",
"item_id"
],
"properties": {
"item_id": {
"type": "string",
"description": "The item's id."
},
"list_id": {
"type": "string",
"description": "The list holding the item."
}
}
},
"annotations": {
"title": "Get one list item",
"readOnlyHint": true
}
}Create a new allow or deny list. primary_field is the event field its entries match on, e.g. ip or user.email. Castle: POST /v1/lists.
| Parameter | Type | Description |
|---|---|---|
| name * | string | The list name. |
| color * | string | Dashboard colour label, e.g. $red, $green, $blue — Castle requires one. |
| description | string | What this list is for. |
| primary_field * | string | The event field entries match on, e.g. ip or user.email. |
| secondary_field | string | An optional second field entries also carry. |
{
"name": "castle_create_list",
"title": "Create a list",
"description": "Create a new allow or deny list. primary_field is the event field its entries match on, e.g. ip or user.email. Castle: POST /v1/lists.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name",
"color",
"primary_field"
],
"properties": {
"name": {
"type": "string",
"description": "The list name."
},
"color": {
"type": "string",
"description": "Dashboard colour label, e.g. $red, $green, $blue — Castle requires one."
},
"description": {
"type": "string",
"description": "What this list is for."
},
"primary_field": {
"type": "string",
"description": "The event field entries match on, e.g. ip or user.email."
},
"secondary_field": {
"type": "string",
"description": "An optional second field entries also carry."
}
}
},
"annotations": {
"title": "Create a list",
"destructiveHint": true
}
}Rename a list or change its colour or description. Castle: PUT /v1/lists/{id}.
| Parameter | Type | Description |
|---|---|---|
| name | string | New name. |
| color | string | New colour label. |
| list_id * | string | The list to update. |
| description | string | New description. |
{
"name": "castle_update_list",
"title": "Update a list",
"description": "Rename a list or change its colour or description. Castle: PUT /v1/lists/{id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id"
],
"properties": {
"name": {
"type": "string",
"description": "New name."
},
"color": {
"type": "string",
"description": "New colour label."
},
"list_id": {
"type": "string",
"description": "The list to update."
},
"description": {
"type": "string",
"description": "New description."
}
}
},
"annotations": {
"title": "Update a list",
"destructiveHint": true
}
}Add an entry to a list — for example block an IP or an email. This changes live policy behaviour. Castle: POST /v1/lists/{list_id}/items.
| Parameter | Type | Description |
|---|---|---|
| comment | string | Why this entry was added. |
| list_id * | string | The list to add to. |
| author_type * | string | What kind of actor is adding this entry. |
| primary_value * | string | The value to add, matching the list's primary_field. |
| secondary_value | string | Value for the list's secondary_field. |
| auto_archives_at | string | ISO-8601 time to archive the entry automatically. |
| author_identifier * | string | Who is adding it, e.g. the analyst's email address. |
{
"name": "castle_create_list_item",
"title": "Add an item to a list",
"description": "Add an entry to a list — for example block an IP or an email. This changes live policy behaviour. Castle: POST /v1/lists/{list_id}/items.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id",
"primary_value",
"author_type",
"author_identifier"
],
"properties": {
"comment": {
"type": "string",
"description": "Why this entry was added."
},
"list_id": {
"type": "string",
"description": "The list to add to."
},
"author_type": {
"enum": [
"$analyst_email",
"$castle_dashboard_user",
"$castle_policy",
"$user",
"$user_email",
"$other"
],
"type": "string",
"description": "What kind of actor is adding this entry."
},
"primary_value": {
"type": "string",
"description": "The value to add, matching the list's primary_field."
},
"secondary_value": {
"type": "string",
"description": "Value for the list's secondary_field."
},
"auto_archives_at": {
"type": "string",
"description": "ISO-8601 time to archive the entry automatically."
},
"author_identifier": {
"type": "string",
"description": "Who is adding it, e.g. the analyst's email address."
}
}
},
"annotations": {
"title": "Add an item to a list",
"destructiveHint": true
}
}Change the comment on a list entry. Castle: PUT /v1/lists/{list_id}/items/{id}.
| Parameter | Type | Description |
|---|---|---|
| comment * | string | The new comment. |
| item_id * | string | The item to update. |
| list_id * | string | The list holding the item. |
{
"name": "castle_update_list_item",
"title": "Update a list item's comment",
"description": "Change the comment on a list entry. Castle: PUT /v1/lists/{list_id}/items/{id}.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id",
"item_id",
"comment"
],
"properties": {
"comment": {
"type": "string",
"description": "The new comment."
},
"item_id": {
"type": "string",
"description": "The item to update."
},
"list_id": {
"type": "string",
"description": "The list holding the item."
}
}
},
"annotations": {
"title": "Update a list item's comment",
"destructiveHint": true
}
}Archive a list entry so it stops matching. Reversible with castle_unarchive_list_item. Castle: DELETE /v1/lists/{list_id}/items/{id}/archive.
| Parameter | Type | Description |
|---|---|---|
| item_id * | string | The item to archive. |
| list_id * | string | The list holding the item. |
{
"name": "castle_archive_list_item",
"title": "Archive a list item",
"description": "Archive a list entry so it stops matching. Reversible with castle_unarchive_list_item. Castle: DELETE /v1/lists/{list_id}/items/{id}/archive.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id",
"item_id"
],
"properties": {
"item_id": {
"type": "string",
"description": "The item to archive."
},
"list_id": {
"type": "string",
"description": "The list holding the item."
}
}
},
"annotations": {
"title": "Archive a list item",
"destructiveHint": true
}
}Restore a previously archived list entry so it matches again. Castle: PUT /v1/lists/{list_id}/items/{id}/unarchive.
| Parameter | Type | Description |
|---|---|---|
| item_id * | string | The item to restore. |
| list_id * | string | The list holding the item. |
{
"name": "castle_unarchive_list_item",
"title": "Unarchive a list item",
"description": "Restore a previously archived list entry so it matches again. Castle: PUT /v1/lists/{list_id}/items/{id}/unarchive.",
"inputSchema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"list_id",
"item_id"
],
"properties": {
"item_id": {
"type": "string",
"description": "The item to restore."
},
"list_id": {
"type": "string",
"description": "The list holding the item."
}
}
},
"annotations": {
"title": "Unarchive a list item",
"destructiveHint": true
}
}Tools for Castle, hosted by usefulapi.io. If the user is new or asks what this server can do, suggest requests such as: "Which IP addresses had the most failed logins in the last 24 hours?"; "Show recent sign-ups from the same device in the past week."; "List the entries on our blocked IP list.". Read-only tools never change data; ask the user before a tool that creates, changes or deletes Castle data. Free plan: 50 tool calls per month. Run castle_usage_status to see the calls used this month. If the user asks for something none of these tools can do, tell the user and, with their OK, run castle_request_feature to record the request. Paid plans: Pro (10,000 tool calls a month, $9/month or $90/year, for normal use) and Pro+ (100,000 tool calls a month, $39/month or $390/year, for automations and heavy use). A plan can be cancelled at any time and then runs to the end of the paid period, so it also suits a one-time job. When the user wants more calls or reaches the limit, run castle_upgrade without a plan: it returns both plans, each with a payment link for the user to open. castle_cancel_subscription cancels Pro at the end of the paid period.
Names, descriptions and schemas were written by the server and are shown as data.
Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators.