From 9cde85ad56d785ca28e8e139c2919c9ad698e3de Mon Sep 17 00:00:00 2001
From: Vensin
Date: Fri, 13 Nov 2026 10:50:15 +0100
Subject: [PATCH] feat(landing): MCP and the studio, animated; docs for the
studio, protect and what is open in production
---
app/globals.css | 4 +
app/page.tsx | 4 +
components/landing/agents.tsx | 153 +++++++++++++++++++++
components/landing/studio.tsx | 249 ++++++++++++++++++++++++++++++++++
content/docs/api/app.mdx | 4 +-
content/docs/deploy.mdx | 24 ++++
content/docs/meta.json | 1 +
content/docs/studio.mdx | 65 +++++++++
8 files changed, 503 insertions(+), 1 deletion(-)
create mode 100644 components/landing/agents.tsx
create mode 100644 components/landing/studio.tsx
create mode 100644 content/docs/studio.mdx
diff --git a/app/globals.css b/app/globals.css
index a6e8026..0392a81 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -130,6 +130,8 @@ pre,
[data-tone="bench"] { --tone: #f5e4d8; }
[data-tone="integrations"] { --tone: #f2e9da; }
[data-tone="hanko"] { --tone: #f6e6dc; }
+[data-tone="agents"] { --tone: #f1e3d6; }
+[data-tone="studio"] { --tone: #ece2d3; }
/* dark: the clips play in the darkest room, the numbers glow a little red */
.dark[data-tone="contract"] { --tone: #1e1815; }
.dark[data-tone="playground"] { --tone: #161210; }
@@ -137,6 +139,8 @@ pre,
.dark[data-tone="bench"] { --tone: #24150f; }
.dark[data-tone="integrations"] { --tone: #1b1715; }
.dark[data-tone="hanko"] { --tone: #21130f; }
+.dark[data-tone="agents"] { --tone: #1f1411; }
+.dark[data-tone="studio"] { --tone: #14100e; }
/* Lenis scrolls the page itself; the browser's own smoothing would fight it */
html.lenis {
diff --git a/app/page.tsx b/app/page.tsx
index 4ef20aa..3866d20 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -10,6 +10,8 @@ import { Playground } from "@/components/landing/playground";
import { Clips } from "@/components/landing/clips";
import { Bench, Integrations, Start } from "@/components/landing/sections";
import { Hanko } from "@/components/landing/hanko";
+import { Agents } from "@/components/landing/agents";
+import { Studio } from "@/components/landing/studio";
import { pageMeta } from "@/lib/site";
import { latestRelease } from "@/lib/source";
import { app } from "@/server/app";
@@ -49,6 +51,8 @@ export default function Home() {
+
+
diff --git a/components/landing/agents.tsx b/components/landing/agents.tsx
new file mode 100644
index 0000000..c1532bf
--- /dev/null
+++ b/components/landing/agents.tsx
@@ -0,0 +1,153 @@
+"use client";
+// MCP: the same contract, read by a model. A short scripted chat in a terminal window: the model
+// calls a tool wrong, reads the 400 the contract wrote, and gets it right the second time.
+import { AnimatePresence, motion, useInView, useReducedMotion } from "motion/react";
+import { useEffect, useRef, useState } from "react";
+import Link from "next/link";
+import { Window } from "@/components/code";
+
+type Step =
+ | { kind: "user"; text: string }
+ | { kind: "model"; text: string }
+ | { kind: "call"; tool: string; args: string; status: number; out: string };
+
+const SCRIPT: Step[] = [
+ { kind: "user", text: "Is Sencha still on the shelf?" },
+ { kind: "call", tool: "getTeasById", args: '{ "id": "sencha" }', status: 400, out: "params.id: expected an integer" },
+ { kind: "call", tool: "getTeas", args: '{ "kind": "green" }', status: 200, out: '[{ "id": 1, "name": "Sencha", "inStock": true }]' },
+ { kind: "model", text: "Yes: Sencha (id 1) is in stock." },
+];
+
+const FACTS = [
+ { glyph: "印", title: "Tools from contracts", text: "Name, description, input and output schema: all from the route you already wrote." },
+ { glyph: "→", title: "A call is a request", text: "With the caller's credentials, through security, hooks and checks. No side door." },
+ { glyph: "✓", title: "Proven by check", text: "inkan check --mcp runs every example again as a tool call." },
+];
+
+const ease = [0.22, 1, 0.36, 1] as const;
+
+export function Agents() {
+ const ref = useRef(null);
+ const seen = useInView(ref, { margin: "-20% 0px" });
+ const still = useReducedMotion();
+ const [shown, setShown] = useState(0);
+ const steps = still ? SCRIPT.length : Math.min(shown, SCRIPT.length);
+
+ // one step every 1.3 s while it is on screen, a pause at the end, then the chat starts over
+ useEffect(() => {
+ if (still || !seen) return;
+ const t = setTimeout(() => setShown((n) => (n >= SCRIPT.length + 2 ? 0 : n + 1)), shown === 0 ? 500 : 1300);
+ return () => clearTimeout(t);
+ }, [shown, seen, still]);
+
+ return (
+
+
+
+
印 new in 0.10 · for AI clients
+
Every route, a tool a model can call.
+
+ Claude, Cursor and other AI clients call tools over MCP. A tool is a name, a description and a schema: inkan already
+ has all three, for every route. One option, and the model reads the same contract your docs and tests do, down to
+ the 400 that tells it which field was wrong.
+
+ );
+}
diff --git a/components/landing/studio.tsx b/components/landing/studio.tsx
new file mode 100644
index 0000000..9ea3e47
--- /dev/null
+++ b/components/landing/studio.tsx
@@ -0,0 +1,249 @@
+"use client";
+// inkan studio, in a browser window that runs by itself: requests arrive, the sparklines draw,
+// the map grows, jobs fill up. The tabs turn every few seconds while the section is on screen.
+import { AnimatePresence, motion, useInView, useReducedMotion } from "motion/react";
+import { useEffect, useRef, useState } from "react";
+import Link from "next/link";
+import { Window } from "@/components/code";
+
+const TABS = ["live", "routes", "map", "jobs"] as const;
+type Tab = (typeof TABS)[number];
+const METHOD: Record = { GET: "text-[#79c08a]", POST: "text-[#7fa8e6]", DELETE: "text-[#e65d3e]", WS: "text-[#b897e0]" };
+const POOL = [
+ { m: "GET", p: "/teas", s: 200, ms: 0.4 },
+ { m: "GET", p: "/teas/1", s: 200, ms: 1.2 },
+ { m: "GET", p: "/teas/abc", s: 400, ms: 0.3, note: "input broke the contract" },
+ { m: "POST", p: "/teas", s: 201, ms: 2.1, note: "via MCP tool postTeas" },
+ { m: "GET", p: "/teas/9", s: 404, ms: 0.6 },
+ { m: "POST", p: "/exports", s: 202, ms: 0.5 },
+];
+const FEATURES: Record = {
+ live: "Every request as it comes, with replay, and a click turns it into an example.",
+ routes: "Every route with its calls, its p95 and what broke, sorted by the slowest.",
+ map: "The app as a tree of its paths, with tools and auth at each.",
+ jobs: "The queues, the schedule, progress as it happens, and cancel.",
+};
+
+export function Studio() {
+ const ref = useRef(null);
+ const seen = useInView(ref, { margin: "-20% 0px" });
+ const still = useReducedMotion();
+ const [tab, setTab] = useState("live");
+ const [held, setHeld] = useState(false); // a tab someone picked stays
+ const [tick, setTick] = useState(0);
+ const live = seen && !still;
+
+ useEffect(() => {
+ if (!live) return;
+ const t = setInterval(() => setTick((n) => n + 1), 700);
+ return () => clearInterval(t);
+ }, [live]);
+ useEffect(() => {
+ if (!live || held) return;
+ const t = setInterval(() => setTab((x) => TABS[(TABS.indexOf(x) + 1) % TABS.length]!), 4200);
+ return () => clearInterval(t);
+ }, [live, held]);
+
+ return (
+
+
+
印 coming in 0.11 · inkan studio
+
Watch your app while it runs.
+
+ Open /_inkan while you develop. No account, no agent, nothing to install: the studio is a
+ page the app serves itself, from what it already knows about every route. Behind a password with{" "}
+ protect, it runs in production too.
+
+ );
+}
+
+function Jobs({ tick }: { tick: number }) {
+ const jobs = [0, 1, 2].map((i) => {
+ const p = Math.min(100, (tick * 9 + i * 37) % 130);
+ return { id: ["q7Vx2", "Kf91a", "Zt0pL"][i]!, p, state: p >= 100 ? "done" : i === 2 && p < 30 ? "queued" : "running" };
+ });
+ return (
+
+
/exports · 2 of 2 slots · next run of */5 * * * * in 3m
+ {jobs.map((j) => (
+
+ {j.id}
+ {j.state}
+
+
+
+ {j.state === "queued" ? "" : `${j.p}%`}
+
+ ))}
+
+ );
+}
diff --git a/content/docs/api/app.mdx b/content/docs/api/app.mdx
index bed7bda..3e5a8a3 100644
--- a/content/docs/api/app.mdx
+++ b/content/docs/api/app.mdx
@@ -362,7 +362,9 @@ path, security, meta, spec), frozen, and `sealed()` how the seal went: how many
| `title`, `version`, `description`, `servers` | | for OpenAPI and the docs page |
| `docs` | `"/docs"` | the docs page, or `false` |
| `openapi` | `"/openapi.json"` | the OpenAPI document, or `false` |
-| `inspector` | `"/_inkan"` in development | the request inspector, loopback only, or `false` |
+| `inspector` | `"/_inkan"` in development | the [studio](/docs/studio), loopback only, or `false` |
+| `protect` | | `{ user, password }` or `(req) => boolean`: guards `/docs`, `/openapi.json` and the studio ([more](/docs/studio#protect)) |
+| `mcp` | off | `true` or `{ path, origins, instructions }`: every route an [MCP](/docs/mcp) tool |
| `validateResponses` | on in development | checks what handlers return against `response` |
| `bodyLimit` | 1 MiB | the largest request body in bytes; a route can have its own |
| `timeout` | none | milliseconds a handler may take before a 504 |
diff --git a/content/docs/deploy.mdx b/content/docs/deploy.mdx
index 0a95cb7..9c93147 100644
--- a/content/docs/deploy.mdx
+++ b/content/docs/deploy.mdx
@@ -97,6 +97,30 @@ line in the logs. A fresh id is a random prefix made when the process starts, th
in a cluster, and a counter: `0k3f9a2w3-1c8`. Unique per process and per worker, and cheap,
but not a UUID and not unguessable; nothing should rest on keeping it secret. `ctx.ip` is the client's address, from the socket or the platform.
+## What is open in production
+
+inkan serves a few pages of its own. Before you go live, decide for each:
+
+| | in production, by default | to close it | to keep it, but not for everyone |
+| --- | --- | --- | --- |
+| `/docs` | open | `docs: false` | `protect` |
+| `/openapi.json` | open | `openapi: false` | `protect` |
+| `/_inkan`, the [studio](/docs/studio) | off (development only, and loopback only) | — | `inspector: "/_inkan"` with `protect` |
+| `/mcp` | off, unless you set `mcp` | leave `mcp` out | each tool keeps its route's `security` |
+
+```ts
+const app = inkan({
+ docs: false, // or keep it, behind protect
+ openapi: false,
+ protect: { user: "team", password: env("DOCS_PASSWORD") }, // for whatever you keep
+});
+```
+
+The docs page and the OpenAPI document say nothing your routes would not tell a client
+anyway, so leaving them open is fine for a public API. For an internal one, close them or
+put them behind [`protect`](/docs/studio#protect). The built-in pages are answered before
+any hook runs, so an auth hook of your own does not reach them: `protect` is the way.
+
## The frontend next to it
An app that serves its own built frontend registers two plugins: the files, with the
diff --git a/content/docs/meta.json b/content/docs/meta.json
index 8e284de..10df392 100644
--- a/content/docs/meta.json
+++ b/content/docs/meta.json
@@ -25,6 +25,7 @@
"runtime",
"client",
"mcp",
+ "studio",
"middleware",
"hooks",
"plugins",
diff --git a/content/docs/studio.mdx b/content/docs/studio.mdx
new file mode 100644
index 0000000..dfc03e9
--- /dev/null
+++ b/content/docs/studio.mdx
@@ -0,0 +1,65 @@
+---
+title: "Studio"
+description: "/_inkan: the app while it runs. Requests live, every route with its numbers, a map, the MCP tools and the jobs."
+---
+
+
+What the studio shows, and `protect`, may change in a minor release. The `inspector` option that places it is stable.
+
+
+Start the app in development and open `/_inkan`. The studio is a page the app serves itself,
+from what it already knows: every request it answered since the page opened, every route
+with its contract, its tools and its jobs. There is nothing to install and no account.
+
+It answers only this machine (a loopback address) and only in development, unless you put it
+behind [`protect`](#protect). It used to be called the inspector, and the `inspector` option
+still says where it lives: `inspector: "/_inkan"`, another path, or `false`.
+
+## Tabs
+
+| tab | what it shows |
+| --- | --- |
+| **live** | The last 200 requests, newest first, with a filter. A red note means a request or an answer broke the contract. Click a row for its headers (secrets as •••) and bodies, **replay** it and compare the answers, or **copy as example** to paste into the route's `examples`. Above it: requests, broken answers and p95 of the last minute, and the heap, each with a sparkline. |
+| **routes** | Every route with its calls, broken answers, p50, p95 and last status since the studio opened, its MCP tool, whether it asks for credentials, and how many examples it has. Sort by any column: the slowest are a click away. |
+| **map** | The app as a tree of its paths: the methods at each, parameters in colour, tools and auth as badges. |
+| **mcp** | The [MCP](/docs/mcp) tools, made from the contracts. With `mcp` off it shows what it would serve. With it on, every tool has a call form that goes through `/mcp`, like a client would. Below: the routes that are no tools, with the reason, and the latest tool calls. |
+| **jobs** | Every [job](/docs/jobs) kind: its slots, its queue, the next run of its schedule, the jobs running and waiting with a **cancel** button, and the last 20 that ended, with their result or error. |
+
+The numbers are kept only while the studio is on, in this process. In a cluster each worker
+has its own.
+
+## protect
+
+```ts
+const app = inkan({
+ inspector: "/_inkan", // on in production too
+ protect: { user: "admin", password: env("STUDIO_PASSWORD") },
+});
+```
+
+`protect` guards the pages inkan serves itself: the docs page, the OpenAPI document and the
+studio. With `{ user, password }` the browser asks for a login (HTTP Basic auth, compared in
+constant time; serve it over HTTPS). A function decides alone:
+
+```ts
+inkan({ protect: (req) => req.headers["x-team-token"] === process.env.TEAM_TOKEN });
+```
+
+It gets the request as an `origins` function does, may return a promise, and a function that
+throws is a no. With `protect`, the studio also answers addresses other than loopback, which
+is what lets it run on a server.
+
+Your routes and the MCP endpoint are not affected: they have `security` and your auth
+hooks. The built-in pages are answered before any hook runs, which is why they have a guard
+of their own.
+
+## JSON
+
+The page reads two documents you can read too:
+
+- `/_inkan/log.json?since=`: the requests after that id
+- `/_inkan/studio.json`: the app, its routes with their numbers, the tools and the jobs
+
+Both are experimental: their fields may change in any release. Cancelling a job is a
+`POST /_inkan/jobs/cancel?kind=&id=` with the header `x-inkan-studio: 1`, which a
+page of another site cannot send without asking first.