-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.go
More file actions
33 lines (27 loc) · 1.33 KB
/
Copy pathserver.go
File metadata and controls
33 lines (27 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"github.com/mark3labs/mcp-go/server"
)
func NewServer(client *PushoverClient) *server.MCPServer {
srv := server.NewMCPServer(
"pushover-mcp",
version,
server.WithToolCapabilities(true),
server.WithInstructions(`Pushover notification MCP server. Use these tools to send push notifications and manage emergency-priority messages.
Available tools:
- pushover_send_message: Send a push notification. Supports priority levels from -2 (lowest) to 2 (emergency).
- pushover_check_receipt: Check the status of an emergency-priority notification (was it acknowledged, has it expired, etc.).
- pushover_cancel_receipt: Cancel retries for a specific emergency-priority notification.
- pushover_cancel_receipt_by_tag: Cancel all emergency-priority notifications matching a tag.
Emergency priority workflow:
1. Send a message with priority=2, retry (min 30 seconds), and expire (max 10800 seconds). You will receive a receipt ID.
2. Optionally poll the receipt with pushover_check_receipt to check if the user acknowledged it.
3. Cancel with pushover_cancel_receipt if no longer needed.
Important notes:
- priority=2 (emergency) REQUIRES retry and expire parameters.
- html and monospace formatting are mutually exclusive.
- Do not send more than 2 concurrent requests to avoid rate limiting.`),
)
registerTools(srv, client)
return srv
}