# ArkeAi v0.1.0 - API Reference

## Modules

- [ArkeAi](ArkeAi.md): AI integrations for [Arke](https://hex.pm/packages/arke). Currently exposes the
`ArkeAi.Mcp.*` namespace for serving an Arke project to MCP-capable agents
(Claude Desktop, Cursor, IDE integrations) over HTTP / Streamable HTTP.
- [ArkeAi.Mcp.Notifications](ArkeAi.Mcp.Notifications.md): Distributed pub/sub for MCP notifications via `:pg`.
- [ArkeAi.Mcp.Permission](ArkeAi.Mcp.Permission.md): Thin wrapper over `ArkeAuth.Utils.Permission`.
- [ArkeAi.Mcp.PermissionFilter](ArkeAi.Mcp.PermissionFilter.md): Parses and applies Arke permission filter strings.
- [ArkeAi.Mcp.Plugs.Auth](ArkeAi.Mcp.Plugs.Auth.md): Plug handling `:local` (IP-restricted, project from header/opts) and `:bearer` (Guardian JWT) auth modes. Sets `:arke_project` on conn assigns.
- [ArkeAi.Mcp.Plugs.AuthErrorHandler](ArkeAi.Mcp.Plugs.AuthErrorHandler.md): Guardian error handler for the MCP pipeline. Returns 401 on any auth failure.
- [ArkeAi.Mcp.Plugs.GuardianPipeline](ArkeAi.Mcp.Plugs.GuardianPipeline.md): Guardian plug pipeline for Bearer token verification using ArkeAuth.Guardian.
- [ArkeAi.Mcp.Protocol](ArkeAi.Mcp.Protocol.md): Pure JSON-RPC 2.0 dispatch. Takes a decoded params map, returns a tagged tuple.
- [ArkeAi.Mcp.Router](ArkeAi.Mcp.Router.md): HTTP entry point for the MCP server. Accepts JSON-RPC 2.0 over POST, enforces auth, delegates to Protocol.
- [ArkeAi.Mcp.SSE](ArkeAi.Mcp.SSE.md): SSE transport: opens a chunked response, subscribes to notifications, writes events.
- [ArkeAi.Mcp.Schema.ParameterToJson](ArkeAi.Mcp.Schema.ParameterToJson.md): Converts an Arke parameter unit to a JSON Schema fragment (type + constraints + default).
- [ArkeAi.Mcp.Schema.SearchFilter](ArkeAi.Mcp.Schema.SearchFilter.md): Recursive filter conversion: JSON filter tree → Arke query.
- [ArkeAi.Mcp.Tools.Arke](ArkeAi.Mcp.Tools.Arke.md): Builds and executes tools for `:arke`.
- [ArkeAi.Mcp.Tools.Group](ArkeAi.Mcp.Tools.Group.md): Builds and executes tools for `:group`.
- [ArkeAi.Mcp.Tools.Registry](ArkeAi.Mcp.Tools.Registry.md): Derives MCP tool definitions from Arke ETS on demand and routes calls to the right tools module.
- [ArkeAi.Mcp.Tools.System](ArkeAi.Mcp.Tools.System.md): Builds and executes tools for `:system` expose entries (arke / parameter / group definition CRUD + associations).

