Model Context Protocol (MCP) is a protocol that allows agents to connect to servers that expose operations (specific functionalities). Agents rely on these operations to execute external actions in a controlled way.
GeneXus for Agents provides a GeneXus MCP Server. It is a long-running process (daemon/service) that exposes GeneXus concrete operations that enable agents to perform actions such as:
- Create a new Knowledge Base
- Open an existing Knowledge Base
- Create or modify objects (for example, Transaction objects, Procedure objects, etc.)
- Define object rules
- Configure properties
- Build
- Run
- Export objects to text format
- Import objects from text files into the Knowledge Base
GeneXus for Agents is designed around the use of an Agentic CLI (such as CODA CLI, Claude Code CLI, or any other CLI compatible with LLMs or AI agents), where you submit requests in natural language. The gx CLI serves as an intermediary between the Agentic CLI and the GeneXus MCP server, which executes the necessary operations to fulfill those requests.
When an operation executed by the GeneXus MCP Server requires authentication and there is no valid session, the sign-in process is started in the browser through GeneXus Platform.
After signing in:
- If the user belongs to more than one active Organization, the available Organizations are displayed so that the user can select which one to work with.
- If the user belongs to only one active Organization, it is selected automatically.
If you do not belong to any Organization, see GeneXus for Agents - Troubleshooting access issues.
For automated processes, such as tests or continuous integration pipelines, you can authenticate the GeneXus MCP Server with a GeneXus Platform API key without opening a browser. The user associated with the API key must have a valid GeneXus for Agents Seat.
Configure the following environment variables to enable unattended authentication:
| Variable |
Description |
| Host__IdpApiKey |
GeneXus Platform API key, exactly as provided, without decoding sequences such as %2B or %2F. |
| Host__IdpApiKeyClientId |
Client ID of the batch application. |
| Host__IdpApiKeyClientSecret |
Client Secret of the batch application. |
| Host__IdpOrganizationId |
Optional. Specifies the Organization to use when the user has a Seat in more than one Organization. |
To obtain the MCP Server version using gx CLI, open a terminal and run:
gx --mcp-version.
The version obtained is the GeneXus product version shared by the MCP Server and its Business Logic (BL).
The same version is also available through the MCP Server's /version endpoint. For a server running locally on the default port, use: curl http://localhost:1989/version.