togello-mcp-server 1.0.33 → 1.0.35
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 +1 -1
- package/build/handlers/tool/updateTaskHandler.js +5 -2
- package/build/mcpServer.js +4 -0
- package/build/remoteServer.js +15 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ https://your-domain.example/mcp
|
|
|
51
51
|
|
|
52
52
|
ChatGPT developer mode can add remote MCP servers that use SSE. For production ChatGPT apps or connectors, use `passthrough` auth or a deployment that authenticates each user separately before forwarding requests to Togello.
|
|
53
53
|
|
|
54
|
-
Remote mode
|
|
54
|
+
Remote mode serves OAuth authorization server metadata from `/.well-known/oauth-authorization-server` and `/.well-known/oauth-authorization-server/mcp` using the Togello OAuth issuer configured with `TOGELLO_OAUTH_ISSUER` or `TOGELLO_API_BASE_URL`.
|
|
55
55
|
|
|
56
56
|
Remote OAuth clients that connect to `/mcp` should discover protected resource metadata at `/.well-known/oauth-protected-resource/mcp`. That metadata returns `resource` as the full MCP endpoint URL, such as `https://your-domain.example/mcp`. Unauthenticated `/mcp` requests include a `WWW-Authenticate` challenge whose `resource_metadata` value points to that `/mcp` metadata path.
|
|
57
57
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { httpClient } from '../../client.js';
|
|
2
2
|
import { errorToolResponse, jsonToolResponse } from './toolResponse.js';
|
|
3
|
-
export const updateTaskHandler = async ({ todoUUID, isCompleted, status, scheduledStartDate, scheduledEndDate, url, detail, }) => {
|
|
3
|
+
export const updateTaskHandler = async ({ todoUUID, taskName, isCompleted, status, scheduledStartDate, scheduledEndDate, url, detail, }) => {
|
|
4
4
|
try {
|
|
5
|
-
if (
|
|
5
|
+
if (taskName === undefined &&
|
|
6
|
+
isCompleted === undefined &&
|
|
6
7
|
status === undefined &&
|
|
7
8
|
scheduledStartDate === undefined &&
|
|
8
9
|
scheduledEndDate === undefined &&
|
|
@@ -16,6 +17,7 @@ export const updateTaskHandler = async ({ todoUUID, isCompleted, status, schedul
|
|
|
16
17
|
await httpClient.putJson({
|
|
17
18
|
path: `/v2/integration/todo/${encodeURIComponent(todoUUID)}`,
|
|
18
19
|
body: {
|
|
20
|
+
label: taskName,
|
|
19
21
|
isCompleted,
|
|
20
22
|
status,
|
|
21
23
|
scheduledStartDate,
|
|
@@ -26,6 +28,7 @@ export const updateTaskHandler = async ({ todoUUID, isCompleted, status, schedul
|
|
|
26
28
|
});
|
|
27
29
|
return jsonToolResponse({
|
|
28
30
|
todoUUID,
|
|
31
|
+
taskName,
|
|
29
32
|
isCompleted,
|
|
30
33
|
status,
|
|
31
34
|
updated: true,
|
package/build/mcpServer.js
CHANGED
|
@@ -93,6 +93,10 @@ export function createMcpServer(options = {}) {
|
|
|
93
93
|
.string()
|
|
94
94
|
.uuid()
|
|
95
95
|
.describe('Task UUID. Please specify the task uuid (todo uuid) obtained from get-tasks-list. You cannot use this tool without specifying it.'),
|
|
96
|
+
taskName: z
|
|
97
|
+
.string()
|
|
98
|
+
.optional()
|
|
99
|
+
.describe('Optional task name. If omitted, the current task name is kept.'),
|
|
96
100
|
isCompleted: z
|
|
97
101
|
.boolean()
|
|
98
102
|
.optional()
|
package/build/remoteServer.js
CHANGED
|
@@ -33,7 +33,7 @@ export async function startRemoteServer(options) {
|
|
|
33
33
|
const mcpResourceUrl = `${publicBaseUrl}${mcpPath}`;
|
|
34
34
|
const mcpProtectedResourceMetadataPath = `${protectedResourceMetadataPath}${mcpPath}`;
|
|
35
35
|
const mcpProtectedResourceMetadataUrl = `${publicBaseUrl}${mcpProtectedResourceMetadataPath}`;
|
|
36
|
-
const
|
|
36
|
+
const authorizationServerMetadata = buildAuthorizationServerMetadata(oauthIssuer);
|
|
37
37
|
const authorizationServerMetadataPaths = new Set([
|
|
38
38
|
authorizationServerMetadataPath,
|
|
39
39
|
`${authorizationServerMetadataPath}${mcpPath}`,
|
|
@@ -87,7 +87,7 @@ export async function startRemoteServer(options) {
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
if (req.method === 'GET') {
|
|
90
|
-
|
|
90
|
+
writeJsonResponse(res, authorizationServerMetadata);
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -288,6 +288,19 @@ function validatePathlessOAuthIssuer(oauthIssuer) {
|
|
|
288
288
|
throw new Error(`Remote OAuth issuer must not include a path: ${oauthIssuer}`);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
+
function buildAuthorizationServerMetadata(oauthIssuer) {
|
|
292
|
+
return {
|
|
293
|
+
issuer: oauthIssuer,
|
|
294
|
+
authorization_endpoint: `${oauthIssuer}/oauth/authorize`,
|
|
295
|
+
token_endpoint: `${oauthIssuer}/oauth/token`,
|
|
296
|
+
registration_endpoint: `${oauthIssuer}/oauth/register`,
|
|
297
|
+
scopes_supported: supportedScopes,
|
|
298
|
+
response_types_supported: ['code'],
|
|
299
|
+
grant_types_supported: ['authorization_code', 'refresh_token'],
|
|
300
|
+
code_challenge_methods_supported: ['S256'],
|
|
301
|
+
token_endpoint_auth_methods_supported: ['none', 'client_secret_post'],
|
|
302
|
+
};
|
|
303
|
+
}
|
|
291
304
|
function writeJsonResponse(res, body) {
|
|
292
305
|
res.writeHead(200, {
|
|
293
306
|
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
|
@@ -298,14 +311,6 @@ function writeJsonResponse(res, body) {
|
|
|
298
311
|
});
|
|
299
312
|
res.end(JSON.stringify(body));
|
|
300
313
|
}
|
|
301
|
-
function writeRedirectResponse(res, location) {
|
|
302
|
-
res.writeHead(302, {
|
|
303
|
-
...authorizationServerMetadataCorsHeaders,
|
|
304
|
-
'Cache-Control': 'no-store',
|
|
305
|
-
Location: location,
|
|
306
|
-
});
|
|
307
|
-
res.end();
|
|
308
|
-
}
|
|
309
314
|
function writeAuthorizationServerMetadataOptionsResponse(res) {
|
|
310
315
|
res.writeHead(204, authorizationServerMetadataCorsHeaders);
|
|
311
316
|
res.end();
|
package/package.json
CHANGED