Skip to content

Connect Codex to Informat MCP

Overview

Informat provides a built-in MCP Server. Once Informat MCP is configured in Codex, you can use conversations to query applications, create data tables, configure workflows and dashboards, write scripts, create scheduled tasks, and validate and publish applications.

This guide explains how to connect Codex to Informat MCP and uses the creation of a project management system to demonstrate the recommended workflow.


Prerequisites

Before you begin, prepare the following:

  • The URL of your Informat service, such as https://next.informat.cn
  • Your Informat user API Key
  • A working installation of Codex

You can obtain your Informat user API Key at:

text
https://{your Informat service URL}/workbench/account/apikey

Security Notice

An API Key represents the identity of the current user. Do not commit it to a Git repository, paste it into public documentation, or share it with unauthorized individuals. Replace <X-INFORMAT-USER-APIKEY> in the examples with your own API Key.


Configure Informat MCP in Codex

Step 1: Open the Codex MCP Configuration

Find the MCP Server configuration in Codex settings. To apply the configuration to all projects, edit the global Codex configuration. To use it only in the current project, use a project-level configuration.

Step 2: Add the Informat MCP Server

Add the following configuration:

json
{
    "mcpServers": {
        "informat_mcp": {
            "url": "{your Informat service URL}/web0/mcp/event",
            "headers": {
                "X-INFORMAT-USER-AKEY": "<X-INFORMAT-USER-APIKEY>"
            },
            "disabled": false
        }
    }
}

Configuration Details

  • informat_mcp: The MCP Server name. You can customize it, but keeping this name is recommended for easy identification.
  • url: The Informat MCP Server URL, such as https://next.informat.cn/web0/mcp/event.
  • X-INFORMAT-USER-AKEY: Your Informat user API Key.
  • disabled: Whether the MCP Server is disabled. Set it to false to enable the server.

Step 3: Reload Codex

After saving the configuration, restart Codex or create a new task so that the MCP tools can be loaded.

Note

After adding an MCP configuration, the tool list in an existing Codex task may not refresh immediately. If this happens, restart Codex or create a new task. Do not assume the Informat MCP service is unavailable simply because its tools do not appear in the current task.

Step 4: Verify the Connection

Enter the following prompt in Codex:

text
Use informat_mcp to list the Informat applications I can access.

If Codex returns the applications accessible to the current account, the connection is working.


Use Codex to Create an Informat Application

Ask Codex to produce an application blueprint first, then review and approve it before creation. This helps avoid duplicate applications and unexpected data structures.

Example prompt:

text
Use informat_mcp to create a brand-new project management system.

Requirements:
1. Name the application "Project Management System."
2. Include six tables: Projects, Tasks, Milestones, Risks, Worklogs, and Project Members.
3. Create a project initiation approval workflow.
4. Create a project management dashboard.
5. Create an overdue-task reminder script and a scheduled task that runs daily.
6. Before creating anything, produce an application blueprint and wait for my approval.
7. When creation is complete, validate the application but do not publish it automatically.

When creating a complete application, follow this sequence:

  1. Query existing applications to avoid modifying the wrong application or creating a duplicate with the same name.
  2. Create the application and save the actual application ID returned by Informat.
  3. Query the application's designer definition and existing data tables.
  4. Create the primary table.
  5. Query the primary table structure to obtain the actual table ID and field IDs.
  6. Create the child tables and their RelationRecord foreign-key fields one by one.
  7. Query the child table structures, then create related fields such as LookupList in the primary table.
  8. Create the workflow module, process definition, nodes, and transitions.
  9. Create the dashboard module and add its cards one by one.
  10. Read the Informat Script SDK documentation before creating scripts.
  11. Use the actual script ID to create the scheduled task.
  12. Call the pre-publication validation tool to check the draft configuration.
  13. Publish the application only after the user explicitly confirms.

Why Structures Must Be Queried Repeatedly

Informat MCP creation APIs return the actual object IDs. Subsequent relationship, workflow, dashboard, and automation configurations must use the IDs returned by the platform; do not infer IDs from names.


Workflow Creation Guidelines

When creating a workflow, first create the workflow module and process definition. Then query the process definition to obtain the start node ID generated by the system.

Follow these guidelines:

  • The start form and all user task nodes must be bound to the same business table.
  • Read the Informat expression documentation before configuring expressions for approvers, instance names, transition conditions, and similar settings.
  • The start node must have at least one outgoing transition.
  • A rejection action can use a jump button to return to the "Initiator Revision" node.
  • After creating nodes and transitions, query the process definition again to confirm that the nodes and topology are complete.

Dashboard Creation Guidelines

Before creating dashboard cards, query the data table structure and read the Informat dashboard UI presets.

  • Use a consistent theme throughout a dashboard.
  • Dashboards use a 24-column grid; the total width of the cards in each row must equal 24.
  • A Number card must be bound to an actual data table and business field.
  • A ProChart card must have a non-empty, valid data source and chart series.
  • Use the platform-defined count field for aggregate count output.
  • Column IDs in a Record card must come from actual table fields.

Scripts and Scheduled Tasks

Before saving an Informat script, read the Script SDK documentation and the documentation for every module used by the script, for example:

  • script/table.md
  • script/notification.md
  • script/date.md

Methods invoked by scheduled tasks, automations, or APIs must be explicitly exported using ES Module syntax:

javascript
export function checkOverdueTasks() {
    // Business logic
}

Script Syntax Boundaries

Informat scripts use JavaScript, not Informat expressions. Use SDK APIs such as informat.table.* and informat.notification.* when calling platform capabilities from a script. Do not copy ${...} expression syntax directly into a .js script.

When creating a scheduled task, scriptId must come from the script list query, and scriptFunc must match the name of a function actually exported by the script.


Validation and Publication

After creating the application, run pre-publication validation first:

text
Use informat_mcp to run pre-publication configuration validation on the current application. Do not publish it.

An empty validation result, [], means that no configuration errors were found.

Publishing is a production write operation and takes effect immediately for real users. Codex should publish an application only after the user explicitly confirms. Before publishing, query the application's historical publication count and pass the confirmation parameters required by the MCP tool.


Get the Correct Application URL

The application web-root tool in MCP returns the root URL of the Informat site, for example:

text
https://next.informat.cn/

This is not the full URL of a specific application. An application URL has the following format:

text
https://{your Informat service URL}/app/{appId}

For example, if the application ID is jvz0rcb9hx1ji, its URL is:

text
https://next.informat.cn/app/jvz0rcb9hx1ji

The designer URL has the following format:

text
https://{your Informat service URL}/designer/{appId}/setting/info

FAQ

MCP Tools Are Not Visible After Configuration

Restart Codex or create a new task after saving the configuration. MCP tools are usually loaded when a task is initialized.

A 401 or Permission Error Is Returned

Check whether X-INFORMAT-USER-AKEY is correct and still valid, and whether the current user has access to or design permissions for the target application.

Creating a Relationship Field Fails

Query the target table and field structures first. Confirm that tableId, nameFieldId, and the foreign-key field ID are actual values returned by the platform.

A Script Can Be Saved but Cannot Be Called by a Scheduled Task

Check that the function is explicitly exported with export function, and confirm that the scheduled task is bound to the actual scriptId returned by the script list query.

The Application URL Is Incorrect After Publication

Do not use the site root URL returned by MCP directly. Append /app/{appId} to construct the application-specific URL.

Can I Test-Run a Script Immediately After Creating It?

Use caution. Scripts that send notifications, modify records, or call external APIs have real side effects. You can run pre-publication configuration validation first. If a test run is necessary, explain its impact clearly and obtain confirmation before proceeding.