> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reincarnatiopedia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> 20-tool infrastructure API for AI agents

# MCP Server

The MCP (Model Context Protocol) server exposes 20 tools that let AI agents manage the entire infrastructure — monitoring, WordPress content, Cloudflare, security, and documentation.

Accessible via bearer token authentication on a private endpoint.

## Tools

<AccordionGroup>
  <Accordion title="Monitoring (5 tools)">
    | Tool              | Description                            |
    | ----------------- | -------------------------------------- |
    | `server_status`   | CPU, RAM, disk, service health         |
    | `disk_usage`      | Detailed disk breakdown                |
    | `service_status`  | systemd service details                |
    | `read_logs`       | Stream logs (nginx, php, mariadb, bot) |
    | `security_report` | SSH attempts, fail2ban, port scanning  |
  </Accordion>

  <Accordion title="WordPress (3 tools)">
    | Tool              | Description                   |
    | ----------------- | ----------------------------- |
    | `wp_list_posts`   | List blog posts               |
    | `wp_get_post`     | Get full post content         |
    | `wp_create_draft` | Create posts programmatically |
  </Accordion>

  <Accordion title="Cloudflare (4 tools)">
    | Tool           | Description                    |
    | -------------- | ------------------------------ |
    | `cf_analytics` | Traffic, visitors, cache stats |
    | `cf_countries` | Top countries by traffic       |
    | `cf_threats`   | DDoS and threat logs           |
    | `cf_purge`     | Cache purge                    |
  </Accordion>

  <Accordion title="Documentation (3 tools)">
    | Tool            | Description                      |
    | --------------- | -------------------------------- |
    | `list_docs`     | Browse project documentation     |
    | `read_doc`      | Read specific document           |
    | `append_to_doc` | Add to changelog, ideas, context |
  </Accordion>

  <Accordion title="Ideas & Utilities (5 tools)">
    | Tool           | Description                                  |
    | -------------- | -------------------------------------------- |
    | `list_ideas`   | Browse IDEAS.md                              |
    | `add_idea`     | Submit new feature ideas                     |
    | `exec_command` | Run whitelisted shell commands (30s timeout) |
    | `write_file`   | Write to allowed directories                 |
  </Accordion>
</AccordionGroup>

## Security

* **Bearer token** authentication
* **Command whitelist** — only safe commands allowed
* **Directory restrictions** — writes limited to specific paths
* **DNS rebinding protection**
* **Localhost-only** port, exposed via Nginx reverse proxy
