inistate-mcp 1.3.3 → 1.3.5

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.
@@ -1,4 +1,5 @@
1
1
  import express from "express";
2
+ import { PAGE_HEADERS, renderConfirmPage, renderExpiredPage, renderWrongBrowserPage } from "./authorize-pages.js";
2
3
  import { browserSecretCookieName, browserSecretCookieOptions, readCookie, } from "./oauth-provider.js";
3
4
  /**
4
5
  * SS06370: the Inistate App approves a flow natively (no cookie), then hands the user to the
@@ -9,29 +10,20 @@ import { browserSecretCookieName, browserSecretCookieOptions, readCookie, } from
9
10
  * GET /authorize/finish the browser: confirmation page (cookie + token)
10
11
  * POST /authorize/finish the browser: Confirm -> 302 to the client with the code
11
12
  */
12
- const escapeHtml = (s) => s.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
13
- function page(res, status, title, body) {
14
- res
15
- .status(status)
16
- .set({
17
- "Content-Type": "text/html; charset=utf-8",
18
- "Cache-Control": "no-store",
19
- "Referrer-Policy": "no-referrer",
20
- // The Confirm button must not be clickjackable from another origin.
21
- "X-Frame-Options": "DENY",
22
- "Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'",
23
- })
24
- .send(`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">` +
25
- `<title>${escapeHtml(title)}</title><style>body{font:16px system-ui,sans-serif;max-width:28rem;margin:3rem auto;padding:0 1rem}` +
26
- `button{font:inherit;padding:.6rem 1.2rem}</style></head><body>${body}</body></html>`);
13
+ function sendPage(res, status, html) {
14
+ res.status(status).set(PAGE_HEADERS).send(html);
27
15
  }
28
16
  function failure(res, error) {
29
17
  const message = error instanceof Error ? error.message : "Authorization failed";
30
18
  if (/does not belong to this browser|Invalid finish token/.test(message)) {
31
- page(res, 400, "Open this link in the original browser", `<h1>Open this link in the original browser</h1><p>Finish connecting in the same browser where you started from ChatGPT or Claude, then try again.</p>`);
32
- return;
19
+ sendPage(res, 400, renderWrongBrowserPage());
20
+ }
21
+ else if (/expired|Invalid or expired/i.test(message)) {
22
+ sendPage(res, 400, renderExpiredPage());
23
+ }
24
+ else {
25
+ res.status(400).type("text/plain").send(message);
33
26
  }
34
- res.status(400).type("text/plain").send(message);
35
27
  }
36
28
  export function registerAppAuthorizeRoutes(app, provider, issuerUrl) {
37
29
  const secure = issuerUrl.startsWith("https:");
@@ -62,13 +54,7 @@ export function registerAppAuthorizeRoutes(app, provider, issuerUrl) {
62
54
  const token = String(req.query.token ?? "");
63
55
  const cookie = readCookie(req.headers.cookie, browserSecretCookieName(nonce));
64
56
  const info = provider.getFinishInfo(nonce, token, cookie);
65
- page(res, 200, "Confirm connection", `<h1>Connect ${escapeHtml(info.clientName || "this app")}?</h1>` +
66
- `<p>It will act as <strong>${escapeHtml(info.account)}</strong> in Inistate.</p>` +
67
- `<p>Only continue if you just started this from ChatGPT or Claude.</p>` +
68
- `<form method="post" action="/authorize/finish">` +
69
- `<input type="hidden" name="nonce" value="${escapeHtml(nonce)}">` +
70
- `<input type="hidden" name="token" value="${escapeHtml(token)}">` +
71
- `<button type="submit">Confirm</button></form>`);
57
+ sendPage(res, 200, renderConfirmPage({ ...info, nonce, token }));
72
58
  }
73
59
  catch (error) {
74
60
  failure(res, error);
@@ -0,0 +1,24 @@
1
+ /**
2
+ * SS06370: the pages the browser shows while finishing an App-approved authorization.
3
+ * Pure rendering - no Express, no provider - so wording, layout and styling live in one file
4
+ * and are easy to change. authorize-app-routes.ts decides WHICH page to send.
5
+ */
6
+ export declare const escapeHtml: (s: string) => string;
7
+ /** Headers for every page: no caching, no referrer, not frameable (Confirm must not be clickjackable). */
8
+ export declare const PAGE_HEADERS: Record<string, string>;
9
+ export interface ConfirmPageInput {
10
+ /** The self-chosen (dynamic client registration) name; untrusted display text. */
11
+ clientName: string;
12
+ /** Backend-verified account the connection will act as. */
13
+ account: string;
14
+ /** Where the authorization code will be returned. */
15
+ redirectUri: string;
16
+ nonce: string;
17
+ token: string;
18
+ }
19
+ /** The page the user lands on after approving in the App: who connects, as whom, and Confirm. */
20
+ export declare function renderConfirmPage(input: ConfirmPageInput): string;
21
+ /** The link was opened in a browser that did not start the flow (no cookie) or with the wrong token. */
22
+ export declare function renderWrongBrowserPage(): string;
23
+ /** The flow is gone: already confirmed, timed out, or never existed. */
24
+ export declare function renderExpiredPage(): string;
@@ -0,0 +1,110 @@
1
+ import { createHash } from "node:crypto";
2
+ import { clientLogoForRedirect } from "./client-logos.js";
3
+ import { INISTATE_LOGO_SVG } from "./inistate-logo.js";
4
+ /**
5
+ * SS06370: the pages the browser shows while finishing an App-approved authorization.
6
+ * Pure rendering - no Express, no provider - so wording, layout and styling live in one file
7
+ * and are easy to change. authorize-app-routes.ts decides WHICH page to send.
8
+ */
9
+ /* ------------------------------------------------------------------ */
10
+ /* Escaping */
11
+ /* ------------------------------------------------------------------ */
12
+ export const escapeHtml = (s) => s.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
13
+ /** Escaped text that may wrap after an "@", so an email breaks at a sensible place on a narrow screen. */
14
+ const breakable = (s) => escapeHtml(s).replace(/@/g, "@<wbr>");
15
+ /* ------------------------------------------------------------------ */
16
+ /* Security headers */
17
+ /* ------------------------------------------------------------------ */
18
+ /**
19
+ * A second tap on Confirm used to burn the flow: the first POST had already issued the code
20
+ * and consumed the nonce, so the retry could only say "expired". Disable the button on submit.
21
+ * Inline, so the CSP carries its hash instead of allowing scripts in general.
22
+ */
23
+ const SUBMIT_SCRIPT = "document.addEventListener('submit',function(e){var b=e.target.querySelector('button');if(b){b.disabled=true;b.textContent='Connecting\\u2026'}})";
24
+ const SUBMIT_SCRIPT_HASH = `'sha256-${createHash("sha256").update(SUBMIT_SCRIPT).digest("base64")}'`;
25
+ // No form-action here: Chrome also applies it to the redirect that follows the POST, and the
26
+ // whole point of Confirm is to redirect to the client's own origin, so 'self' blocked it and
27
+ // "nothing happened". Everything interpolated into a page is escaped, so nothing here can be
28
+ // steered into posting elsewhere.
29
+ const CSP = `default-src 'none'; style-src 'unsafe-inline'; script-src ${SUBMIT_SCRIPT_HASH}; img-src data:; frame-ancestors 'none'`;
30
+ /** Headers for every page: no caching, no referrer, not frameable (Confirm must not be clickjackable). */
31
+ export const PAGE_HEADERS = {
32
+ "Content-Type": "text/html; charset=utf-8",
33
+ "Cache-Control": "no-store",
34
+ "Referrer-Policy": "no-referrer",
35
+ "X-Frame-Options": "DENY",
36
+ "Content-Security-Policy": CSP,
37
+ };
38
+ /* ------------------------------------------------------------------ */
39
+ /* Look */
40
+ /* ------------------------------------------------------------------ */
41
+ // Palette from the web app (webApp src/assets/scss/colors.scss): primary #2b9ec6, green #a4ce3a.
42
+ // The button uses a darker shade of the primary because white on #2b9ec6 is only ~3:1.
43
+ const STYLE = `
44
+ :root{color-scheme:light dark;--bg:#f4f8fa;--card:#fff;--fg:#212121;--muted:#5f6b72;--line:#e6e6e6;--brand:#2b9ec6;--green:#a4ce3a;--btn:#1d7fa3;--btn-hover:#18698a;--btn-fg:#fff;--warn-bg:#fff6e8;--warn-line:#f3d19e}
45
+ @media (prefers-color-scheme:dark){:root{--bg:#121a1e;--card:#1b252b;--fg:#eef3f5;--muted:#a2b0b8;--line:#2d3b43;--btn:#2b9ec6;--btn-hover:#4db3d6;--btn-fg:#06161c;--warn-bg:#2b2516;--warn-line:#5a4a1e}}
46
+ *{box-sizing:border-box}
47
+ html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
48
+ body{margin:0;min-height:100vh;min-height:100dvh;display:flex;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:var(--bg);color:var(--fg);font:16px/1.5 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
49
+ main{position:relative;margin:auto;width:100%;max-width:26rem;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:32px 24px 28px;overflow:hidden;box-shadow:0 2px 12px rgba(16,40,52,.08)}
50
+ main::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(to right,var(--brand),var(--green))}
51
+ .pair{display:flex;align-items:center;gap:12px;margin:0 0 16px}
52
+ .logo{display:block;width:44px;height:44px;border-radius:10px}.logo svg{display:block;width:100%;height:100%}
53
+ .link{color:var(--muted);font-size:1.2rem;line-height:1}
54
+ .where{font-size:.9rem}.where strong{color:var(--fg);font-weight:600;overflow-wrap:anywhere}
55
+ h1{margin:0 0 6px;font-size:1.3rem;line-height:1.3;text-wrap:balance}
56
+ p{margin:0 0 14px;color:var(--muted)}
57
+ .account{margin:16px 0;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:10px;overflow-wrap:anywhere}
58
+ .account small{display:block;color:var(--muted);font-size:.8rem;margin-bottom:2px}
59
+ .account strong{color:var(--fg);font-weight:600}
60
+ .note{padding:10px 12px;border-radius:10px;background:var(--warn-bg);border:1px solid var(--warn-line);color:var(--fg);font-size:.9rem;margin:0 0 18px}
61
+ button{width:100%;min-height:48px;padding:12px 16px;border:0;border-radius:10px;background:var(--btn);color:var(--btn-fg);font:inherit;font-weight:600;cursor:pointer}
62
+ button:hover:not(:disabled){background:var(--btn-hover)}
63
+ button:disabled{opacity:.6;cursor:default}
64
+ button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
65
+ @media (max-width:400px){main{padding:28px 20px 24px}h1{font-size:1.2rem}.pair{margin-bottom:14px}}
66
+ @media (max-height:480px){main{padding-top:24px}.pair{margin-bottom:10px}}
67
+ `;
68
+ const INISTATE_MARK = `<span class="logo">${INISTATE_LOGO_SVG}</span>`;
69
+ /** The shared shell: head, card, logos row, body. */
70
+ function layout(title, body, header = INISTATE_MARK) {
71
+ return (`<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">` +
72
+ `<title>${escapeHtml(title)}</title><style>${STYLE}</style></head><body><main><div class="pair">${header}</div>${body}</main>` +
73
+ `<script>${SUBMIT_SCRIPT}</script></body></html>`);
74
+ }
75
+ /** The page the user lands on after approving in the App: who connects, as whom, and Confirm. */
76
+ export function renderConfirmPage(input) {
77
+ // A logo and a verified name only when the code is going to that service's own host;
78
+ // otherwise the self-chosen client name is all there is, and the host is shown plainly.
79
+ const brand = clientLogoForRedirect(input.redirectUri);
80
+ const label = brand?.name ?? (input.clientName || "this app");
81
+ let host = "";
82
+ try {
83
+ host = new URL(input.redirectUri).host;
84
+ }
85
+ catch {
86
+ /* shown without a host */
87
+ }
88
+ const header = (brand
89
+ ? `<img class="logo" src="${brand.logo}" alt="${escapeHtml(brand.name)}"><span class="link" aria-hidden="true">&#8644;</span>`
90
+ : "") + INISTATE_MARK;
91
+ return layout("Confirm connection", `<h1>Connect ${escapeHtml(label)} to Inistate?</h1>` +
92
+ `<p>It will be able to work in Inistate as this account:</p>` +
93
+ `<div class="account"><small>Signed in as</small><strong>${breakable(input.account)}</strong></div>` +
94
+ (host ? `<p class="where">After you confirm, you'll be sent back to <strong>${escapeHtml(host)}</strong>.</p>` : "") +
95
+ `<p class="note">Only continue if you just started this from ChatGPT or Claude. If someone sent you this link, close this page.</p>` +
96
+ `<form method="post" action="/authorize/finish">` +
97
+ `<input type="hidden" name="nonce" value="${escapeHtml(input.nonce)}">` +
98
+ `<input type="hidden" name="token" value="${escapeHtml(input.token)}">` +
99
+ `<button type="submit">Confirm</button></form>`, header);
100
+ }
101
+ /** The link was opened in a browser that did not start the flow (no cookie) or with the wrong token. */
102
+ export function renderWrongBrowserPage() {
103
+ return layout("Open this link in the original browser", `<h1>Open this link in the original browser</h1>` +
104
+ `<p>Finish connecting in the same browser where you started from ChatGPT or Claude, then try again.</p>`);
105
+ }
106
+ /** The flow is gone: already confirmed, timed out, or never existed. */
107
+ export function renderExpiredPage() {
108
+ return layout("This link has expired", `<h1>This link has expired</h1>` +
109
+ `<p>It may already have been used. Go back to ChatGPT or Claude and start connecting again.</p>`);
110
+ }
@@ -0,0 +1,5 @@
1
+ /** The logo for a redirect URI, only when its host is exactly (or a subdomain of) a known one. */
2
+ export declare function clientLogoForRedirect(redirectUri: string): {
3
+ name: string;
4
+ logo: string;
5
+ } | undefined;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Logos for the MCP clients people connect from, shown on the finish page (SS06370).
3
+ *
4
+ * Chosen by the host the authorization code will be returned to, never by the client name:
5
+ * the name comes from dynamic client registration and anyone can call their client "Claude".
6
+ * The redirect host is where the code actually goes, so a logo here means the code is going
7
+ * to that service. 96px copies of the vendors' app icons, inlined (the page needs no image
8
+ * requests beyond data: URIs).
9
+ */
10
+ const CHATGPT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA9jSURBVHhe7Z0HkBVFE4AFc06ogAEw6ymYI2BWgiDJLOacSkEBMSsUpjJnBLOihF9UBFOVivAbyoSYM8GICua7Y3v++vZnn/t6w9swe5z4vqqugtvZ2d3u3Znpnp55iy2WA2NMk9ra2hoR6SsiQx3HGSUiT4nIZBGZKiJTFhHhWXgmno1nHLrgmWvQgdZL4YhI2wU3MU1EHPMvRf4POkAX7bSerFNXV9deRMZxVX0zVVyD/Keurq6D1ltujDHNRWS4vmCVcBzHGYHOtB4zISKdRGSmvkiVeERkloh00fpMhYj00xVXSYeI9Nd6TYTjOEN0ZVWyQSet9RvL/PnzB+pKquRmkNZzKCLSU59ZxQ4i0lvruwwRaSUiP+sTq1hjrjGmtdZ7CcdxntJnVLGLiEzUencRkW66cJViqK+v71GmfOIZIvKGLlilGETkrbIYkojspws1JubPn2+++eYb88EHH5jp06ebTz75xHz33Xe62D8KEens/wIe1QUWNh9//LG54YYbTM+ePc1GG21kVlxxRcOtIosvvrhZZZVVzOabb24OOeQQc+edd5pZs2bpKho1IjLGU34zEflFF1hYvPDCC6ZHjx5m6aWXLik8iay00kqmb9++5q23+LobPyLyK7pfrL6+vlF0vjNnzjSHHnpoQLFpha/jzDPPNL/80mjeqUjQPUPPq/WBhmbChAmmefPmAWXmEZqnxv41oHs64An6QEMyfPjwgPL8su6665qDDz7YDB061Nx///1mzJgx5t577zWXXnqp21StscYagXM8od947rnn9CUbDeieL2C6PtBQoEitNE86duxoxo4da379laYymjlz5pgRI0aYdu3aBepAll9+eXPBBReYY4891uy7775m5513Nh06dDDdu3c3p5xyivsCLKwvBd3zBczQBxqCqVOnuu21Vhijm5EjR+riFamvrzc33nijWXPNNQN1JpHtttvOXHnlleaHH37QVRcGuscAc/SBouGtbtOmTUAJG2+8sXnvvfd08cR8//33ZpdddgnUm0boi6644grX9ygadI8BGjz4NnDgwMCDt27d2h0JZQGDXnzxxWW+Ql7ZaaedzDvvvKMvZRV0jwF+0geKBCUvu+yyZQ+71FJLmTfeyBYJeeCBB1xHTSvQL02bNjUbbLCB2XPPPU3v3r1d5659+/Zm7bXXDpT1C74FI7SiQPcNboDzzz8/8KCXX365LlaRKVOmuArVdfmFjvmaa65xm7W6ujpdhfvlTJ482fTr1y+y78B448eP16daocEN8OGHH5r11luv7AHXWWcd88cff+iikfAFnXDCCQFF+WXDDTc0d999d6p2nNjSOeecE6gL4Yt97bXX9Cm5aRADENNhzL7NNtuYJZdcMvBwHEvCX3/9Za666iqz2mqrBerwZIUVVjCXXHJJLi/42WefDf0a1l9/ffPbb7/p4rko1AAzZswwJ598cqC99wuf97vvvqtPDTBu3DizxRZbBM73y+GHH+5GSW3w/vvvm5YtWwaucfrpp+uiuSjMAHz+zZo1CzyAFoaicc0EHfP+++8fOM8vOFbPP/+8PjU3NDk6INikSRM3JG6LQgxwxhlnBJQUJXimYZD5OHjwYLPEEksEzvGEvgQvtkiuu+66wHWPPPJIXSwz1g1w2GGHBW7YEzpG3X5TPgziPfp8T5ZZZhnXj/jxxx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YM+SEbaqwdNAAtQJMWt/1Ys6v8l0a6FfxoclX8NFBj39Psttc1Oq0T4DxuAn927rhTdGy/OYG1YY09aq1Yu99tq/e7bXtbXRU/NdKp6Adehd7otN8ScNtX+9223T6H9YjPaT3pc1rP+hyW816H9dzNAKwFa/I6rKcaXNYjTTXWPc0u2z2tTvstoIGRLvkc/w9LNRgQOt0FjwAAAABJRU5ErkJggg==";
12
+ const BY_HOST = [
13
+ { host: "chatgpt.com", name: "ChatGPT", logo: CHATGPT },
14
+ { host: "claude.ai", name: "Claude", logo: CLAUDE },
15
+ { host: "claude.com", name: "Claude", logo: CLAUDE },
16
+ ];
17
+ /** The logo for a redirect URI, only when its host is exactly (or a subdomain of) a known one. */
18
+ export function clientLogoForRedirect(redirectUri) {
19
+ let host;
20
+ try {
21
+ const url = new URL(redirectUri);
22
+ if (url.protocol !== "https:")
23
+ return undefined;
24
+ host = url.hostname.toLowerCase();
25
+ }
26
+ catch {
27
+ return undefined;
28
+ }
29
+ const hit = BY_HOST.find((h) => host === h.host || host.endsWith("." + h.host));
30
+ return hit ? { name: hit.name, logo: hit.logo } : undefined;
31
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The Inistate logomark (from the brand logo SVG, with the editor metadata and path effects
3
+ * stripped). Inline so the finish page needs no image requests and no img-src in its CSP.
4
+ */
5
+ export declare const INISTATE_LOGO_SVG = "<svg role=\"img\" aria-label=\"Inistate\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512.00001 512.00001\" version=\"1.1\"><defs><clipPath clipPathUnits=\"userSpaceOnUse\"><path d=\"M 0,141.732 H 141.732 V 0 H 0 Z\" /></clipPath></defs><g style=\"display:inline\"><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.2485;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 391.61737,305.25401 h 97.87941 V 136.52852 h -97.96141 v 168.64349 a 0.082,0.082 45 0 0 0.082,0.082 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.953;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 207.0209,304.98991 H 375.46142 V 30.5 a 8,8 45 0 0 -8,-8 H 215.0209 a 8,8 135 0 0 -8,8 z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.1396;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 190.94373,22.5 H 30.5 a 8,8 135 0 0 -8,8 v 459 h 168.44373 z\" /><path style=\"display:inline;fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:13.8183;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 481.32958,22.5 h -81.79421 a 8,8 135 0 0 -8,8 v 81.92507 a 8,8 45 0 0 8,8 h 81.79421 a 8,8 135 0 0 8,-8 l 0,-81.92507 a 8,8 45 0 0 -8,-8 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.9525;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 215.0209,489.49034 H 481.5 a 8,8 135 0 0 8,-8 V 329.09336 a 8,8 45 0 0 -8,-8 H 215.0209 a 8,8 135 0 0 -8,8 v 152.39698 a 8,8 45 0 0 8,8 z\" /></g><g style=\"display:none\"><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 134.77045,112.79233 h 35.46627 V 55.404519 h -35.46627 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 77.385798,112.71148 H 134.77045 V 20 H 77.385798 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.00812;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 77.385798,20 H 20 v 150 h 57.385798 z\" /><path style=\"display:inline;fill:#faa300;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 170.18424,20 h -35.41379 v 35.404519 h 34.95043 a 0.46336265,0.46336265 135 0 0 0.46336,-0.463363 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 77.385798,169.99737 H 170.2367 V 112.71148 H 77.385798 Z\" /></g><g style=\"display:none\"><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.23865\" d=\"m 134.44402,113.14365 h 35.46627 V 71.7271 A 15.97126,15.97126 45 0 0 153.93903,55.75584 h -19.49501 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.49455\" d=\"M 77.059371,113.14365 H 134.44402 V 29.432171 a 9,9 45 0 0 -9,-9 H 86.059371 a 9,9 135 0 0 -9,9 z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16784\" d=\"M 77.385798,20 H 35.438885 A 15.438885,15.438885 135 0 0 20,35.438885 V 169.5139 h 57.385798 z\" /><path style=\"display:inline;fill:#faa300;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21099\" d=\"M 159.75589,20.36604 H 144.3421 a 10,10 135 0 0 -10,10 v 15.404519 a 10,10 45 0 0 10,10 h 15.41379 a 10,10 135 0 0 10,-10 V 30.36604 a 10,10 45 0 0 -10,-10 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.4762\" d=\"M 87.149093,170 H 160 a 10,10 135 0 0 10,-10 v -37.28589 a 10,10 45 0 0 -10,-10 H 87.149093 a 10,10 135 0 0 -10,10 V 160 a 10,10 45 0 0 10,10 z\" /><rect style=\"fill:none\" width=\"67.258392\" height=\"61.737179\" x=\"-1.756749\" y=\"17.316526\" /></g><g style=\"display:none\"><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 130.50922,91.750875 H 160 V 30 h -29.49078 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 63.503626,160 H 92.994404 V 30 H 63.503626 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 126.49638,30 H 97.005583 v 61.750875 h 29.490797 z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 59.490775,30 H 30 v 130 h 29.490775 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 97.005583,160 H 159.99833 V 98.249118 H 97.005583 Z\" /><rect style=\"fill:none\" width=\"67.258392\" height=\"61.737179\" x=\"-1.756749\" y=\"17.316526\" /></g><g style=\"display:none\" /><g style=\"display:none\"><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.26316\" d=\"m 97.0056,100.53462 h 29.49078 V 30 H 97.0056 Z\" /><path style=\"display:inline;fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 126.49638,59.49078 V 30 H 64.7455 v 29.49078 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 63.503626,160 H 92.994404 V 30 H 63.503626 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.26718\" d=\"m 160,30 h -29.49079 v 70.78558 H 160 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.87471\" d=\"M 59.490775,58.107984 H 30 V 160 h 29.490775 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.12031\" d=\"M 30,160 H 159.99833 V 130 H 30 Z\" /><path style=\"display:inline;fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.12031\" d=\"M 30.250964,147.06556 H 160.24929 v -30 H 30.250964 Z\" /><rect style=\"fill:none\" width=\"67.258392\" height=\"61.737179\" x=\"-1.756749\" y=\"17.316526\" /><path style=\"fill:#2b9ec6;fill-opacity:1\" d=\"m 127.23881,86.331672 18.03668,0.377977 18.03668,0.377978 -9.34568,15.431233 -9.34567,15.43123 -8.69101,-15.80921 z\" transform=\"matrix(1.2490616,0,0,0.86974614,-35.714539,24.004909)\" /><path style=\"display:inline;fill:#2b9ec6;fill-opacity:1\" transform=\"matrix(-1.2490616,0,0,-0.86974614,223.67462,134.57742)\" d=\"m 127.23881,86.331672 18.03668,0.377977 18.03668,0.377978 -9.34568,15.431233 -9.34567,15.43123 -8.69101,-15.80921 z\" /><path style=\"fill:#73cadf;fill-opacity:1\" d=\"M 15.810742,34.131124 7.7691125,20.202614 -0.27251649,6.2741045 l 16.08325849,-4e-7 16.083257,-4e-7 -8.041629,13.9285103 z\" transform=\"matrix(1.4067251,0,0,1,88.48918,91.969146)\" /></g><g style=\"display:none\" /></svg>";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The Inistate logomark (from the brand logo SVG, with the editor metadata and path effects
3
+ * stripped). Inline so the finish page needs no image requests and no img-src in its CSP.
4
+ */
5
+ export const INISTATE_LOGO_SVG = "<svg role=\"img\" aria-label=\"Inistate\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512.00001 512.00001\" version=\"1.1\"><defs><clipPath clipPathUnits=\"userSpaceOnUse\"><path d=\"M 0,141.732 H 141.732 V 0 H 0 Z\" /></clipPath></defs><g style=\"display:inline\"><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.2485;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 391.61737,305.25401 h 97.87941 V 136.52852 h -97.96141 v 168.64349 a 0.082,0.082 45 0 0 0.082,0.082 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.953;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 207.0209,304.98991 H 375.46142 V 30.5 a 8,8 45 0 0 -8,-8 H 215.0209 a 8,8 135 0 0 -8,8 z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.1396;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 190.94373,22.5 H 30.5 a 8,8 135 0 0 -8,8 v 459 h 168.44373 z\" /><path style=\"display:inline;fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:13.8183;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 481.32958,22.5 h -81.79421 a 8,8 135 0 0 -8,8 v 81.92507 a 8,8 45 0 0 8,8 h 81.79421 a 8,8 135 0 0 8,-8 l 0,-81.92507 a 8,8 45 0 0 -8,-8 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:14.9525;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 215.0209,489.49034 H 481.5 a 8,8 135 0 0 8,-8 V 329.09336 a 8,8 45 0 0 -8,-8 H 215.0209 a 8,8 135 0 0 -8,8 v 152.39698 a 8,8 45 0 0 8,8 z\" /></g><g style=\"display:none\"><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 134.77045,112.79233 h 35.46627 V 55.404519 h -35.46627 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 77.385798,112.71148 H 134.77045 V 20 H 77.385798 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.00812;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 77.385798,20 H 20 v 150 h 57.385798 z\" /><path style=\"display:inline;fill:#faa300;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"m 170.18424,20 h -35.41379 v 35.404519 h 34.95043 a 0.46336265,0.46336265 135 0 0 0.46336,-0.463363 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1\" d=\"M 77.385798,169.99737 H 170.2367 V 112.71148 H 77.385798 Z\" /></g><g style=\"display:none\"><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.23865\" d=\"m 134.44402,113.14365 h 35.46627 V 71.7271 A 15.97126,15.97126 45 0 0 153.93903,55.75584 h -19.49501 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.49455\" d=\"M 77.059371,113.14365 H 134.44402 V 29.432171 a 9,9 45 0 0 -9,-9 H 86.059371 a 9,9 135 0 0 -9,9 z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16784\" d=\"M 77.385798,20 H 35.438885 A 15.438885,15.438885 135 0 0 20,35.438885 V 169.5139 h 57.385798 z\" /><path style=\"display:inline;fill:#faa300;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21099\" d=\"M 159.75589,20.36604 H 144.3421 a 10,10 135 0 0 -10,10 v 15.404519 a 10,10 45 0 0 10,10 h 15.41379 a 10,10 135 0 0 10,-10 V 30.36604 a 10,10 45 0 0 -10,-10 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.4762\" d=\"M 87.149093,170 H 160 a 10,10 135 0 0 10,-10 v -37.28589 a 10,10 45 0 0 -10,-10 H 87.149093 a 10,10 135 0 0 -10,10 V 160 a 10,10 45 0 0 10,10 z\" /><rect style=\"fill:none\" width=\"67.258392\" height=\"61.737179\" x=\"-1.756749\" y=\"17.316526\" /></g><g style=\"display:none\"><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 130.50922,91.750875 H 160 V 30 h -29.49078 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 63.503626,160 H 92.994404 V 30 H 63.503626 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 126.49638,30 H 97.005583 v 61.750875 h 29.490797 z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 59.490775,30 H 30 v 130 h 29.490775 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 97.005583,160 H 159.99833 V 98.249118 H 97.005583 Z\" /><rect style=\"fill:none\" width=\"67.258392\" height=\"61.737179\" x=\"-1.756749\" y=\"17.316526\" /></g><g style=\"display:none\" /><g style=\"display:none\"><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.26316\" d=\"m 97.0056,100.53462 h 29.49078 V 30 H 97.0056 Z\" /><path style=\"display:inline;fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 126.49638,59.49078 V 30 H 64.7455 v 29.49078 z\" /><path style=\"fill:#73cadf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.11756\" d=\"M 63.503626,160 H 92.994404 V 30 H 63.503626 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.26718\" d=\"m 160,30 h -29.49079 v 70.78558 H 160 Z\" /><path style=\"fill:#2b9ec6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.87471\" d=\"M 59.490775,58.107984 H 30 V 160 h 29.490775 z\" /><path style=\"fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.12031\" d=\"M 30,160 H 159.99833 V 130 H 30 Z\" /><path style=\"display:inline;fill:#a4ce3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.12031\" d=\"M 30.250964,147.06556 H 160.24929 v -30 H 30.250964 Z\" /><rect style=\"fill:none\" width=\"67.258392\" height=\"61.737179\" x=\"-1.756749\" y=\"17.316526\" /><path style=\"fill:#2b9ec6;fill-opacity:1\" d=\"m 127.23881,86.331672 18.03668,0.377977 18.03668,0.377978 -9.34568,15.431233 -9.34567,15.43123 -8.69101,-15.80921 z\" transform=\"matrix(1.2490616,0,0,0.86974614,-35.714539,24.004909)\" /><path style=\"display:inline;fill:#2b9ec6;fill-opacity:1\" transform=\"matrix(-1.2490616,0,0,-0.86974614,223.67462,134.57742)\" d=\"m 127.23881,86.331672 18.03668,0.377977 18.03668,0.377978 -9.34568,15.431233 -9.34567,15.43123 -8.69101,-15.80921 z\" /><path style=\"fill:#73cadf;fill-opacity:1\" d=\"M 15.810742,34.131124 7.7691125,20.202614 -0.27251649,6.2741045 l 16.08325849,-4e-7 16.083257,-4e-7 -8.041629,13.9285103 z\" transform=\"matrix(1.4067251,0,0,1,88.48918,91.969146)\" /></g><g style=\"display:none\" /></svg>";
@@ -95,6 +95,7 @@ export declare class InistateOAuthProvider implements OAuthServerProvider {
95
95
  getFinishInfo(nonce: string, finishToken: string, browserSecret?: string): {
96
96
  clientName: string;
97
97
  account: string;
98
+ redirectUri: string;
98
99
  };
99
100
  /** Finish an App-approved flow: the originating browser (cookie) plus the App's token. */
100
101
  completeParkedAuthorization(nonce: string, finishToken: string, browserSecret?: string): {
@@ -303,7 +303,7 @@ export class InistateOAuthProvider {
303
303
  /** What the finish page shows before the user confirms. Needs the cookie and the token. */
304
304
  getFinishInfo(nonce, finishToken, browserSecret) {
305
305
  const pending = this.finishablePending(nonce, finishToken, browserSecret);
306
- return { clientName: pending.clientName, account: pending.parked.account };
306
+ return { clientName: pending.clientName, account: pending.parked.account, redirectUri: pending.params.redirectUri };
307
307
  }
308
308
  /** Finish an App-approved flow: the originating browser (cookie) plus the App's token. */
309
309
  completeParkedAuthorization(nonce, finishToken, browserSecret) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inistate-mcp",
3
3
  "mcpName": "io.github.Inistate/inistate-mcp",
4
- "version": "1.3.3",
4
+ "version": "1.3.5",
5
5
  "description": "MCP server for the Inistate platform — no-code apps creation powered by AI",
6
6
  "type": "module",
7
7
  "author": "Inistate",
package/server.json CHANGED
@@ -8,13 +8,13 @@
8
8
  "url": "https://github.com/inistate/inistate-mcp",
9
9
  "source": "github"
10
10
  },
11
- "version": "1.3.3",
11
+ "version": "1.3.5",
12
12
  "packages": [
13
13
  {
14
14
  "registryType": "npm",
15
15
  "registryBaseUrl": "https://registry.npmjs.org",
16
16
  "identifier": "inistate-mcp",
17
- "version": "1.3.3",
17
+ "version": "1.3.5",
18
18
  "transport": {
19
19
  "type": "stdio"
20
20
  },