Skip to main content
Use Magic Patterns through Corsair: one client, typed API calls. Calls go to Magic Patterns’ hosted MCP server with an mp_ API key (Magic Patterns > Settings > API Keys). Most operations take an osId from projects.list (the id in magicpatterns.com/os/<osId>); read projects.guide before writing to a project. Pass the same short conversation name on every call of one task so Magic Patterns counts it as one writer. magicos.ask, images.generate and the legacy prompt operations spend the workspace’s Magic Patterns credits. legacy.* operations are for designs made in the old editor (magicpatterns.com/c/<id>), which Magic Patterns has deprecated. What you get:
  • 47 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List the files in a project
Write a file in a project
See the full list on the API page.

What’s next

API reference

Every magicpatterns.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.