Skip to content

MCP guide

Ask for posts from your AI app

Connect your AI app to SmartGenius through MCP to make drafts and images. You can also read brand reports from sources an admin shares with this app. You still review and approve posts in SmartGenius.

What you can ask for

First add a profile in SmartGenius with the handle and brand you want to use. After connecting, try:

  • "Which profiles can I use in SmartGenius?" See the profiles in the workspace you connected.
  • "What did @your.profile post this month, and what goes out next?" See each post, where it stands and when it goes out.
  • "I want to connect Instagram to this profile." If you're a workspace admin, get a link to open and approve on Meta.
  • "Make a carousel for @your.profile with 5 tips for keeping homemade bread fresh." Get a draft with slides, a caption and hashtags.
  • "Write an article for the blog of your.profile about why homemade bread goes stale." Get a draft to read and publish yourself.
  • "Make an image of a lighthouse at dawn, in watercolor." Get a link to download the image.
  • "How many credits do I have left this month?" Check your balance before asking for new content.

The connected app cannot approve, schedule, publish or make a reel's video. Open the post’s link in SmartGenius to check every slide and the caption.

Making posts and images uses credits from your workspace's quota. Asking from an AI app does not make that work free. Each newly generated image uses 1 credit. A failed image is not charged. An article's text uses 2 credits, and a drawn cover 1 more. A reel's video uses 1 credit for up to 30 seconds and 2 for up to 60, and it is made only when you confirm the narration in SmartGenius.

Connect and sign in

In your AI app, open connector or integration settings. Add a custom connection named SmartGenius, with this address and no key:

https://api.smartgenius.app/mcp

Your app can see which tools are available before you sign in. It needs permission to use any tool, even to read your workspace.

Your browser opens SmartGenius. Sign in, choose a workspace you administer and press Allow. The app gets its own key, listed under API and MCP in that workspace’s menu.

The app must support remote MCP over Streamable HTTP, the way requests are sent, and browser sign-in through OAuth. Access can depend on your app, plan or administrator. SmartGenius does not need to be listed in an app store.

Then ask "Which profiles can I use in SmartGenius?" You should see the chosen workspace’s profiles. Never paste an API key into the conversation.

What you allow, and how to disconnect

Only owners and admins can connect. The app acts as the person who connected it, with their role, in the chosen workspace only. It can read profiles, make drafts and images, write article drafts, check a post or an article and read usage. Only an admin's key can set up a new profile or request an Instagram connection link. You open that link and approve on Meta. The app never receives your password or the key SmartGenius uses to access Instagram.

Brand reports are off by default, including for existing keys. When you connect an app or create a key, choose which sources it can read. You can change that choice in API and MCP. Ad reports include spend. The app can keep any copy it already received.

Open API and MCP in the workspace menu and revoke the key named after the AI app. Access stops at once. Remove SmartGenius from the AI app too. If the person who connected it leaves the workspace, the key stops working.

What the app sees and what we keep

If it does not work

  • No workspace to choose? Sign in with the right account and ask the owner to check that you are an admin. No custom connection option? Check whether your AI app and plan support remote MCP.
  • A profile is missing? Check that you added it to the workspace you chose when connecting. The handle must belong to a profile in that workspace, not just any Instagram account.
  • The post or article is still being made? Ask to check the same one's progress. Do not ask to create it again: that makes a second one and can spend more credits.
  • Out of credits? Open Plan and usage in SmartGenius to check the reset date and the options available. If you hit a call limit, wait for the time shown before trying again.

For programmers and coding agents

Claude Code and Codex

The plugin connects your agent to SmartGenius and brings the skill that teaches it how to use SmartGenius. There's no key to copy.

Claude Code

claude plugin marketplace add owe-br/plugins
claude plugin install smartgenius@owe-br

Then type /mcp, pick smartgenius and choose Authenticate.

Codex

codex plugin marketplace add owe-br/plugins
codex plugin add smartgenius@owe-br
codex mcp login smartgenius

The last line signs you in. It needs Codex 0.147 or later: older versions fail with “missing required issuer”. To update, run npm install -g @openai/codex@latest.

