docs: add Claude AI assistant rules and configuration
Add comprehensive rule documentation for AI-assisted development covering authentication surfaces, outbound-call safety invariants, and other project conventions to guide Claude's understanding of critical system behaviors.
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
The MCP (Model Context Protocol) server lets any MCP-compatible AI assistant
|
||||
control the Hold Slayer gateway. Built with [FastMCP](https://github.com/jlowin/fastmcp),
|
||||
it is mounted on the FastAPI app at **`/mcp/`** (trailing slash) over
|
||||
**streamable HTTP** and authenticates with the same static bearer token as the
|
||||
REST API and WebSocket.
|
||||
**streamable HTTP** and authenticates with an owner-minted Personal Access Token
|
||||
(`hs_pat_…`) — the same owner-only auth as the REST API and WebSocket. Auth is
|
||||
enforced by an ASGI guard (`_owner_only_mcp` in `main.py`) that resolves the
|
||||
bearer to the owner; a Casdoor JWT also works, but MCP clients can't refresh one,
|
||||
so a PAT is the intended credential.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -158,7 +161,7 @@ Claude Code:
|
||||
|
||||
```bash
|
||||
claude mcp add hold-slayer --transport http http://localhost:8000/mcp/ \
|
||||
--header "Authorization: Bearer $API_TOKEN"
|
||||
--header "Authorization: Bearer hs_pat_..."
|
||||
```
|
||||
|
||||
Generic MCP client configuration:
|
||||
@@ -168,7 +171,7 @@ Generic MCP client configuration:
|
||||
"mcpServers": {
|
||||
"hold-slayer": {
|
||||
"url": "http://localhost:8000/mcp/",
|
||||
"headers": {"Authorization": "Bearer <API_TOKEN>"}
|
||||
"headers": {"Authorization": "Bearer hs_pat_..."}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user