paput-mcp 2.4.0 → 2.5.0
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 +14 -2
- package/dist/check-http.js +27 -0
- package/dist/check-http.js.map +1 -0
- package/dist/http.js +149 -0
- package/dist/http.js.map +1 -0
- package/dist/index.js +0 -0
- package/dist/server.js +19 -20
- package/dist/server.js.map +1 -1
- package/dist/services/api/client.js +8 -3
- package/dist/services/api/client.js.map +1 -1
- package/dist/tool.js +2 -2
- package/dist/tool.js.map +1 -1
- package/docs/directory-submission.md +91 -0
- package/docs/privacy-policy.md +60 -0
- package/docs/tools.md +59 -0
- package/docs/usage-examples.md +83 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -38,7 +38,8 @@ npm install -g paput-mcp
|
|
|
38
38
|
|
|
39
39
|
## MCP Configuration
|
|
40
40
|
|
|
41
|
-
Create an API key in your PaPut account settings and pass it through the MCP
|
|
41
|
+
Create an API key in your PaPut account settings and pass it through the MCP
|
|
42
|
+
server environment when you want to run tools that call the PaPut API.
|
|
42
43
|
|
|
43
44
|
```json
|
|
44
45
|
"paput": {
|
|
@@ -53,7 +54,7 @@ Create an API key in your PaPut account settings and pass it through the MCP ser
|
|
|
53
54
|
|
|
54
55
|
### Environment Variables
|
|
55
56
|
|
|
56
|
-
- `PAPUT_API_KEY` - Required PaPut API
|
|
57
|
+
- `PAPUT_API_KEY` - Optional at startup. Required when executing tools that call the PaPut API.
|
|
57
58
|
- `PAPUT_API_URL` - Optional API URL. Defaults to `https://api.paput.io`.
|
|
58
59
|
- `PAPUT_PROJECT_MATCH` - Optional project name fragment for automatic project linking when creating or updating memos.
|
|
59
60
|
- `PAPUT_HOME` - Optional PaPut local data directory. Defaults to `~/.paput`.
|
|
@@ -129,6 +130,8 @@ Claude can call skills such as `/paput-save`. Codex can call `$paput-save` or us
|
|
|
129
130
|
|
|
130
131
|
## Available Tools
|
|
131
132
|
|
|
133
|
+
Detailed public tool documentation is available in [docs/tools.md](docs/tools.md).
|
|
134
|
+
|
|
132
135
|
### Memo Management
|
|
133
136
|
|
|
134
137
|
- `paput_create_memo` - Create a PaPut memo directly.
|
|
@@ -176,6 +179,8 @@ Write and destructive tools should be used only when the user intent is clear. I
|
|
|
176
179
|
|
|
177
180
|
## Usage Examples
|
|
178
181
|
|
|
182
|
+
Additional public examples are available in [docs/usage-examples.md](docs/usage-examples.md).
|
|
183
|
+
|
|
179
184
|
### 1. Avoid duplicate knowledge before saving
|
|
180
185
|
|
|
181
186
|
```text
|
|
@@ -221,3 +226,10 @@ PaPut MCP stores local data under `~/.paput` by default.
|
|
|
221
226
|
skills/ # Canonical skills linked into Claude/Codex
|
|
222
227
|
cache/ # Synced memos, pending candidates, and processed sessions
|
|
223
228
|
```
|
|
229
|
+
|
|
230
|
+
## Public Documents
|
|
231
|
+
|
|
232
|
+
- [Privacy Policy](docs/privacy-policy.md)
|
|
233
|
+
- [Usage Examples](docs/usage-examples.md)
|
|
234
|
+
- [Tools And Use Cases](docs/tools.md)
|
|
235
|
+
- [MCP Directory Submission Notes](docs/directory-submission.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
4
|
+
const endpoint = process.env.MCP_HTTP_URL ?? process.argv[2];
|
|
5
|
+
if (!endpoint) {
|
|
6
|
+
console.error('Usage: MCP_HTTP_URL=https://example.onrender.com npm run check:http');
|
|
7
|
+
process.exit(1);
|
|
8
|
+
}
|
|
9
|
+
const client = new Client({
|
|
10
|
+
name: 'paput-mcp-http-check',
|
|
11
|
+
version: '1.0.0',
|
|
12
|
+
}, {
|
|
13
|
+
capabilities: {},
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
const transport = new StreamableHTTPClientTransport(new URL(endpoint));
|
|
17
|
+
await client.connect(transport);
|
|
18
|
+
const result = await client.listTools();
|
|
19
|
+
const toolNames = result.tools.map((tool) => tool.name);
|
|
20
|
+
console.log(`Connected to ${endpoint}`);
|
|
21
|
+
console.log(`Tools: ${toolNames.length}`);
|
|
22
|
+
console.log(toolNames.join('\n'));
|
|
23
|
+
}
|
|
24
|
+
finally {
|
|
25
|
+
await client.close();
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=check-http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-http.js","sourceRoot":"","sources":["../src/check-http.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAE7D,IAAI,CAAC,QAAQ,EAAE,CAAC;IACd,OAAO,CAAC,KAAK,CACX,qEAAqE,CACtE,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE,EAAE;CACjB,CACF,CAAC;AAEF,IAAI,CAAC;IACH,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvE,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,EAAE,CAAC;IACxC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAExD,OAAO,CAAC,GAAG,CAAC,gBAAgB,QAAQ,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,UAAU,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACpC,CAAC;QAAS,CAAC;IACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC"}
|
package/dist/http.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createServer, } from 'node:http';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
5
|
+
import { createMcpServer } from './server.js';
|
|
6
|
+
const OAUTH_SCOPES = ['paput.read', 'paput.write'];
|
|
7
|
+
export async function startHttpMcpServer(options = {}) {
|
|
8
|
+
const endpoint = options.endpoint ?? '/';
|
|
9
|
+
const port = options.port ?? Number(process.env.PORT ?? 3000);
|
|
10
|
+
const host = options.host ?? process.env.HOST;
|
|
11
|
+
const apiUrl = options.apiUrl ?? process.env.PAPUT_API_URL ?? 'https://api.paput.io';
|
|
12
|
+
const apiOrigin = new URL(apiUrl).origin;
|
|
13
|
+
const oauthRequired = options.oauthRequired ?? (!options.apiKey && !process.env.PAPUT_API_KEY);
|
|
14
|
+
const httpServer = createServer(async (req, res) => {
|
|
15
|
+
const requestUrl = new URL(req.url ?? '/', `http://${req.headers.host ?? 'localhost'}`);
|
|
16
|
+
const publicOrigin = getPublicOrigin(req, requestUrl);
|
|
17
|
+
const resourceUrl = getResourceUrl(publicOrigin, endpoint);
|
|
18
|
+
const protectedResourceMetadataUrl = getProtectedResourceMetadataUrl(publicOrigin, endpoint);
|
|
19
|
+
if (requestUrl.pathname === '/healthz') {
|
|
20
|
+
res.writeHead(200, { 'content-type': 'application/json' });
|
|
21
|
+
res.end(JSON.stringify({ ok: true }));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (requestUrl.pathname === '/.well-known/oauth-protected-resource') {
|
|
25
|
+
sendJson(res, 200, {
|
|
26
|
+
resource: resourceUrl,
|
|
27
|
+
authorization_servers: [apiOrigin],
|
|
28
|
+
scopes_supported: OAUTH_SCOPES,
|
|
29
|
+
bearer_methods_supported: ['header'],
|
|
30
|
+
});
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (requestUrl.pathname === '/.well-known/oauth-authorization-server') {
|
|
34
|
+
res.writeHead(307, {
|
|
35
|
+
location: `${apiOrigin}/.well-known/oauth-authorization-server`,
|
|
36
|
+
});
|
|
37
|
+
res.end();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (requestUrl.pathname !== endpoint) {
|
|
41
|
+
sendJsonRpcError(res, 404, -32000, 'Not found');
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (req.method !== 'POST') {
|
|
45
|
+
res.setHeader('allow', 'POST');
|
|
46
|
+
sendJsonRpcError(res, 405, -32000, 'Method not allowed.');
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const accessToken = extractBearerToken(req.headers.authorization);
|
|
50
|
+
if (oauthRequired && !accessToken) {
|
|
51
|
+
sendOAuthChallenge(res, protectedResourceMetadataUrl);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const mcpServer = createMcpServer({ ...options, accessToken });
|
|
55
|
+
const transport = new StreamableHTTPServerTransport({
|
|
56
|
+
sessionIdGenerator: undefined,
|
|
57
|
+
});
|
|
58
|
+
transport.onerror = (error) => {
|
|
59
|
+
console.error('MCP HTTP transport error:', error);
|
|
60
|
+
};
|
|
61
|
+
res.on('close', () => {
|
|
62
|
+
void transport.close().catch((error) => {
|
|
63
|
+
console.error('Failed to close MCP HTTP transport:', error);
|
|
64
|
+
});
|
|
65
|
+
void mcpServer.close().catch((error) => {
|
|
66
|
+
console.error('Failed to close MCP server:', error);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
try {
|
|
70
|
+
await mcpServer.connect(transport);
|
|
71
|
+
await transport.handleRequest(req, res);
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error('Error handling MCP HTTP request:', error);
|
|
75
|
+
if (!res.headersSent) {
|
|
76
|
+
sendJsonRpcError(res, 500, -32603, 'Internal server error');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
await new Promise((resolve, reject) => {
|
|
81
|
+
httpServer.once('error', reject);
|
|
82
|
+
httpServer.listen(port, host, () => {
|
|
83
|
+
httpServer.off('error', reject);
|
|
84
|
+
resolve();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
return httpServer;
|
|
88
|
+
}
|
|
89
|
+
function getPublicOrigin(req, requestUrl) {
|
|
90
|
+
const protoHeader = req.headers['x-forwarded-proto'];
|
|
91
|
+
const forwardedProto = Array.isArray(protoHeader)
|
|
92
|
+
? protoHeader[0]
|
|
93
|
+
: protoHeader;
|
|
94
|
+
const scheme = forwardedProto ?? requestUrl.protocol.replace(':', '');
|
|
95
|
+
return `${scheme}://${req.headers.host ?? 'localhost'}`;
|
|
96
|
+
}
|
|
97
|
+
function getResourceUrl(publicOrigin, endpoint) {
|
|
98
|
+
return endpoint === '/' ? publicOrigin : `${publicOrigin}${endpoint}`;
|
|
99
|
+
}
|
|
100
|
+
function getProtectedResourceMetadataUrl(publicOrigin, endpoint) {
|
|
101
|
+
return endpoint === '/'
|
|
102
|
+
? `${publicOrigin}/.well-known/oauth-protected-resource`
|
|
103
|
+
: `${publicOrigin}/.well-known/oauth-protected-resource${endpoint}`;
|
|
104
|
+
}
|
|
105
|
+
function extractBearerToken(authorizationHeader) {
|
|
106
|
+
if (!authorizationHeader?.toLowerCase().startsWith('bearer ')) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
const token = authorizationHeader.slice('bearer '.length).trim();
|
|
110
|
+
return token || undefined;
|
|
111
|
+
}
|
|
112
|
+
function sendOAuthChallenge(res, resourceMetadataUrl) {
|
|
113
|
+
res.writeHead(401, {
|
|
114
|
+
'content-type': 'application/json',
|
|
115
|
+
'www-authenticate': `Bearer resource_metadata="${resourceMetadataUrl}", scope="${OAUTH_SCOPES.join(' ')}"`,
|
|
116
|
+
});
|
|
117
|
+
res.end(JSON.stringify({
|
|
118
|
+
error: 'unauthorized',
|
|
119
|
+
error_description: 'OAuth authentication is required.',
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
function sendJson(res, statusCode, body) {
|
|
123
|
+
res.writeHead(statusCode, { 'content-type': 'application/json' });
|
|
124
|
+
res.end(JSON.stringify(body));
|
|
125
|
+
}
|
|
126
|
+
function sendJsonRpcError(res, statusCode, code, message) {
|
|
127
|
+
res.writeHead(statusCode, { 'content-type': 'application/json' });
|
|
128
|
+
res.end(JSON.stringify({
|
|
129
|
+
jsonrpc: '2.0',
|
|
130
|
+
error: { code, message },
|
|
131
|
+
id: null,
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
135
|
+
startHttpMcpServer()
|
|
136
|
+
.then((server) => {
|
|
137
|
+
const address = server.address();
|
|
138
|
+
const listeningOn = typeof address === 'object' && address
|
|
139
|
+
? `${address.address}:${address.port}`
|
|
140
|
+
: String(address);
|
|
141
|
+
console.error(`PaPut MCP Streamable HTTP server listening on ${listeningOn}`);
|
|
142
|
+
console.error('MCP endpoint: /');
|
|
143
|
+
})
|
|
144
|
+
.catch((error) => {
|
|
145
|
+
console.error('Unexpected error:', error);
|
|
146
|
+
process.exit(1);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA,OAAO,E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C;AACJ,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACvD,kBAAkB,EAAE;SACjB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACf,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QACjC,MAAM,WAAW,GACf,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO;YACpC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE;YACtC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEtB,OAAO,CAAC,KAAK,CACX,iDAAiD,WAAW,EAAE,CAC/D,CAAC;QACF,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/server.js
CHANGED
|
@@ -5,28 +5,27 @@ import { setupTool } from './tool.js';
|
|
|
5
5
|
import { setupErrorHandling } from './utils/error-handler.js';
|
|
6
6
|
const require = createRequire(import.meta.url);
|
|
7
7
|
const packageJson = require('../package.json');
|
|
8
|
+
export function createMcpServer(options = {}) {
|
|
9
|
+
const apiKey = options.apiKey ?? process.env.PAPUT_API_KEY;
|
|
10
|
+
const accessToken = options.accessToken;
|
|
11
|
+
const apiUrl = options.apiUrl ?? process.env.PAPUT_API_URL ?? 'https://api.paput.io';
|
|
12
|
+
const server = new Server({
|
|
13
|
+
name: 'paput-mcp',
|
|
14
|
+
version: packageJson.version,
|
|
15
|
+
}, {
|
|
16
|
+
capabilities: {
|
|
17
|
+
tools: {},
|
|
18
|
+
resources: {},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
setupTool(server, apiUrl, apiKey, accessToken);
|
|
22
|
+
setupErrorHandling(server);
|
|
23
|
+
return server;
|
|
24
|
+
}
|
|
8
25
|
export class MCPServer {
|
|
9
26
|
server;
|
|
10
|
-
constructor() {
|
|
11
|
-
|
|
12
|
-
const apiKey = process.env.PAPUT_API_KEY;
|
|
13
|
-
const apiUrl = process.env.PAPUT_API_URL ?? 'https://api.paput.io';
|
|
14
|
-
if (!apiKey) {
|
|
15
|
-
throw new Error('PAPUT_API_KEY environment variable is not set');
|
|
16
|
-
}
|
|
17
|
-
// Initialize server
|
|
18
|
-
this.server = new Server({
|
|
19
|
-
name: 'paput-mcp',
|
|
20
|
-
version: packageJson.version,
|
|
21
|
-
}, {
|
|
22
|
-
capabilities: {
|
|
23
|
-
tools: {},
|
|
24
|
-
resources: {},
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
// Set up tools and error handling
|
|
28
|
-
setupTool(this.server, apiUrl, apiKey);
|
|
29
|
-
setupErrorHandling(this.server);
|
|
27
|
+
constructor(options = {}) {
|
|
28
|
+
this.server = createMcpServer(options);
|
|
30
29
|
}
|
|
31
30
|
async run() {
|
|
32
31
|
const transport = new StdioServerTransport();
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,C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E;QACxC,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,GAAG;QACP,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAE7C,SAAS,CAAC,OAAO,GAAG,CAAC,KAAc,EAAE,EAAE;YACrC,OAAO,CAAC,KAAK,CAAC,cAAc,KAAK,EAAE,CAAC,CAAC;QACvC,CAAC,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
export async function apiRequest(config, endpoint, method, body) {
|
|
2
|
+
if (!config.accessToken && !config.apiKey) {
|
|
3
|
+
throw new Error('PaPut authentication is not configured. Set PAPUT_API_KEY or connect with OAuth.');
|
|
4
|
+
}
|
|
2
5
|
const url = endpoint.startsWith('http')
|
|
3
6
|
? endpoint
|
|
4
7
|
: `${config.apiUrl}${endpoint}`;
|
|
5
8
|
const options = {
|
|
6
9
|
method,
|
|
7
10
|
headers: {
|
|
8
|
-
|
|
11
|
+
...(config.accessToken
|
|
12
|
+
? { Authorization: `Bearer ${config.accessToken}` }
|
|
13
|
+
: { 'X-API-Key': config.apiKey ?? '' }),
|
|
9
14
|
...(method !== 'GET' && method !== 'DELETE'
|
|
10
15
|
? { 'Content-Type': 'application/json' }
|
|
11
16
|
: {}),
|
|
@@ -37,8 +42,8 @@ export async function apiRequest(config, endpoint, method, body) {
|
|
|
37
42
|
return {};
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
|
-
export function createApiClient(apiUrl, apiKey) {
|
|
41
|
-
const config = { apiUrl, apiKey };
|
|
45
|
+
export function createApiClient(apiUrl, apiKey, accessToken) {
|
|
46
|
+
const config = { apiUrl, apiKey, accessToken };
|
|
42
47
|
return {
|
|
43
48
|
get: (endpoint) => apiRequest(config, endpoint, 'GET'),
|
|
44
49
|
post: (endpoint, body) => apiRequest(config, endpoint, 'POST', body),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/services/api/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/services/api/client.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAAiB,EACjB,QAAgB,EAChB,MAAkB,EAClB,IAAc;IAEd,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC;QACrC,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,QAAQ,EAAE,CAAC;IAElC,MAAM,OAAO,GAAgB;QAC3B,MAAM;QACN,OAAO,EAAE;YACP,GAAG,CAAC,MAAM,CAAC,WAAW;gBACpB,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,MAAM,CAAC,WAAW,EAAE,EAAE;gBACnD,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;YACzC,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ;gBACzC,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE;gBACxC,CAAC,CAAC,EAAE,CAAC;SACR;KACF,CAAC;IAEF,IAAI,IAAI,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACpD,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAE3C,IAAI,CAAC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,IAAI,CAAC;QAE9C,MAAM,EAAE,CAAc,QAAgB,EAAE,EAAE,CACxC,UAAU,CAAI,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC;QAE3C,OAAO,EAAE,CACP,QAAgB,EAChB,MAAkB,EAClB,IAAc,EACd,EAAE,CAAC,UAAU,CAAI,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC;KACnD,CAAC;AACJ,CAAC"}
|
package/dist/tool.js
CHANGED
|
@@ -2,8 +2,8 @@ import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSche
|
|
|
2
2
|
import { createApiClient } from './services/api/index.js';
|
|
3
3
|
import { getGeneratedInputSchema } from './schemas/tool-input.js';
|
|
4
4
|
import { createMemoTool, searchMemoTool, getMemoTool, updateMemoTool, getCategoriesTool, createNoteTool, searchNotesTool, getNoteTool, updateNoteTool, getSkillSheetTool, updateSkillSheetBasicInfoTool, updateSkillSheetSelfPrTool, setSkillSheetSkillsTool, upsertSkillSheetProjectTool, deleteSkillSheetProjectTool, cacheStatusTool, syncRemoteMemosTool, scanSessionsTool, getSessionTranscriptTool, addKnowledgeCandidatesTool, listPendingCandidatesTool, savePendingCandidateTool, discardPendingCandidateTool, } from './handlers/index.js';
|
|
5
|
-
export function setupTool(server, apiUrl, apiKey) {
|
|
6
|
-
const apiClient = createApiClient(apiUrl, apiKey);
|
|
5
|
+
export function setupTool(server, apiUrl, apiKey, accessToken) {
|
|
6
|
+
const apiClient = createApiClient(apiUrl, apiKey, accessToken);
|
|
7
7
|
const tools = getRegisteredTools();
|
|
8
8
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
9
9
|
tools: tools.map((tool) => tool.definition),
|
package/dist/tool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,yBA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,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO,CACL,cAAc,CAAC,IAAI,CAAC;QACpB,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;QAChC,IAAI,KAAK,8BAA8B,CACxC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# MCP Directory Submission Notes
|
|
2
|
+
|
|
3
|
+
This document collects public submission information for PaPut MCP.
|
|
4
|
+
|
|
5
|
+
## Server Summary
|
|
6
|
+
|
|
7
|
+
- Name: PaPut MCP
|
|
8
|
+
- Website: https://paput.io
|
|
9
|
+
- Remote MCP server URL: https://mcp.paput.io
|
|
10
|
+
- Transport: Streamable HTTP
|
|
11
|
+
- Authentication: OAuth 2.1-style authorization code with PKCE
|
|
12
|
+
- Dynamic client registration: Supported through PaPut OAuth metadata
|
|
13
|
+
- Data model: Data-only MCP server
|
|
14
|
+
- UI widgets: None
|
|
15
|
+
- Primary use: Give AI assistants controlled access to PaPut memos, notes, skill sheets, and reusable knowledge workflows
|
|
16
|
+
|
|
17
|
+
## OAuth Metadata
|
|
18
|
+
|
|
19
|
+
- Protected resource metadata: `https://mcp.paput.io/.well-known/oauth-protected-resource`
|
|
20
|
+
- Authorization server: `https://api.paput.io`
|
|
21
|
+
- Authorization server metadata: `https://api.paput.io/.well-known/oauth-authorization-server`
|
|
22
|
+
- Authorization endpoint: `https://api.paput.io/oauth/authorize`
|
|
23
|
+
- Token endpoint: `https://api.paput.io/oauth/token`
|
|
24
|
+
- Registration endpoint: `https://api.paput.io/oauth/register`
|
|
25
|
+
- Supported scopes: `paput.read`, `paput.write`
|
|
26
|
+
- Token endpoint auth method: `none`
|
|
27
|
+
- PKCE method: `S256`
|
|
28
|
+
|
|
29
|
+
## Claude Connector Preparation
|
|
30
|
+
|
|
31
|
+
Recommended listing details:
|
|
32
|
+
|
|
33
|
+
- Connector name: PaPut
|
|
34
|
+
- Description: Connect Claude to PaPut memos, notes, skill sheets, and knowledge capture workflows.
|
|
35
|
+
- Server URL: `https://mcp.paput.io`
|
|
36
|
+
- Authentication: OAuth
|
|
37
|
+
- Transport: Streamable HTTP
|
|
38
|
+
- Scopes: `paput.read paput.write`
|
|
39
|
+
- Category: Productivity, knowledge management, developer tools
|
|
40
|
+
- Data access summary: Reads and writes PaPut content only after the user authorizes access through PaPut OAuth.
|
|
41
|
+
- Safety summary: Read-only tools are annotated. Write and destructive tools require clear user intent and should be confirmed by the client.
|
|
42
|
+
|
|
43
|
+
Validation checklist:
|
|
44
|
+
|
|
45
|
+
1. Add `https://mcp.paput.io` as a remote MCP connector in Claude.
|
|
46
|
+
2. Complete the PaPut OAuth consent flow.
|
|
47
|
+
3. Confirm `tools/list` returns PaPut tools.
|
|
48
|
+
4. Call a read-only tool such as `paput_get_categories`.
|
|
49
|
+
5. Call a search tool such as `paput_search_memo` with a low `limit`.
|
|
50
|
+
6. Confirm write/destructive tools show user confirmation before execution.
|
|
51
|
+
|
|
52
|
+
## ChatGPT Developer Mode Preparation
|
|
53
|
+
|
|
54
|
+
Recommended listing details:
|
|
55
|
+
|
|
56
|
+
- App name: PaPut
|
|
57
|
+
- Remote MCP server URL: `https://mcp.paput.io`
|
|
58
|
+
- Authentication: OAuth with dynamic client registration
|
|
59
|
+
- Transport: Streamable HTTP
|
|
60
|
+
- Tool access: Full MCP tools, data-only, no UI widgets
|
|
61
|
+
- Scopes: `paput.read paput.write`
|
|
62
|
+
|
|
63
|
+
Developer Mode validation checklist:
|
|
64
|
+
|
|
65
|
+
1. Enable Developer Mode in ChatGPT settings.
|
|
66
|
+
2. Create an app for the remote MCP server URL `https://mcp.paput.io`.
|
|
67
|
+
3. Use OAuth without static credentials so dynamic client registration is exercised.
|
|
68
|
+
4. Complete the PaPut OAuth flow in the browser.
|
|
69
|
+
5. Refresh the app tools and confirm PaPut tools are listed.
|
|
70
|
+
6. Start a conversation with Developer Mode enabled and select the PaPut app.
|
|
71
|
+
7. Prompt: `Use the PaPut app to get my categories. Do not use other tools.`
|
|
72
|
+
8. Confirm `paput_get_categories` succeeds.
|
|
73
|
+
9. Prompt a write action in a test-safe way and confirm the client asks for approval before execution.
|
|
74
|
+
|
|
75
|
+
## Submission Positioning
|
|
76
|
+
|
|
77
|
+
PaPut MCP should be submitted as a data-only MCP connector. It should not request UI widget support. The connector should emphasize:
|
|
78
|
+
|
|
79
|
+
- User-owned PaPut data access through OAuth.
|
|
80
|
+
- Knowledge management and session knowledge capture.
|
|
81
|
+
- Explicit confirmation for write and destructive operations.
|
|
82
|
+
- No broad web browsing, scraping, or unrelated third-party data access.
|
|
83
|
+
|
|
84
|
+
## Public References
|
|
85
|
+
|
|
86
|
+
- Privacy Policy: `docs/privacy-policy.md`
|
|
87
|
+
- Usage Examples: `docs/usage-examples.md`
|
|
88
|
+
- Tools And Use Cases: `docs/tools.md`
|
|
89
|
+
- OpenAI ChatGPT Developer Mode documentation: https://platform.openai.com/docs/guides/developer-mode
|
|
90
|
+
- OpenAI MCP documentation: https://platform.openai.com/docs/mcp/
|
|
91
|
+
- Anthropic remote MCP connector documentation: https://support.anthropic.com/en/articles/11175166-getting-started-with-custom-integrations-using-remote-mcp
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Privacy Policy
|
|
2
|
+
|
|
3
|
+
Effective date: June 1, 2026
|
|
4
|
+
|
|
5
|
+
PaPut MCP Server connects AI assistants and MCP clients to PaPut through the Model Context Protocol. This policy explains what data is handled when you use the PaPut MCP Server.
|
|
6
|
+
|
|
7
|
+
## Data The Server Handles
|
|
8
|
+
|
|
9
|
+
Depending on the tools you use, the server may process:
|
|
10
|
+
|
|
11
|
+
- PaPut memos, notes, categories, skill sheet data, and related project metadata.
|
|
12
|
+
- OAuth access tokens or API keys used to authenticate requests to PaPut.
|
|
13
|
+
- MCP request and response metadata needed to execute tool calls.
|
|
14
|
+
- Local Claude or Codex session metadata and transcripts when you explicitly use local knowledge capture tools.
|
|
15
|
+
- Local pending knowledge candidates and cache data stored on your device.
|
|
16
|
+
|
|
17
|
+
## How Data Is Used
|
|
18
|
+
|
|
19
|
+
Data is used only to provide the MCP tools you invoke, including:
|
|
20
|
+
|
|
21
|
+
- Searching, reading, creating, and updating PaPut memos and notes.
|
|
22
|
+
- Reading and updating your PaPut skill sheet.
|
|
23
|
+
- Synchronizing PaPut memo metadata into a local cache for duplicate detection.
|
|
24
|
+
- Scanning local AI session logs and preparing reusable knowledge candidates.
|
|
25
|
+
- Completing OAuth authorization and token-based requests to the PaPut API.
|
|
26
|
+
|
|
27
|
+
## Authentication
|
|
28
|
+
|
|
29
|
+
Remote MCP connections use OAuth. PaPut issues tokens after you sign in and approve the requested scopes. The MCP server receives bearer tokens on requests and forwards them to the PaPut API. The MCP server does not intentionally persist OAuth access tokens.
|
|
30
|
+
|
|
31
|
+
Local stdio usage may use a PaPut API key provided through environment variables. You are responsible for keeping API keys and local configuration files private.
|
|
32
|
+
|
|
33
|
+
## Local Data
|
|
34
|
+
|
|
35
|
+
When local knowledge capture features are used, PaPut MCP may store cache files under `~/.paput` or a configured cache directory. This local data can include synced memo summaries, pending knowledge candidates, processed session markers, and session metadata. It remains on your device unless you choose to save a pending candidate to PaPut.
|
|
36
|
+
|
|
37
|
+
## Logging
|
|
38
|
+
|
|
39
|
+
Hosted infrastructure and MCP clients may record operational logs such as request timestamps, status codes, errors, and connection metadata. Logs are used for reliability, troubleshooting, abuse prevention, and security. The server is designed not to log API keys, OAuth tokens, or full private content intentionally.
|
|
40
|
+
|
|
41
|
+
## Sharing
|
|
42
|
+
|
|
43
|
+
PaPut MCP does not sell personal data. Data may be processed by PaPut infrastructure providers only as needed to operate the service. Data may also be disclosed if required by law or to protect the security and integrity of PaPut, users, or the service.
|
|
44
|
+
|
|
45
|
+
## User Control
|
|
46
|
+
|
|
47
|
+
You can:
|
|
48
|
+
|
|
49
|
+
- Revoke OAuth access from PaPut account settings when available.
|
|
50
|
+
- Remove local MCP configuration from your client.
|
|
51
|
+
- Delete local cache data stored under `~/.paput` or your configured cache directory.
|
|
52
|
+
- Delete or update PaPut content using PaPut or authorized MCP tools.
|
|
53
|
+
|
|
54
|
+
## Security
|
|
55
|
+
|
|
56
|
+
PaPut MCP uses OAuth for remote access and supports read/write tool annotations so clients can request user confirmation for write or destructive actions. You should review tool calls before approving actions that create, update, delete, publish, or discard data.
|
|
57
|
+
|
|
58
|
+
## Contact
|
|
59
|
+
|
|
60
|
+
For privacy questions, use the contact method provided on https://paput.io.
|
package/docs/tools.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Tools And Use Cases
|
|
2
|
+
|
|
3
|
+
PaPut MCP is a data-only MCP server. It exposes tools and resources for PaPut data. It does not provide UI widgets.
|
|
4
|
+
|
|
5
|
+
## Confirmation Policy
|
|
6
|
+
|
|
7
|
+
Clients and assistants should follow these rules:
|
|
8
|
+
|
|
9
|
+
- Read-only tools may be used when they are relevant to the user's request.
|
|
10
|
+
- Create, update, save, publish, discard, and delete tools should be used only when the user's intent is clear.
|
|
11
|
+
- Destructive tools require explicit confirmation before execution.
|
|
12
|
+
- `paput_save_pending_candidate` requires explicit user approval because it creates a PaPut memo from a local pending candidate.
|
|
13
|
+
- `paput_delete_skill_sheet_project` should be used only when the user clearly intends to remove a project.
|
|
14
|
+
- `paput_set_skill_sheet_skills` replaces the full skill list and should be used only when the complete desired final list is known.
|
|
15
|
+
- `paput_discard_pending_candidate` removes a pending item from the save flow and should be confirmed when the candidate may still be useful.
|
|
16
|
+
- Update and upsert tools should preserve existing data unless the user requested the change.
|
|
17
|
+
|
|
18
|
+
## Memo Tools
|
|
19
|
+
|
|
20
|
+
| Tool | Safety | Use case |
|
|
21
|
+
| ---------------------- | ----------------- | -------------------------------------------------------------------------------- |
|
|
22
|
+
| `paput_create_memo` | Write | Create a PaPut memo when the user explicitly asks to save content directly. |
|
|
23
|
+
| `paput_search_memo` | Read-only | Search memos by keyword, category, IDs, date, visibility, or pagination. |
|
|
24
|
+
| `paput_get_memo` | Read-only | Read the full details of a memo by ID. |
|
|
25
|
+
| `paput_update_memo` | Destructive/write | Update an existing memo title, body, visibility, categories, or linked projects. |
|
|
26
|
+
| `paput_get_categories` | Read-only | List categories before assigning categories or checking duplicates. |
|
|
27
|
+
|
|
28
|
+
## Note Tools
|
|
29
|
+
|
|
30
|
+
| Tool | Safety | Use case |
|
|
31
|
+
| -------------------- | ----------------- | ------------------------------------------------------ |
|
|
32
|
+
| `paput_create_note` | Write | Create a note that groups existing memo IDs. |
|
|
33
|
+
| `paput_search_notes` | Read-only | Search notes by keyword, visibility, and pagination. |
|
|
34
|
+
| `paput_get_note` | Read-only | Read a note and its attached memos. |
|
|
35
|
+
| `paput_update_note` | Destructive/write | Update a note title, visibility, or attached memo IDs. |
|
|
36
|
+
|
|
37
|
+
## Skill Sheet Tools
|
|
38
|
+
|
|
39
|
+
| Tool | Safety | Use case |
|
|
40
|
+
| ------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------ |
|
|
41
|
+
| `paput_get_skill_sheet` | Read-only | Read the user's PaPut skill sheet. |
|
|
42
|
+
| `paput_update_skill_sheet_basic_info` | Destructive/write | Update profile fields such as nearest station, gender, birth date, or years of experience. |
|
|
43
|
+
| `paput_update_skill_sheet_self_pr` | Destructive/write | Update the self PR section. |
|
|
44
|
+
| `paput_set_skill_sheet_skills` | Destructive/write | Replace the full skill list with a known final state. |
|
|
45
|
+
| `paput_upsert_skill_sheet_project` | Destructive/write | Add or update a skill sheet project by ID or exact title match. |
|
|
46
|
+
| `paput_delete_skill_sheet_project` | Destructive | Delete a skill sheet project by ID. |
|
|
47
|
+
|
|
48
|
+
## Knowledge Capture And Local Cache Tools
|
|
49
|
+
|
|
50
|
+
| Tool | Safety | Use case |
|
|
51
|
+
| --------------------------------- | ---------------------------- | ----------------------------------------------------------------------------- |
|
|
52
|
+
| `paput_cache_status` | Read-only | Inspect local cache, pending candidates, processed sessions, and sync status. |
|
|
53
|
+
| `paput_sync_remote_memos` | Write to local cache | Sync existing PaPut memos into the local cache for duplicate detection. |
|
|
54
|
+
| `paput_scan_sessions` | Read-only | Scan local Claude and Codex session logs for reusable knowledge sources. |
|
|
55
|
+
| `paput_get_session_transcript` | Read-only | Read a selected local Claude or Codex session transcript. |
|
|
56
|
+
| `paput_add_knowledge_candidates` | Write to local pending queue | Add extracted reusable knowledge candidates before they are saved to PaPut. |
|
|
57
|
+
| `paput_list_pending_candidates` | Read-only | List pending candidates for review. |
|
|
58
|
+
| `paput_save_pending_candidate` | Write | Save an approved pending candidate as a PaPut memo. |
|
|
59
|
+
| `paput_discard_pending_candidate` | Destructive local action | Remove a pending candidate from the save flow. |
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Usage Examples
|
|
2
|
+
|
|
3
|
+
These examples show typical ways to use PaPut MCP from an AI assistant.
|
|
4
|
+
|
|
5
|
+
## 1. Search Existing Memos Before Creating Knowledge
|
|
6
|
+
|
|
7
|
+
Prompt:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
Search my PaPut memos for existing notes about OAuth dynamic client registration before creating a new knowledge candidate.
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Expected tool flow:
|
|
14
|
+
|
|
15
|
+
1. `paput_search_memo`
|
|
16
|
+
2. `paput_add_knowledge_candidates` only when no duplicate or near-duplicate exists
|
|
17
|
+
3. `paput_list_pending_candidates` when the user wants to review pending items
|
|
18
|
+
|
|
19
|
+
Use case: avoid duplicate long-term knowledge while preserving useful decisions from engineering work.
|
|
20
|
+
|
|
21
|
+
## 2. Capture Reusable Knowledge From A Codex Session
|
|
22
|
+
|
|
23
|
+
Prompt:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Scan recent Codex sessions, find the OAuth implementation session, and extract reusable knowledge candidates.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Expected tool flow:
|
|
30
|
+
|
|
31
|
+
1. `paput_scan_sessions`
|
|
32
|
+
2. `paput_get_session_transcript`
|
|
33
|
+
3. `paput_add_knowledge_candidates`
|
|
34
|
+
|
|
35
|
+
Use case: turn completed development work into reviewable knowledge without immediately publishing it to PaPut.
|
|
36
|
+
|
|
37
|
+
## 3. Save An Approved Pending Candidate
|
|
38
|
+
|
|
39
|
+
Prompt:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Review my pending PaPut knowledge candidates and save the OAuth metadata candidate if it is not a duplicate.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Expected tool flow:
|
|
46
|
+
|
|
47
|
+
1. `paput_list_pending_candidates`
|
|
48
|
+
2. `paput_search_memo`
|
|
49
|
+
3. `paput_save_pending_candidate` only after explicit user approval
|
|
50
|
+
|
|
51
|
+
Use case: keep the user in control before creating a permanent PaPut memo.
|
|
52
|
+
|
|
53
|
+
## 4. Update A Skill Sheet Project
|
|
54
|
+
|
|
55
|
+
Prompt:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Update my PaPut skill sheet project for the MCP server work with the latest technologies and responsibilities.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Expected tool flow:
|
|
62
|
+
|
|
63
|
+
1. `paput_get_skill_sheet`
|
|
64
|
+
2. `paput_upsert_skill_sheet_project`
|
|
65
|
+
3. `paput_get_skill_sheet` to verify the final result
|
|
66
|
+
|
|
67
|
+
Use case: maintain an accurate skill sheet after project milestones.
|
|
68
|
+
|
|
69
|
+
## 5. Organize Memos Into A Note
|
|
70
|
+
|
|
71
|
+
Prompt:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
Find my MCP-related memos and create a PaPut note that groups the most relevant ones.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Expected tool flow:
|
|
78
|
+
|
|
79
|
+
1. `paput_search_memo`
|
|
80
|
+
2. `paput_create_note`
|
|
81
|
+
3. `paput_get_note` to verify attached memo IDs
|
|
82
|
+
|
|
83
|
+
Use case: create curated collections from existing PaPut memos.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paput-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "PaPut MCP Server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"test": "vitest run",
|
|
13
13
|
"start": "node dist/index.js",
|
|
14
|
+
"start:http": "node dist/http.js",
|
|
14
15
|
"dev": "ts-node --esm src/index.ts",
|
|
16
|
+
"dev:http": "ts-node --esm src/http.ts",
|
|
17
|
+
"check:http": "ts-node --esm src/check-http.ts",
|
|
18
|
+
"test:mcp:transports": "vitest run src/transport.test.ts",
|
|
15
19
|
"prepare": "npm run build",
|
|
16
20
|
"format": "prettier --write .",
|
|
17
21
|
"type-check": "tsc --noEmit"
|
|
@@ -28,6 +32,7 @@
|
|
|
28
32
|
"homepage": "https://paput.io",
|
|
29
33
|
"files": [
|
|
30
34
|
"dist",
|
|
35
|
+
"docs",
|
|
31
36
|
"README.md",
|
|
32
37
|
"LICENSE.txt"
|
|
33
38
|
],
|