Castle MCP by usefulapi
Investigate security events and manage the allow/deny lists an analyst acts on.
사용해야 할까요
품질 및 안전성
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"castle": {
"url": "https://castle.usefulapi.io/mcp"
}
}
}원격 엔드포인트
https://castle.usefulapi.io/mcpstreamable-http할 수 있는 일
도구 목록
도구 (14)
🟢castle_get_events_schema
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.
입력 스키마
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_search_events(filters, query_type, columns, page, results_size)
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.
입력 스키마
{
"type": "object",
"properties": {
"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\":\"[email protected]\"}. 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": {
"description": "Return matching records, just a count, or both. Defaults to records.",
"type": "string",
"enum": [
"$records",
"$count",
"$records_with_count"
]
},
"columns": {
"description": "Only return these event fields.",
"type": "array",
"items": {
"type": "string"
}
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"results_size": {
"description": "Results per page, 1-100.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"filters"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_group_events(filters, group_by_fields, page, results_size)
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.
입력 스키마
{
"type": "object",
"properties": {
"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\":\"[email protected]\"}. 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."
},
"group_by_fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Fields to group by, e.g. [\"ip\", \"user.email\"]. Names come from the event schema."
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"results_size": {
"description": "Results per page, 1-100.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"filters",
"group_by_fields"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_search_lists(filters, page, results_size)
Find the allow/deny lists defined in the environment. Read-only despite being a POST. Castle: POST /v1/lists/query.
입력 스키마
{
"type": "object",
"properties": {
"filters": {
"description": "Optional {field, op, value} filters over the lists themselves.",
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"results_size": {
"description": "Results per page, 1-100.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_get_list(list_id)
Fetch a single list with its primary and secondary field definitions. Castle: GET /v1/lists/{id}.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list's id."
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_search_list_items(list_id, filters, page, results_size)
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.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list to search."
},
"filters": {
"description": "Optional {field, op, value} filters over the items.",
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"page": {
"description": "1-based page number.",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"results_size": {
"description": "Results per page, 1-100.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_count_list_items(list_id, filters)
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.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list to count."
},
"filters": {
"description": "Optional {field, op, value} filters over the items.",
"type": "array",
"items": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢castle_get_list_item(list_id, item_id)
Fetch a single list entry — its value, who added it, the comment and its archive time. Castle: GET /v1/lists/{list_id}/items/{id}.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list holding the item."
},
"item_id": {
"type": "string",
"description": "The item's id."
}
},
"required": [
"list_id",
"item_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴castle_create_list(name, color, primary_field, description, secondary_field)
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.
입력 스키마
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The list name."
},
"color": {
"type": "string",
"description": "Dashboard colour label, e.g. $red, $green, $blue — Castle requires one."
},
"primary_field": {
"type": "string",
"description": "The event field entries match on, e.g. ip or user.email."
},
"description": {
"description": "What this list is for.",
"type": "string"
},
"secondary_field": {
"description": "An optional second field entries also carry.",
"type": "string"
}
},
"required": [
"name",
"color",
"primary_field"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴castle_update_list(list_id, name, color, description)
Rename a list or change its colour or description. Castle: PUT /v1/lists/{id}.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list to update."
},
"name": {
"description": "New name.",
"type": "string"
},
"color": {
"description": "New colour label.",
"type": "string"
},
"description": {
"description": "New description.",
"type": "string"
}
},
"required": [
"list_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴castle_create_list_item(list_id, primary_value, author_type, author_identifier, secondary_value, ...)
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.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list to add to."
},
"primary_value": {
"type": "string",
"description": "The value to add, matching the list's primary_field."
},
"author_type": {
"type": "string",
"enum": [
"$analyst_email",
"$castle_dashboard_user",
"$castle_policy",
"$user",
"$user_email",
"$other"
],
"description": "What kind of actor is adding this entry."
},
"author_identifier": {
"type": "string",
"description": "Who is adding it, e.g. the analyst's email address."
},
"secondary_value": {
"description": "Value for the list's secondary_field.",
"type": "string"
},
"comment": {
"description": "Why this entry was added.",
"type": "string"
},
"auto_archives_at": {
"description": "ISO-8601 time to archive the entry automatically.",
"type": "string"
}
},
"required": [
"list_id",
"primary_value",
"author_type",
"author_identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴castle_update_list_item(list_id, item_id, comment)
Change the comment on a list entry. Castle: PUT /v1/lists/{list_id}/items/{id}.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list holding the item."
},
"item_id": {
"type": "string",
"description": "The item to update."
},
"comment": {
"type": "string",
"description": "The new comment."
}
},
"required": [
"list_id",
"item_id",
"comment"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴castle_archive_list_item(list_id, item_id)
Archive a list entry so it stops matching. Reversible with castle_unarchive_list_item. Castle: DELETE /v1/lists/{list_id}/items/{id}/archive.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list holding the item."
},
"item_id": {
"type": "string",
"description": "The item to archive."
}
},
"required": [
"list_id",
"item_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴castle_unarchive_list_item(list_id, item_id)
Restore a previously archived list entry so it matches again. Castle: PUT /v1/lists/{list_id}/items/{id}/unarchive.
입력 스키마
{
"type": "object",
"properties": {
"list_id": {
"type": "string",
"description": "The list holding the item."
},
"item_id": {
"type": "string",
"description": "The item to restore."
}
},
"required": [
"list_id",
"item_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}커뮤니티
증거