togello-mcp-server 1.0.33 → 1.0.34

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 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 redirects OAuth authorization server metadata discovery paths at `/.well-known/oauth-authorization-server` and `/.well-known/oauth-authorization-server/mcp` to the Togello OAuth issuer configured with `TOGELLO_OAUTH_ISSUER` or `TOGELLO_API_BASE_URL`.
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
 
@@ -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 authorizationServerMetadataUrl = `${oauthIssuer}${authorizationServerMetadataPath}`;
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
- writeRedirectResponse(res, authorizationServerMetadataUrl);
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "togello-mcp-server",
4
- "version": "1.0.33",
4
+ "version": "1.0.34",
5
5
  "description": "MCP server for Togello tasks, calendar memos, calendar events, and activity logs.",
6
6
  "main": "build/index.js",
7
7
  "scripts": {