Claude Code Setup
Set up push notifications and permission hooks for Claude Code
Complete the Quickstart first to create your account and get your API key.
Two ways to use Pushary with Claude Code: MCP tools (agent sends notifications and asks questions) and permission hooks (approve or deny tool calls from your phone). Use both together for the full experience.
Setup wizard
The setup wizard configures everything in one command:
npx @pushary/agent-hooks setupThe wizard configures these files:
It will:
- Add the Pushary MCP server to
~/.claude/settings.json - Add permission hooks for Bash, Write, and Edit (PreToolUse)
- Add event tracking hooks (PostToolUse, Stop)
- Auto-allow Pushary MCP tools
- Save your API key to your shell profile
- Send a test notification
MCP tools
Once connected, Claude Code can use these tools:
| Tool | Description |
|---|---|
send_notification | Send a push with optional rich context (files changed, errors, next steps) |
ask_user | Ask a question: yes/no, multiple choice, or free text |
wait_for_answer | Poll for your response |
cancel_question | Cancel a pending question |
Question types
Confirm (yes/no):
Ask me via Pushary: should I delete the 3 unused migration files?Select (multiple choice):
Ask me via Pushary which auth strategy to use: JWT tokens, Session cookies, or OAuth2Input (free text):
Ask me via Pushary what the new API endpoint path should beRich context notifications
When a task completes or fails, Claude Code sends a notification with a detail page:
Send me a Pushary notification that the refactoring is complete.
Include the files changed and suggested next steps.The notification links to a detail page showing the summary, files changed, error messages, and next steps.
Permission hooks
Permission hooks intercept Claude Code's built-in tool approval prompts and route them through push notifications. When Claude Code wants to run a bash command or edit a file, you get a push notification to approve or deny from your phone.
Manual setup
If you didn't use the setup wizard, add this to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Write|Edit",
"hooks": [
{
"type": "command",
"command": "pushary-hook",
"timeout": 120
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash|Write|Edit",
"hooks": [
{
"type": "command",
"command": "pushary-post-hook",
"timeout": 10
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "pushary-stop-hook",
"timeout": 10
}
]
}
]
}
}And set your API key in your shell profile:
export PUSHARY_API_KEY="pk_abc123.sk_xyz789"Install the hook globally for faster startup: npm install -g @pushary/agent-hooks
Timeout policies
Configure what happens when you don't respond in time at pushary.com/dashboard/agent/policies:
| Tool | Timeout | If no response |
|---|---|---|
| Bash | 60s | Auto-deny |
| Write | 60s | Ask in terminal |
| Edit | 45s | Ask in terminal |
| Read | 0s | Auto-approve |
Auto-approve: allow the action without waiting. Use for safe read-only tools.
Auto-deny: block the action. Use for destructive tools like Bash.
Ask in terminal: fall back to Claude Code's normal terminal permission prompt. Use when you might be at your computer.
How it works
- Claude Code wants to run
bash: rm -rf ./dist - The hook sends a push notification: "Allow bash: rm -rf ./dist?"
- You tap Yes or No on your phone
- Claude Code proceeds or stops based on your answer
- If you don't respond within the timeout, the configured fallback kicks in
Agent identification
When you run multiple Claude Code sessions, each notification shows which session is asking. The hook automatically labels notifications as Claude Code - {project folder name}.
Install the skill
For better agent behavior, install the Pushary skill:
npx skills add Pushary/pushary-skillThe skill teaches Claude Code when to send notifications proactively (after multi-step tasks, on errors) and how to write concise notification copy.