Setting up MCP servers in CodexUse
MCP (Model Context Protocol) servers let your AI coding assistant access external tools and context. CodexUse provides a GUI for managing these servers without hand-editing config.toml.
What MCP servers do
MCP servers extend what your AI coding CLI can see and do:
- Database context: Connect to Postgres, MySQL, or SQLite to give the AI your schema.
- API documentation: Serve your internal API docs so the AI knows your endpoints.
- File system access: Provide access to specific directories or file types.
- Custom tools: Run scripts, queries, or commands the AI can invoke.
Adding an MCP server
- Open CodexUse and click Settings in the sidebar.
- Open the MCPs tab.
- Click Add server.
- Fill in the server details:
- Name: A label for this server (e.g., "Postgres Dev")
- Command: The command to start the server
- Arguments: Any command-line arguments
- Environment: Environment variables the server needs
- Click Save. The server is now configured.
Example: SQLite database server
To give your AI access to a local SQLite database:
Replace MCP_SERVER_PACKAGE with the MCP server package you want to run.
Once saved, the AI can query your database schema and help with SQL.
Example: File system server
To expose specific directories to the AI:
Managing multiple servers
You can add multiple MCP servers. Each appears in the list with controls to:
- Edit: Change the command, arguments, or environment.
- Toggle: Enable or disable a server without deleting it.
- Delete: Remove the server configuration entirely.
Disabled servers stay in the config but aren't started when you launch the CLI.
How CodexUse handles the config
Under the hood, CodexUse writes to the same config.toml the Codex CLI uses. When you add or edit a
server:
- The change is saved to your CLI config (typically
~/.codex/config.toml). - The next CLI session picks up the new server automatically.
- You can still edit
config.tomldirectly if you prefer; CodexUse reads it on next open.
Troubleshooting MCP servers
| Symptom | Likely cause | Action |
|---|---|---|
| Server not starting | Command not found in PATH | Use full path to the executable or ensure npx is available |
| AI can't see the server | Server disabled in config | Check the toggle in MCP Servers settings |
| Permission denied errors | File or DB not readable | Check file permissions on the target resource |
| Changes not taking effect | CLI session still running | Restart the CLI session to pick up new config |
Common MCP server types
- SQLite: Query local databases
- Postgres: Query remote or local Postgres
- Filesystem: Read files in directories
- Git: Access git history and diffs
- Fetch: Make HTTP requests
Package names vary by server. Use the package name from the MCP server you want to run.
Best practices
- Name servers descriptively: "prod-db" vs "dev-db" helps you keep track.
- Disable unused servers: Every running server uses resources. Toggle off what you don't need.
- Test commands first: Run the command in your terminal before adding it to CodexUse.
- Use environment variables: Don't hardcode credentials; use the Environment field.
Related
What is MCP?
MCP (Model Context Protocol) is a standard for connecting AI coding assistants to external tools and data sources. MCP servers provide context like database schemas, API docs, or custom tools.
Does MCP require Pro?
No. MCP server controls are available on both Free and Pro.
Where are MCP settings stored?
CodexUse writes MCP configuration to the same config.toml the CLI uses. You can also edit
config.toml directly if preferred.