Skip to content
Quirello developer docs
Esc
navigateopen⌘Jpreview
On this page

Run a redirect operation locally

Create, verify, and clean up a Quirello redirect against the in-memory Operator Contract.

Use this tutorial to prove one complete Quirello mutation path without Cloudflare bindings or a remote website.

run the lesson

From the repository root, run the source tutorial test:

pnpm --dir src/packages/quirello test src/tutorials/redirect.test.ts

The lesson creates an exact-match redirect from /old-campaign to /campaigns/current, reads it back through the same Operator Contract, then deletes it. A passing test proves the input and result schemas at the package boundary. It makes no network call and leaves no remote state.

use the same flow with a host

The remote version connects to the host’s /q/mcp endpoint, runs the same three operations, and closes the MCP client:

await runRemoteRedirectTutorial({
  mcpUrl: "http://localhost:3160/q/mcp",
});

Local hostnames do not need a bearer token. A non-local host requires the Quirello Operator Token. Do not point this tutorial at a shared environment because it deliberately creates and deletes a redirect.

Read the full runnable source and its test for the detailed implementation. Use the MCP operations guide for forms and media.

Was this page helpful?