Either way, your browser opens SmartGenius: sign in, pick the workspace and click Allow. That makes a key named after the app, listed under API and MCP in the workspace menu. To disconnect, revoke that key there. Only a workspace's admins can connect an app.

See the plugin on GitHubWhat the app sees and what we keep

Agents with no browser

An agent on a server, in a container or over SSH can't open a browser for you. It can still connect without a key you copy: it shows a code, you allow it in SmartGenius, and it gets its own key. This works only with the client_id smartgenius-agent. The agent starts like this:

curl https://api.smartgenius.app/oauth/device_authorization \
  -d client_id=smartgenius-agent

The answer has a link and a code like WDJB-MJHT. Open the link on any phone or computer, or go to https://my.smartgenius.app/device and type the code. Sign in, check that the code matches the one the agent shows, pick the workspace and click Allow. Only a workspace's admins can allow it. The code lasts 10 minutes.

Allow it only if you started this connection yourself. If someone sent you the link or asked you for a code, don't allow it.

Meanwhile, the agent keeps device_code to itself and asks for its key every 5 seconds:

curl https://api.smartgenius.app/oauth/token \
  -d grant_type=urn:ietf:params:oauth:grant-type:device_code \
  -d client_id=smartgenius-agent \
  -d device_code=…

Until you allow it, the answer is authorization_pending. Then it's access_token: a normal key named “AI agent (device sign-in)”, listed under API and MCP. It works until someone revokes it there. If you click Don't allow, the answer is access_denied. If the 10 minutes run out, it's expired_token, and the agent has to start over.

A key, for scripts

Use a key when the program can't open a browser: a script, a server, an automation.

A workspace admin makes the key in SmartGenius, under API and MCP in the workspace menu. It's shown once: we keep only its first few characters.

A key acts as the person who made it, with the role they have in the workspace. If they leave, the key stops working right away. A workspace can have up to 10 keys. Whenever someone creates a key, the workspace's admins get an email.

Log in and make a key

Your first image

One call, one image. Replace sg_… with your key:

curl https://api.smartgenius.app/v1/images \
  -H "Authorization: Bearer sg_…" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"a lighthouse at dawn, in watercolor"}'

The answer has a link to the image. The link works for 7 days, so download the image if you need it longer.

MCP with a key

A program with no browser sends the key in the Authorization header, at the same address:

Claude Code on a server

claude mcp add --transport http smartgenius \
  https://api.smartgenius.app/mcp \
  --header "Authorization: Bearer sg_…"

Cursor and other apps

In Cursor, add this to ~/.cursor/mcp.json. Other MCP apps use the same address and the same header.

{
  "mcpServers": {
    "smartgenius": {
      "url": "https://api.smartgenius.app/mcp",
      "headers": {
        "Authorization": "Bearer sg_…"
      }
    }
  }
}

Teach another agent

A skill is a file that teaches an agent how to use SmartGenius: the order of the calls, how to wait for a post, and what never to do. The plugin already includes it. For any other agent, install it with one command:

curl -fsSL https://smartgenius.app/skill/install.sh | sh

The file goes to ~/.agents/skills/smartgenius/, and Claude Code and Codex get a link to it. Using another agent? Point it at that file. To update, run the command again.

Read the script firstSee the skill

What you can do

Each MCP tool has a matching HTTP route. Both return the same data. Reading shared reports uses no credits.

