Skip to main content

Use Loopster from Codex, step by step

This article shows you how to connect Codex to Loopster, build a table by chatting, let Codex run a function, and disconnect it again.

Written by Umer Ishaq

What do I need before I start?

You need the Codex command line tool, signed in with an OpenAI API key or a ChatGPT plan. Connecting Codex to Loopster is a separate sign-in, and the steps below cover it.

How do I connect Codex to Loopster?

  1. Run this command in your terminal. Codex adds Loopster as a server and starts the sign-in itself.

codex mcp add loopster --url https://app.loopster.ai/api/mcp

Codex prints "Added global MCP server 'loopster'.", then "Detected OAuth support. Starting OAuth flow…", then "Authorize loopster by opening this URL in your browser:" with a link under it. Codex also opens your browser for you.

  1. Loopster opens in your browser with the question "Connect Codex to Loopster?" The page says Codex "will be able to do what you can do in the workspace you pick: read and edit tables, run functions, and start enrichment", and that enrichment "spends from that workspace's wallet". Pick the workspace Codex should work in from the Workspace menu, then click Connect.

The Connect Codex to Loopster? page with a short description, a Workspace menu, a Connect button and a Cancel button.

  1. The browser shows "Authentication complete. You may close this window." Close it and go back to the terminal. Codex prints "Successfully logged in."

A terminal showing the codex mcp add loopster command and its output: Codex added the global MCP server loopster, detected OAuth support, started the OAuth flow and printed a link to open in the browser. The line "Successfully logged in." appears under the link, above a new prompt.

  1. Start Codex, then type /mcp. Codex lists Loopster as connected, with its tool count. For example, the line reads "loopster: connected (92 tools)".

Codex after the /mcp command. Under MCP Tools it lists codex_tui as connected with 12 tools and loopster as connected with 92 tools.

How do I ask Codex to build a table?

  1. Type your request in plain words. For example: "Find 5 software companies in the United States in Loopster Data and put them in a new table called MCP demo. Then add a Company profile column and run it. Keep the reply short."

  2. Answer any approval prompts. Codex asks before it runs each Loopster tool that changes something. The next section explains the prompts.

  3. Wait for Codex to finish. For this request it took about a minute. Codex then tells you what it built: a new table with five US software companies from Loopster Data, and a Company profile column that ran for all five rows.

Codex in the terminal after it finishes. It lists calls to the Loopster tools update_column, trigger_rows and get_run, then a short closing message that the table was created with five software companies and that Company profile ran for all five.

Why does Codex ask before it runs a Loopster tool?

Codex asks before each Loopster tool that changes something. The prompt reads Allow the loopster MCP server to run tool "create_table"? The tool name changes from prompt to prompt.

For the requests in this article, Codex asks about tools such as create_table, update_column, trigger_rows and run_function.

Codex gives you four options:

  • Allow

  • Allow for this session

  • Always allow

  • Cancel

Some of the tools these prompts cover can spend from your wallet, so read the tool name before you choose Always allow.

Where is the new table, and what should I check?

  1. In Loopster, go to Home. The new workbook is the top row. Click it, then open the table inside the workbook.

A table named MCP demo with five numbered rows. The visible columns are Postal code, LinkedIn URL, Employees, Company record and Company profile, and Company profile shows a company name in every row. The toolbar shows Auto-run On.

  1. Check Auto-run. It is at the top left of the table toolbar. A new table can start with it on or off, so check every table.

Codex can switch Auto-run on, and in this example it did. The toolbar shows "Auto-run On", so rows added to the table later get the Company profile column automatically.

Company profile was free here. With Auto-run on, rows you add later are queued for processing, and that can spend from your wallet. To change the setting, see Run columns safely: Auto-run, test one row, then run the rest.

How do I let Codex run a function?

Codex can run a function only after you switch on Agents can run this function for it.

  1. In Loopster, open the function's page. In the panel on the right, under Access permissions, switch on Agents can run this function. The help text under the switch ends with "Runs bill normally."

The Company industry from domain function page. The panel on the right shows Access permissions, with the Agents can run this function switch turned on and help text under it that ends with "Runs bill normally."

  1. In Codex, ask it to run the function. For example: "Run the Company industry from domain function on hubspot.com."

  2. Codex runs the function and tells you the result. For this function and this domain, it reports the industry as Information Technology.

Every step inside a function bills as it would in a table, for every input. To learn more about functions, see Functions and Sandbox Mode.

What if Codex says a function is not enabled for agent access?

If Agents can run this function is switched off, Codex cannot run the function. The run fails with a 403 error that says "This function is not enabled for agent access." Switch on Agents can run this function for that function, then ask Codex again.

How do I see which agents are connected, and disconnect Codex?

  1. Open Settings, then Loopster API.

  2. Find Connected agents. The page describes them as "AI agents authorized to use this workspace over MCP. Each acts with the permissions of the person who connected it." Codex has a row there.

  3. Click Disconnect on the Codex row. You can disconnect an agent at any time.

The Loopster API page in Settings. It shows the API Keys section, the Create a key form with a name box, a role menu set to Editor — read, write and run, an expiry menu set to Never expires, a Can't start paid work tick box and a Create key button, and a Connected agents section with a row named Codex and a Disconnect button.

How do I connect Codex with an API key instead?

Use an API key for scripts, or for tools that can't sign in.

  1. Open Settings, then Loopster API. The Create a key form is on the same page, above Connected agents.

  2. Type a name, pick a role, pick when the key ends, and click Create key. The roles are Member (read only), Editor (read, write and run) and Admin (everything an API key can do). For every field, see Create and revoke a Loopster API key.

Name the key after what will use it, and give it the least access it needs. The page says "Name it after what will use it. Give it the least access that integration needs."

You can tick Can't start paid work to stop the key from starting paid work.

A Loopster API key starts with loopster_sk_. The page says "Keep them secret; do not share them publicly."

  1. Quit Codex by typing /quit.

  2. Put your key in an environment variable. The command below uses the name LOOPSTER_API_KEY. Then add the server with this command:

codex mcp add loopster --url https://app.loopster.ai/api/mcp --bearer-token-env-var LOOPSTER_API_KEY

A terminal where Codex has just quit, with its closing message above a new prompt. The command codex mcp add loopster --url <a href="https://app.loopster.ai/api/mcp" rel="nofollow noopener noreferrer" target="_blank">https://app.loopster.ai/api/mcp</a> --bearer-token-env-var LOOPSTER_API_KEY is typed at the prompt.

The key stays in an environment variable, so it never appears in the command.

To cut a key off, click Revoke on its row under Settings, then Loopster API.

Can Codex spend from my wallet?

Yes. Tools that run enrichment or functions can spend from your workspace's wallet. The wallet holds real dollars, not credits. These tools can spend:

  • trigger_rows runs enrichment. Without rowIds it runs every row in the table.

  • run_function runs a function. Every step inside it bills as it would in a table, for every input.

  • insert_rows adds rows. It spends only when the table's Auto-run is on.

  • create_table spends for every starter type except blank, webhook and search.

In this example, the table and the function run cost nothing.

Good to know

  • Codex works in the workspace you pick on the consent page, and it can do what you can do there.

  • Signing in through the browser needs no API key.

  • With an API key, the tools work in the workspace that owns the key.

  • Codex can list and run only the functions that are published and have Agents can run this function switched on.

More about the API and MCP:

Did this answer your question?