pigeon-mcp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -0
- package/build/http.d.ts +2 -0
- package/build/http.js +31 -0
- package/build/http.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -0
- package/build/server.d.ts +1 -0
- package/build/server.js +301 -0
- package/build/server.js.map +1 -0
- package/build/stubs.d.ts +7 -0
- package/build/stubs.js +16 -0
- package/build/stubs.js.map +1 -0
- package/package.json +25 -0
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# pigeon-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for Pigeon — the PDF generation API for AI agents. Gives Claude, Cursor, and other AI coding tools the ability to generate PDFs, render templates, and check usage.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx -y pigeon-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Configuration
|
|
12
|
+
|
|
13
|
+
Add to your MCP client config:
|
|
14
|
+
|
|
15
|
+
### Claude Code
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
// ~/.claude/claude_code_config.json or project .mcp.json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"pigeon": {
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["-y", "pigeon-mcp"],
|
|
24
|
+
"env": { "PIGEON_API_KEY": "pgn_live_xxxx" }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Cursor
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
// .cursor/mcp.json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"pigeon": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["-y", "pigeon-mcp"],
|
|
39
|
+
"env": { "PIGEON_API_KEY": "pgn_live_xxxx" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Claude Desktop
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
// ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"pigeon": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["-y", "pigeon-mcp"],
|
|
54
|
+
"env": { "PIGEON_API_KEY": "pgn_live_xxxx" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Windsurf
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
// .windsurf/mcp.json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"pigeon": {
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "pigeon-mcp"],
|
|
69
|
+
"env": { "PIGEON_API_KEY": "pgn_live_xxxx" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Available Tools
|
|
76
|
+
|
|
77
|
+
### Phase 1 (Active)
|
|
78
|
+
|
|
79
|
+
| Tool | Description |
|
|
80
|
+
|------|-------------|
|
|
81
|
+
| `render_html` | Render HTML to PDF. Returns a download URL. |
|
|
82
|
+
| `render_template` | Render a named template with data. |
|
|
83
|
+
| `get_render_status` | Check async render job status. |
|
|
84
|
+
| `list_templates` | List available templates and their schemas. |
|
|
85
|
+
| `get_usage` | Get current billing period usage. |
|
|
86
|
+
|
|
87
|
+
### Phase 2 (Coming Soon)
|
|
88
|
+
|
|
89
|
+
| Tool | Description |
|
|
90
|
+
|------|-------------|
|
|
91
|
+
| `send_document` | Send via tracked link with analytics. |
|
|
92
|
+
| `get_link` | Get tracked link details. |
|
|
93
|
+
| `get_link_analytics` | Per-viewer, per-page analytics. |
|
|
94
|
+
| `revoke_link` | Revoke tracked link access. |
|
|
95
|
+
|
|
96
|
+
### Phase 3 (Coming Soon)
|
|
97
|
+
|
|
98
|
+
| Tool | Description |
|
|
99
|
+
|------|-------------|
|
|
100
|
+
| `create_envelope` | Create a signing envelope. |
|
|
101
|
+
| `get_envelope_status` | Check signing status. |
|
|
102
|
+
| `void_envelope` | Cancel pending signing. |
|
|
103
|
+
| `download_signed` | Download signed PDF + audit trail. |
|
|
104
|
+
|
|
105
|
+
## Streamable HTTP Transport
|
|
106
|
+
|
|
107
|
+
For remote/hosted MCP connections:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
PIGEON_API_KEY=pgn_live_xxxx npx pigeon-mcp-http
|
|
111
|
+
# or
|
|
112
|
+
MCP_PORT=3100 pigeon-mcp-http
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Endpoint: `http://localhost:3100/mcp`
|
|
116
|
+
|
|
117
|
+
## Environment Variables
|
|
118
|
+
|
|
119
|
+
| Variable | Required | Description |
|
|
120
|
+
|----------|----------|-------------|
|
|
121
|
+
| `PIGEON_API_KEY` | Yes | Your Pigeon API key (`pgn_live_...`) |
|
|
122
|
+
| `PIGEON_BASE_URL` | No | Override API URL (default: `https://api.usepigeon.dev`) |
|
|
123
|
+
| `MCP_PORT` | No | HTTP transport port (default: `3100`) |
|
|
124
|
+
|
|
125
|
+
## Links
|
|
126
|
+
|
|
127
|
+
- [Pigeon Documentation](https://usepigeon.dev/docs)
|
|
128
|
+
- [Get an API key](https://usepigeon.dev/dashboard)
|
|
129
|
+
- [Roadmap](https://usepigeon.dev/roadmap)
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
MIT
|
package/build/http.d.ts
ADDED
package/build/http.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createServer } from "node:http";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
5
|
+
import { server } from "./server.js";
|
|
6
|
+
const PORT = parseInt(process.env.MCP_PORT || "3100", 10);
|
|
7
|
+
const transport = new StreamableHTTPServerTransport({
|
|
8
|
+
sessionIdGenerator: () => randomUUID(),
|
|
9
|
+
});
|
|
10
|
+
const httpServer = createServer(async (req, res) => {
|
|
11
|
+
// Health check
|
|
12
|
+
if (req.url === "/health" && req.method === "GET") {
|
|
13
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
|
14
|
+
res.end(JSON.stringify({ status: "ok", server: "pigeon-mcp" }));
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
// MCP endpoint
|
|
18
|
+
if (req.url === "/mcp" || req.url === "/") {
|
|
19
|
+
await transport.handleRequest(req, res);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
res.writeHead(404, { "Content-Type": "application/json" });
|
|
23
|
+
res.end(JSON.stringify({ error: "Not found. Use /mcp for MCP endpoint." }));
|
|
24
|
+
});
|
|
25
|
+
await server.connect(transport);
|
|
26
|
+
httpServer.listen(PORT, () => {
|
|
27
|
+
console.error(`[pigeon-mcp] Streamable HTTP server listening on port ${PORT}`);
|
|
28
|
+
console.error(`[pigeon-mcp] MCP endpoint: http://localhost:${PORT}/mcp`);
|
|
29
|
+
console.error(`[pigeon-mcp] Health check: http://localhost:${PORT}/health`);
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE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C;IAC/E,OAAO,CAAC,KAAK,CAAC,+CAA+C,IAAI,MAAM,CAAC,CAAC;IACzE,OAAO,CAAC,KAAK,CAAC,+CAA+C,IAAI,SAAS,CAAC,CAAC;AAC9E,CAAC,CAAC,CAAC"}
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { server } from "./server.js";
|
|
4
|
+
const transport = new StdioServerTransport();
|
|
5
|
+
await server.connect(transport);
|
|
6
|
+
console.error("[pigeon-mcp] Server started on stdio");
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAChC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const server: any;
|
package/build/server.js
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { Pigeon, PigeonError } from "pigeon-pdf";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { stubResult } from "./stubs.js";
|
|
5
|
+
export const server = new McpServer({
|
|
6
|
+
name: "pigeon",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
});
|
|
9
|
+
function getClient() {
|
|
10
|
+
const apiKey = process.env.PIGEON_API_KEY;
|
|
11
|
+
if (!apiKey) {
|
|
12
|
+
throw new Error("PIGEON_API_KEY not set. Get one at https://usepigeon.dev/dashboard");
|
|
13
|
+
}
|
|
14
|
+
return new Pigeon({
|
|
15
|
+
apiKey,
|
|
16
|
+
baseUrl: process.env.PIGEON_BASE_URL,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function errorText(err) {
|
|
20
|
+
if (err instanceof PigeonError) {
|
|
21
|
+
return JSON.stringify({
|
|
22
|
+
error: err.code,
|
|
23
|
+
message: err.message,
|
|
24
|
+
docs_url: err.docsUrl,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (err instanceof Error) {
|
|
28
|
+
return JSON.stringify({ error: "INTERNAL_ERROR", message: err.message });
|
|
29
|
+
}
|
|
30
|
+
return JSON.stringify({ error: "INTERNAL_ERROR", message: String(err) });
|
|
31
|
+
}
|
|
32
|
+
// ─── Template catalog (hardcoded for Phase 1) ──────────────
|
|
33
|
+
const TEMPLATE_CATALOG = [
|
|
34
|
+
{
|
|
35
|
+
name: "invoice",
|
|
36
|
+
status: "available",
|
|
37
|
+
description: "Professional invoice with line items, tax, and totals",
|
|
38
|
+
requiredFields: ["companyName", "customerName", "items", "currency"],
|
|
39
|
+
optionalFields: ["logo", "notes", "dueDate", "invoiceNumber"],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "receipt",
|
|
43
|
+
status: "available",
|
|
44
|
+
description: "Payment receipt with itemized charges",
|
|
45
|
+
requiredFields: ["merchantName", "items", "total", "paymentMethod"],
|
|
46
|
+
optionalFields: ["receiptNumber", "date", "address"],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "contract",
|
|
50
|
+
status: "available",
|
|
51
|
+
description: "Service agreement or contract document",
|
|
52
|
+
requiredFields: ["partyA", "partyB", "terms", "effectiveDate"],
|
|
53
|
+
optionalFields: ["witnessName", "jurisdiction", "terminationClause"],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "report",
|
|
57
|
+
status: "coming_soon",
|
|
58
|
+
description: "Data report with charts and tables",
|
|
59
|
+
requiredFields: ["title", "sections"],
|
|
60
|
+
optionalFields: ["author", "date", "summary"],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "certificate",
|
|
64
|
+
status: "available",
|
|
65
|
+
description: "Award or completion certificate",
|
|
66
|
+
requiredFields: ["recipientName", "title", "issuerName"],
|
|
67
|
+
optionalFields: ["date", "description", "certificateId"],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "offer-letter",
|
|
71
|
+
status: "available",
|
|
72
|
+
description: "Employment offer letter",
|
|
73
|
+
requiredFields: ["candidateName", "position", "salary", "startDate", "companyName"],
|
|
74
|
+
optionalFields: ["benefits", "manager", "expiryDate"],
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
// ═══════════════════════════════════════════════════════════
|
|
78
|
+
// PHASE 1 — ACTIVE TOOLS (5)
|
|
79
|
+
// ═══════════════════════════════════════════════════════════
|
|
80
|
+
server.tool("render_html", "Render an HTML string to a PDF file. Returns a URL to the generated PDF.", {
|
|
81
|
+
html: z.string().describe("HTML content to render as PDF"),
|
|
82
|
+
locale: z
|
|
83
|
+
.enum(["en", "zh-CN", "zh-TW", "ja", "ko"])
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("Language locale for CJK font selection"),
|
|
86
|
+
format: z
|
|
87
|
+
.enum(["A4", "Letter", "Legal", "A3"])
|
|
88
|
+
.optional()
|
|
89
|
+
.describe("Page format (default: A4)"),
|
|
90
|
+
orientation: z
|
|
91
|
+
.enum(["portrait", "landscape"])
|
|
92
|
+
.optional()
|
|
93
|
+
.describe("Page orientation (default: portrait)"),
|
|
94
|
+
margin: z
|
|
95
|
+
.string()
|
|
96
|
+
.optional()
|
|
97
|
+
.describe("Page margins as CSS value, e.g. '1cm' or '10mm 20mm'"),
|
|
98
|
+
waitFor: z
|
|
99
|
+
.enum(["load", "networkidle"])
|
|
100
|
+
.optional()
|
|
101
|
+
.describe("Wait condition before rendering"),
|
|
102
|
+
}, async ({ html, locale, format, orientation, margin, waitFor }) => {
|
|
103
|
+
try {
|
|
104
|
+
const pigeon = getClient();
|
|
105
|
+
const result = await pigeon.render({
|
|
106
|
+
html,
|
|
107
|
+
locale,
|
|
108
|
+
format,
|
|
109
|
+
orientation,
|
|
110
|
+
margin,
|
|
111
|
+
waitFor,
|
|
112
|
+
});
|
|
113
|
+
return {
|
|
114
|
+
content: [
|
|
115
|
+
{
|
|
116
|
+
type: "text",
|
|
117
|
+
text: JSON.stringify({
|
|
118
|
+
url: result.url,
|
|
119
|
+
pages: result.pages,
|
|
120
|
+
size: result.size,
|
|
121
|
+
renderTime: result.renderTime,
|
|
122
|
+
id: result.id,
|
|
123
|
+
}, null, 2),
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
return {
|
|
130
|
+
content: [{ type: "text", text: errorText(err) }],
|
|
131
|
+
isError: true,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
server.tool("render_template", "Render a pigeon-template component with data. Returns a PDF URL.", {
|
|
136
|
+
template: z
|
|
137
|
+
.enum([
|
|
138
|
+
"invoice",
|
|
139
|
+
"receipt",
|
|
140
|
+
"contract",
|
|
141
|
+
"report",
|
|
142
|
+
"certificate",
|
|
143
|
+
"offer-letter",
|
|
144
|
+
])
|
|
145
|
+
.describe("Template name to render"),
|
|
146
|
+
data: z
|
|
147
|
+
.record(z.unknown())
|
|
148
|
+
.describe("Template data as key-value pairs"),
|
|
149
|
+
locale: z
|
|
150
|
+
.enum(["en", "zh-CN", "zh-TW", "ja", "ko"])
|
|
151
|
+
.optional()
|
|
152
|
+
.describe("Language locale for CJK font selection"),
|
|
153
|
+
}, async ({ template, data, locale }) => {
|
|
154
|
+
try {
|
|
155
|
+
const pigeon = getClient();
|
|
156
|
+
// Construct HTML from template name + data until template engine is wired
|
|
157
|
+
const dataRows = Object.entries(data)
|
|
158
|
+
.map(([k, v]) => `<tr><td style="padding:8px;border:1px solid #ddd;font-weight:bold">${k}</td><td style="padding:8px;border:1px solid #ddd">${String(v)}</td></tr>`)
|
|
159
|
+
.join("\n");
|
|
160
|
+
const html = `<!DOCTYPE html>
|
|
161
|
+
<html lang="${locale || "en"}">
|
|
162
|
+
<head><meta charset="UTF-8"><style>
|
|
163
|
+
body { font-family: sans-serif; padding: 40px; color: #333; }
|
|
164
|
+
h1 { text-transform: capitalize; border-bottom: 2px solid #333; padding-bottom: 8px; }
|
|
165
|
+
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
|
|
166
|
+
</style></head>
|
|
167
|
+
<body>
|
|
168
|
+
<h1>${template}</h1>
|
|
169
|
+
<table>${dataRows}</table>
|
|
170
|
+
</body>
|
|
171
|
+
</html>`;
|
|
172
|
+
const result = await pigeon.render({ html, locale });
|
|
173
|
+
return {
|
|
174
|
+
content: [
|
|
175
|
+
{
|
|
176
|
+
type: "text",
|
|
177
|
+
text: JSON.stringify({
|
|
178
|
+
url: result.url,
|
|
179
|
+
pages: result.pages,
|
|
180
|
+
size: result.size,
|
|
181
|
+
template,
|
|
182
|
+
id: result.id,
|
|
183
|
+
}, null, 2),
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
return {
|
|
190
|
+
content: [{ type: "text", text: errorText(err) }],
|
|
191
|
+
isError: true,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
server.tool("get_render_status", "Check the status of an async render job.", {
|
|
196
|
+
job_id: z.string().describe("The render job ID returned from render_html"),
|
|
197
|
+
}, async ({ job_id }) => {
|
|
198
|
+
try {
|
|
199
|
+
const pigeon = getClient();
|
|
200
|
+
const result = await pigeon.getRender(job_id);
|
|
201
|
+
return {
|
|
202
|
+
content: [
|
|
203
|
+
{
|
|
204
|
+
type: "text",
|
|
205
|
+
text: JSON.stringify({
|
|
206
|
+
id: result.id,
|
|
207
|
+
status: result.status,
|
|
208
|
+
url: result.url,
|
|
209
|
+
pages: result.pages,
|
|
210
|
+
size: result.size,
|
|
211
|
+
renderTime: result.renderTime,
|
|
212
|
+
errorCode: result.errorCode,
|
|
213
|
+
errorMessage: result.errorMessage,
|
|
214
|
+
createdAt: result.createdAt,
|
|
215
|
+
completedAt: result.completedAt,
|
|
216
|
+
}, null, 2),
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
catch (err) {
|
|
222
|
+
return {
|
|
223
|
+
content: [{ type: "text", text: errorText(err) }],
|
|
224
|
+
isError: true,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
server.tool("list_templates", "List available pigeon-templates with their required data schemas.", {}, async () => {
|
|
229
|
+
return {
|
|
230
|
+
content: [
|
|
231
|
+
{
|
|
232
|
+
type: "text",
|
|
233
|
+
text: JSON.stringify(TEMPLATE_CATALOG, null, 2),
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
};
|
|
237
|
+
});
|
|
238
|
+
server.tool("get_usage", "Get current API usage and remaining quota for this billing period.", {}, async () => {
|
|
239
|
+
try {
|
|
240
|
+
const pigeon = getClient();
|
|
241
|
+
const usage = await pigeon.getUsage();
|
|
242
|
+
return {
|
|
243
|
+
content: [
|
|
244
|
+
{
|
|
245
|
+
type: "text",
|
|
246
|
+
text: JSON.stringify({
|
|
247
|
+
renders: usage.renders,
|
|
248
|
+
period: usage.period,
|
|
249
|
+
}, null, 2),
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
catch (err) {
|
|
255
|
+
return {
|
|
256
|
+
content: [{ type: "text", text: errorText(err) }],
|
|
257
|
+
isError: true,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
// ═══════════════════════════════════════════════════════════
|
|
262
|
+
// PHASE 2 STUBS — Send & Track (4)
|
|
263
|
+
// ═══════════════════════════════════════════════════════════
|
|
264
|
+
server.tool("send_document", "Send a document via tracked link with per-page analytics.", {
|
|
265
|
+
document_url: z.string().describe("URL of the PDF to send"),
|
|
266
|
+
recipient_email: z.string().describe("Recipient email address"),
|
|
267
|
+
subject: z.string().optional().describe("Email subject line"),
|
|
268
|
+
}, async () => stubResult(2));
|
|
269
|
+
server.tool("get_link", "Get tracked link details and status.", {
|
|
270
|
+
link_id: z.string().describe("The tracked link ID"),
|
|
271
|
+
}, async () => stubResult(2));
|
|
272
|
+
server.tool("get_link_analytics", "Get per-viewer, per-page analytics for a tracked link.", {
|
|
273
|
+
link_id: z.string().describe("The tracked link ID"),
|
|
274
|
+
}, async () => stubResult(2));
|
|
275
|
+
server.tool("revoke_link", "Revoke access to a tracked link.", {
|
|
276
|
+
link_id: z.string().describe("The tracked link ID to revoke"),
|
|
277
|
+
}, async () => stubResult(2));
|
|
278
|
+
// ═══════════════════════════════════════════════════════════
|
|
279
|
+
// PHASE 3 STUBS — Sign (4)
|
|
280
|
+
// ═══════════════════════════════════════════════════════════
|
|
281
|
+
server.tool("create_envelope", "Create a signing envelope with one or more signers.", {
|
|
282
|
+
document_url: z.string().describe("URL of the PDF to sign"),
|
|
283
|
+
signers: z
|
|
284
|
+
.array(z.object({
|
|
285
|
+
name: z.string(),
|
|
286
|
+
email: z.string(),
|
|
287
|
+
}))
|
|
288
|
+
.describe("List of signers"),
|
|
289
|
+
subject: z.string().optional().describe("Signing request subject"),
|
|
290
|
+
}, async () => stubResult(3));
|
|
291
|
+
server.tool("get_envelope_status", "Check signing status and audit trail.", {
|
|
292
|
+
envelope_id: z.string().describe("The envelope ID"),
|
|
293
|
+
}, async () => stubResult(3));
|
|
294
|
+
server.tool("void_envelope", "Cancel a pending signing envelope.", {
|
|
295
|
+
envelope_id: z.string().describe("The envelope ID to void"),
|
|
296
|
+
reason: z.string().optional().describe("Reason for voiding"),
|
|
297
|
+
}, async () => stubResult(3));
|
|
298
|
+
server.tool("download_signed", "Download the completed signed PDF with audit trail.", {
|
|
299
|
+
envelope_id: z.string().describe("The envelope ID"),
|
|
300
|
+
}, async () => stubResult(3));
|
|
301
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAClC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,SAAS,SAAS;IAChB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,MAAM,CAAC;QAChB,MAAM;QACN,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;KACrC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,SAAS,CAAC,GAAY;IAC7B,IAAI,GAAG,YAAY,WAAW,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,GAAG,CAAC,IAAI;YACf,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,QAAQ,EAAE,GAAG,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IACD,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,CAAC,O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;AAEF,MAAM,CAAC,IAAI,CACT,eAAe,EACf,oCAAoC,EACpC;IACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC3D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CAC7D,EACD,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAC1B,CAAC;AAEF,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,qDAAqD,EACrD;IACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;CACpD,EACD,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAC1B,CAAC"}
|
package/build/stubs.d.ts
ADDED
package/build/stubs.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function stubResult(phase) {
|
|
2
|
+
return {
|
|
3
|
+
content: [
|
|
4
|
+
{
|
|
5
|
+
type: "text",
|
|
6
|
+
text: JSON.stringify({
|
|
7
|
+
error: "not_yet_available",
|
|
8
|
+
message: `This tool is coming in Phase ${phase}. See https://usepigeon.dev/roadmap`,
|
|
9
|
+
phase,
|
|
10
|
+
}),
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
isError: true,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=stubs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stubs.js","sourceRoot":"","sources":["../src/stubs.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,KAAK,EAAE,mBAAmB;oBAC1B,OAAO,EAAE,gCAAgC,KAAK,qCAAqC;oBACnF,KAAK;iBACN,CAAC;aACH;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pigeon-mcp",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"pigeon-mcp": "./build/index.js",
|
|
7
|
+
"pigeon-mcp-http": "./build/http.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc && chmod 755 build/index.js build/http.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"build",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
18
|
+
"pigeon-pdf": "workspace:*",
|
|
19
|
+
"zod": "^3.25.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^20.0.0",
|
|
23
|
+
"typescript": "^5.4.0"
|
|
24
|
+
}
|
|
25
|
+
}
|