list_profilesGET /v1/profiles
Lists the workspace's profiles. Every post needs one of their @s.
list_brandsGET /v1/brands
Lists each brand with the Instagram accounts and blogs it posts to, each with its id, and whether each account is connected. When a brand has more than one account or blog, send that id as instagram in create_post or as blogId in create_article.
get_profileGET /v1/profiles/{profile}
Shows a profile: its language and time zone, whether its Instagram account is connected and working, and what SmartGenius learned from its posts: the subjects, the caption tone, how often and when it posts, and the hashtags it uses most.
list_postsGET /v1/profiles/{profile}/posts?status=scheduled
Lists a profile's posts, newest first: where each one stands, when it goes or went out, and its Instagram link once it's published. Filter with status (draft, ready, scheduled, publishing, published or failed) or search with q.
list_mediaGET /v1/profiles/{profile}/media
Lists the profile's own Instagram posts, newest first, with the start of each caption, what SmartGenius saw in the pictures and the numbers Instagram gave (reach, saves, shares, likes, comments). The numbers come only while the Instagram connection allows reading them.
list_suggestionsGET /v1/profiles/{profile}/suggestions
Lists what the profile's own posts and numbers suggest doing next, like a subject it stopped posting about or a post worth repeating. Each one comes as a kind and the numbers behind it.
get_routineGET /v1/profiles/{profile}/routine
Shows the profile's Autopilot: whether it's on, the posting times, how each post goes out, the saved ideas and what's planned for the next time slots. To change it, open SmartGenius.
create_postPOST /v1/profiles/{profile}/posts
Starts a post from an idea. It answers right away, before the post is ready.
get_postGET /v1/profiles/{profile}/posts/{id}?wait=30
Shows the post: where it stands, each slide's text, the caption, the hashtags and a link to open it in SmartGenius. For a reel, also each scene's narration and where its video stands (video). With wait (up to 50 s), the answer holds until the post is done.
create_articlePOST /v1/profiles/{profile}/articles
Starts a blog article from an idea, for a profile that has a blog. It answers right away, before the article is written. The text uses 2 credits, a drawn cover (drawCover) 1 more.
get_articleGET /v1/profiles/{profile}/articles/{id}?wait=30
Shows the article: where it stands, its title, dek and body, the links it points to and a link to open it in SmartGenius. With wait (up to 50 s), the answer holds until the article is written.
create_profilePOST /v1/profiles
Admin only. Makes a profile for a brand with no Instagram, and its blog if you pass blog. With blog.customHost it starts connecting your own domain and returns the CNAME to add. It reads no website and buys no article.
get_instagram_connect_linkPOST /v1/profiles/{profile}/instagram/connect
Admin only. Takes profile and returns profile, url and expiresAt: a private link for a person to connect or replace this profile's Instagram account. They open the link and approve on Meta, then return to the connection screen in SmartGenius. The call itself connects nothing and uses no credits. If the link expires, ask for another. No requestId or returnTo is accepted. For another of a brand's accounts, send that account's id from list_brands as profile.
generate_imagePOST /v1/images
Makes 1 to 4 images from a prompt. Add profile and they come out in that profile's style and colors.
list_report_sourcesGET /v1/report-sources
Lists only the report sources shared with this key. You can filter by brandId. An empty list means no sources are available to this key.
get_reportGET /v1/report-sources/{sourceId}/report
Pass a sourceId from list_report_sources to read the same saved report you see in Results. By default it covers the last 7 complete days, or the latest counts for TikTok videos. Where supported, window can be 28d. The response includes the units, dates, currency when relevant and last read time. For more detail rows, pass nextOffset as offset. Missing values are not zero.
get_usageGET /v1/usage
Credits used and left this month, today's limit, and when the month resets.
GET /v1/profiles/{profile}/posts/{id}/export?size=4:5
Downloads the finished post as a zip: one JPEG per slide, and the caption in caption.txt.

