Setting up MCP servers in CodexUse
MCP (Model Context Protocol) servers let your AI coding assistant access external tools and context. CodexUse Pro provides a GUI for managing these servers without editing JSON.
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 the Settings gear in the top bar.
- Navigate to the MCP Servers 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:
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 MCP configuration files the CLI uses. When you add or edit a server:
- The change is saved to your CLI's MCP config (typically in
~/.codex/or similar). - The next CLI session picks up the new server automatically.
- You can still edit the JSON directly 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
| Server type | Use case | Package |
|---|---|---|
| SQLite | Query local databases | @anthropic/mcp-server-sqlite |
| Postgres | Query remote/local Postgres | @anthropic/mcp-server-postgres |
| Filesystem | Read files in directories | @anthropic/mcp-server-filesystem |
| Git | Access git history and diffs | @anthropic/mcp-server-git |
| Fetch | Make HTTP requests | @anthropic/mcp-server-fetch |
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?
Yes. MCP server controls are a CodexUse Pro feature. The free tier does not include MCP configuration.
Where are MCP settings stored?
CodexUse writes MCP configuration to the same files the CLI uses. Changes sync automatically; you can also edit the JSON directly if preferred.