# Castle MCP by usefulapi

> Castle MCP by usefulapi is a freemium MCP server for security. Hosted MCP server for investigating security events and managing allow/deny lists. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $9 a month
- **Platforms:** API, Web, vscode, CLI
- **Website:** https://usefulapi.io/castle/
- **Repository:** https://github.com/m190/usefulapi-mcp/tree/HEAD/servers/castle
- **MCP Registry name:** io.usefulapi/castle
- **Categories:** security
- **Listing updated:** 2026-11-18

## About

The README says Castle MCP connects an AI client to Castle's security event stream so an analyst can ask questions in plain language. Typical queries cover which IPs, devices or countries dominate a spike of failed logins, or which sign-ups share a device over a given week. Results come back with each event's risk verdict, so a user can follow a single device or account through its activity.

The server also reaches the allow and deny lists defined in a Castle environment. Through it a user can count and search blocked IP addresses, emails or device IDs, add new entries, edit comments, and archive or restore entries. The site notes that adding an entry changes live policy behaviour, so write actions are worth reviewing before they run.

Setup is hosted and needs no local install: add the endpoint URL as a remote MCP server in Claude, ChatGPT, Cursor, VS Code or another Streamable HTTP client, then log in with a Castle API secret through OAuth. The service is independent of Castle and is published by usefulapi under an MIT licence.

## Features

- **Event aggregation queries:** Groups matching security events by IP, device or country to show which values drive a spike.
- **Login and sign-up review:** Searches logins, registrations and transactions along with their risk verdicts.
- **Allow and deny list lookup:** Finds lists, counts their entries and searches the values they hold.
- **List entry management:** Adds entries, edits comments, and archives or restores items on a list.
- **Hosted remote endpoint:** Runs as a Streamable HTTP server with OAuth login, so there is nothing to install locally.

## Good for

- Spot which IP addresses are behind a burst of failed logins
- Trace sign-ups and logins from one device across a week
- Review what is on a blocked IP or email list before changing policy
- Block a suspicious email or IP by adding it to a deny list
- Archive an outdated list entry so it stops matching

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http castle https://castle.usefulapi.io/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://castle.usefulapi.io/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "castle": {
      "url": "https://castle.usefulapi.io/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "castle": {
      "type": "http",
      "url": "https://castle.usefulapi.io/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "castle": {
      "serverUrl": "https://castle.usefulapi.io/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "castle": {
      "type": "http",
      "url": "https://castle.usefulapi.io/mcp"
    }
  }
}
```

## Tools

- `castle_get_events_schema`: List the event fields you can filter and group on, with their types.
- `castle_search_events`: Query the security event stream for logins, registrations and transactions and their risk verdicts.
- `castle_group_events`: Aggregate matching events by one or more fields.
- `castle_search_lists`: Find the allow/deny lists defined in the environment.
- `castle_get_list`: Fetch a single list with its primary and secondary field definitions.
- `castle_search_list_items`: Search the entries of one list.
- `castle_count_list_items`: Count the entries in one list.
- `castle_get_list_item`: Fetch a single list entry.
- `castle_create_list`: Create a new allow or deny list.
- `castle_update_list`: Rename a list or change its colour or description.
- `castle_create_list_item`: Add an entry to a list.
- `castle_update_list_item`: Change the comment on a list entry.
- `castle_archive_list_item`: Archive a list entry so it stops matching.
- `castle_unarchive_list_item`: Restore a previously archived list entry.
- `castle_usage_status`: Report current usage against the plan limit.
- `castle_request_feature`: Send a request for a capability the Castle tools cannot yet provide.
- `castle_upgrade`: Get a paid Pro or Pro+ plan for Castle.
- `castle_cancel_subscription`: Cancel the Pro subscription at the end of the paid period.

## FAQ

### Is this an official Castle product?

No. usefulapi is an independent service and is not affiliated with or endorsed by Castle.

### Can the AI change my Castle data?

Yes, if you approve it. Six of the 18 tools can create or change data, and the rest are marked read-only.

### What does it cost?

The Free plan gives 50 tool calls a month. Pro is $9/mo or $90/yr for 10,000 calls, and Pro+ is $39/mo or $390/yr for 100,000 calls.

### Do I put an API key in the client config?

No. Add only the URL. The server signs you in with OAuth and the login page asks for your Castle API secret.

### Is Castle MCP by usefulapi free?

Castle MCP by usefulapi has a free plan, with paid plans for more usage or features. Paid plans start at $9 a month.

### How do I add Castle MCP by usefulapi to Claude Code?

Run this command in your terminal: claude mcp add --transport http castle https://castle.usefulapi.io/mcp

### What are the best alternatives to Castle MCP by usefulapi?

The closest alternatives to Castle MCP by usefulapi are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/castle-mcp-by-usefulapi