create_post also takes format (carousel, post, story or reel), slides (for a reel, its scenes), seconds (a reel's limit: 30 or 60), objective, tone, cta and links (up to 5 pages to read first). generate_image takes aspectRatio (1:1, 4:5, 9:16, 16:9 and more) and count. A profile works with or without its @. create_article also takes links (up to 3 pages to read first), language, adFor, fromPostId, ideaId and blogId. When a brand has more than one Instagram account or blog, say which one: instagram in create_post, blogId in create_article, with the id list_brands shows. Without it, the call is refused with the list of choices, before any credit is spent. create_profile needs a requestId. No idea yet? Send research: true instead of idea, in create_post or create_article: the topic comes from the profile's saved ideas and from what the day's research found in its niche. With neither idea nor research: true, the call is refused before any credit is spent. list_posts takes status (one or more, comma-separated over HTTP), q, limit (up to 50) and offset. list_media takes limit (up to 48) and cursor, the nextCursor of the page before.

Make a post

  1. Call list_profiles and pick a profile. If its brand has more than one Instagram account, call list_brands and pick the account.
  2. Call create_post with the profile's @ and the idea. The answer has the post's id.
  3. Call get_post with wait=30 until making.status is done or failed. A carousel takes a few minutes.
  4. The post lands as a draft. Approving, scheduling and publishing stay with a person, at the post's studioUrl. For a reel, that is also where they confirm the narration and make the video.

Calling create_post again makes a second post and spends the credits again. To repeat a call safely (after a network error, say), send a requestId: any text of your own, like a UUID. With the same requestId you get the first call's answer, and nothing is spent twice. It lasts 24 hours and works for generate_image too.

curl https://api.smartgenius.app/v1/profiles/@your.profile/posts \
  -H "Authorization: Bearer sg_…" \
  -H "Content-Type: application/json" \
  -d '{"idea":"5 tips for keeping homemade bread fresh","requestId":"4b1d7e2a-9c3f-4e8b-a6d5-1f0e2c3b4a59"}'

Write an article

  1. Call list_profiles and pick a profile that has a blog. If its brand has more than one blog, call list_brands and pick the blog.
  2. Call create_article with the profile and the idea. The answer has the article's id.
  3. Call get_article with wait=30 until making.status is succeeded or failed. An article takes a few minutes.
  4. The article lands as a draft. Reading it, approving it and publishing it stay with a person, at the article's studioUrl.
curl https://api.smartgenius.app/v1/profiles/your.brand/articles \
  -H "Authorization: Bearer sg_…" \
  -H "Content-Type: application/json" \
  -d '{"idea":"Why homemade bread goes stale, and what to do about it"}'

The text uses 2 credits. A drawn cover uses 1 more. A call that is refused is not charged.

Calling create_article again makes a second article and spends the credits again. To repeat a call safely, send a requestId, as with posts. With the same requestId you get the first call's answer, and nothing is spent twice. It lasts 24 hours.

To start a brand with no Instagram, an admin calls create_profile with a requestId, a name and an about. If the blog or the domain stops halfway, the error names the profile that was made: call again with the same requestId to finish.

Costs and limits

  • Each newly generated image uses 1 credit from the workspace's monthly quota, in posts and in generate_image. A reel's video uses 1 credit for up to 30 seconds and 2 for up to 60, when a person confirms the narration in SmartGenius. It's the same quota posts made in SmartGenius use, on every plan. Photos used as is and text-only slides cost no credits. A failed image isn't charged.
  • An article's text uses 2 credits and a drawn cover 1 more, from the same monthly quota. A call that is refused is not charged.
  • Each key can make 120 calls a minute.
  • Each key can hold 5 get_post or get_article waits at once. From the sixth on, they answer right away without waiting.
  • generate_image makes 1 to 4 images per call.
  • Image links work for 7 days. Download what you'll use: after that, the image is deleted.

Errors

Over HTTP, an error looks like this. Over MCP, you get the same object with isError: true: { error: { code, message, details } }

UNAUTHORIZED · INVALID_TOKEN
The key is missing, was revoked, or the person who made it left the workspace. Make a new key.
FORBIDDEN
The person who made the key isn't allowed to do that in this workspace. For example, someone who only approves posts can't spend credits.
NOT_FOUND
That profile, post or article isn't in this workspace. Check the profile with list_profiles. Where blogs aren't available yet, the blog calls answer the same way.
VALIDATION_ERROR
A field is wrong (details says which and why), the brand has more than one account or blog and the call didn't say which (details.choices lists them), or the requestId was already used for a different request.
CONFLICT
The first call with this requestId hasn't answered yet. Wait retryAfterSecs seconds, then call again with the same requestId. With messageKey serverErrors.blogChanged, the blog in blogId was replaced or removed: check list_brands and call again.
QUOTA_EXCEEDED
The monthly quota or daily limit is used up. details.resetAt says when it resets. A bigger plan may raise the limit. A credit pack only tops up the monthly quota, not the daily limit.
RATE_LIMIT_EXCEEDED
Too many calls in a minute. Wait retryAfterSecs seconds and try again.
GENERATION_FAILED
The image model failed or refused the request. Nothing was charged. Try again or change the prompt.