Documentation

Guide / Codex

Codex MCP setup: codex mcp add for Resilis

Add the Resilis MCP server to Codex CLI, complete OAuth sign-in, and check the connection before asking Codex to work with your cloud resources.

Before you start

Install Codex CLI and sign in to a Resilis account with access to the organization you want to use. Keep your application source in a workspace Codex can access. Connecting to the Resilis MCP server does not require a paid plan; resource operations still require the relevant permissions and billing.

Add the Resilis MCP server

Register Resilis as a remote MCP server from your terminal:

Terminal

codex mcp add resilis --url https://mcp.resilis.io

Sign in and review access

Start OAuth sign-in and use the browser to sign in to Resilis. Select an organization if prompted, then review the requested access before approving it.

Terminal

codex mcp login resilis

Check the connection

Run these commands to check that Resilis is configured and enabled at https://mcp.resilis.io using streamable HTTP. A listed entry alone does not prove authentication: if Auth says Not logged in, complete sign-in. In a Codex session, /mcp should show the Resilis server and its available tools without an authentication error.

Terminal

codex mcp list
codex mcp get resilis

What you can do once connected

Resilis exposes the following MCP tools for the organization you authorize. Availability depends on account permissions, plan limits, and the selected resource and compute target. Review the requested action before approving a change.

Deploy a workspace

Deploy the reviewed commit from this workspace to my development environment. Confirm the project, compute target, and configuration with me before starting.

Inspect a deployment

Show the deployment status for my development app and the last 50 build or runtime log entries. Do not change any resources.

Create a database

Create a private PostgreSQL database in the project and environment I choose, after I approve the capacity and configuration.

Prepare a rollback

Prepare an app rollback to the historical deployment I select. Explain that it does not restore database data, then ask for my approval.
  • Deploy a reviewed local workspace with workspaces.deploy; the client handles the local Git steps before Resilis verifies the uploaded commit.
  • Check deployment status with deployments.get and inspect bounded build or runtime logs with logs.build and logs.runtime.
  • Create a managed PostgreSQL or MySQL database with databases.create.
  • Request an app rollback to an authorized historical deployment with deployments.rollback. App rollback does not restore data or reverse database migrations.

Deploy your app from Codex

After connecting, follow the getting-started documentation to deploy a reviewed workspace. Git is required; GitHub is unnecessary for this route. Source is transferred to private Resilis-hosted Git. Review the files, secrets, build settings, and environment variables before authorizing deployment to the chosen project, environment, and compute target. Once it finishes, check the deployment status, logs, and running app. Start with a request like this:

Prompt

Inspect this application workspace and prepare a Resilis deployment plan. Ask me which project, environment, and compute target to use. Show the detected build settings and required environment variables so I can review them before the deployment starts.

Troubleshoot OAuth and sign-in

If the browser does not open, copy the authorization URL printed in the terminal and open it manually. If the shell asks for a callback URL, follow that prompt in the terminal rather than sharing the URL with your agent.

If the browser signs in to the wrong Resilis account, sign out of that browser session and sign in with the intended account before authorizing again. For the wrong organization, check that the account is a member of the intended organization and select it when prompted during authorization.

If authorization has expired or been revoked, clear the stored credentials with codex mcp logout resilis, then run codex mcp login resilis to authorize again. Use the same reset if you need to replace an existing grant after correcting the account or organization. Signing in again does not restore organization membership or permissions that were removed.

Reset authorization

codex mcp logout resilis
codex mcp login resilis

Troubleshoot a server that is not listed

Run codex mcp list in the same CLI setup where you added Resilis. Check the server name and remote URL. In a Codex session, /mcp shows active servers. If Resilis is missing, review the add command and the configuration used by that session before adding it again.

Troubleshoot permission and authorization prompts

Client tool approval and Resilis authorization are separate checks. Review each prompt and authorize only the operation you intend. If Resilis refuses an action, check organization membership, scope, target capability, and required production confirmation. Do not bypass a refusal. A working connection does not authorize all production changes.