Denaria Action Handoff MCP
OfficialREADME.md
# Denaria Action Handoff MCP
Denaria Action Handoff is the official Denaria MCP service for preparing unsigned App/PWA handoffs from agent requests.
It preserves this authority boundary:
```text
Denaria Agent Service prepares.
Denaria App/PWA verifies.
The user signs.
External agents do not execute.
```
The service does not sign, submit, broadcast, execute transactions, custody funds, or run autonomous trading strategies.
## Official Endpoint
MCP transport: Streamable HTTP
```text
https://mcp.denaria.finance/mcp
```
Runtime public base URL for deployments:
```text
DENARIA_PUBLIC_BASE_URL=https://mcp.denaria.finance
```
Use the origin without `/mcp` for `DENARIA_PUBLIC_BASE_URL`; the service uses it to generate QR page and image URLs such as:
```text
https://mcp.denaria.finance/handoff/qr
https://mcp.denaria.finance/handoff/qr.png
```
## Tools
### `denaria_get_capabilities`
Read-only discovery tool. It returns supported markets, aliases, defaults, response contract, and the authority boundary.
### `denaria_prepare_create_position`
Prepare-only tool for Denaria create-position handoffs.
Preferred arguments:
```json
{
"marketId": "BTC-USD",
"side": "long",
"collateralAsset": "USDC",
"collateralAmount": "20",
"leverage": "4"
}
```
Supported aliases include `BTC` -> `BTC-USD`. Agents should prefer `marketId: "BTC-USD"` when calling the tool.
Do not send `maxSlippageBps` in normal create-position requests. Denaria App/PWA applies the user's slippage settings during scan/review.
## Response Contract
Successful prepare responses expose QR-first display fields under `result.clientDisplay`:
```text
result.clientDisplay.qrMarkdown
result.clientDisplay.qrPageUrl
result.clientDisplay.qrImageUrl
result.clientDisplay.nextStep
```
Agents should render the QR by default, include the QR page URL and direct image URL, and keep the final response compact.
The QR payload carries frontend-aligned intent parameters directly, so Denaria App/PWA can read the scanned action without an MCP fetch:
```text
denaria://agent/handoff?assetTicker=BTC&side=long&collateralUSDC=20&leverage=4
```
The QR/handoff is not an approval. Denaria App/PWA verifies the handoff, refreshes app-side state/settings, prepares the signing flow, and the user signs in the app.
## Agent Skill
The standalone behavior file is available in this repository at:
```text
skills/denaria-action-handoff.md
```
The public landing copy is expected at:
```text
https://denaria.finance/skills/denaria-action-handoff.md
```
The skill defines intent parsing, tool selection, response format, and safe refusals.
## Local Development
Install dependencies:
```text
pnpm install
```
Run local checks:
```text
pnpm build
pnpm test
```
Run the HTTP MCP server locally:
```text
DENARIA_MCP_PORT=8787 pnpm mcp:http
```
For production-like deployments, set `DENARIA_PUBLIC_BASE_URL` to the public origin that serves `/handoff/qr` and `/handoff/qr.png`.
## Deployment
`Dockerfile` builds the service image. The container runs:
```text
node dist/mcp/http-server.js
```
The service listens on port `8787` by default and exposes:
```text
/mcp
/handoff/qr
/handoff/qr.png
```
## Canonical Context
This README and the current MCP implementation are authoritative for the Action Handoff MCP surface.This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues