The developer tools Claude Code, Codex and other tools that can set the “Authorization” header connect to the integrated MCP server of the instance with a personal MCP token. The token works with any instance – including one running in a subdirectory of the server – you set it up once, and it needs no interactive sign-in, which also makes it suitable for an agent running unattended.
The procedure has two common steps – generating the token and storing it in an environment variable – followed by the configuration of the tool itself.
1. The address of the server
The MCP server has the address “/mcp” in the root of the instance of NET Genium:
http(s)://<server>/<path-to-the-instance>/mcp
| Instance in a subdirectory | https://server/netgenium/mcp |
| Instance in the root of the site | https://netgenium.company.com/mcp |
| NET Genium Online | https://identifier.netgenium.online/mcp |
The universal address of NET Genium Online “https://netgenium.online/mcp” does not work with a personal token – with a token, always enter the address of your own instance.
A signed-in administrator can verify the address in a browser: the address of the server shows them the information page of the API. The instance does not serve it to other visitors.
2. The personal MCP token
2.1. Generating the token
The client identifies itself to the server with a personal MCP token in the form “ngt_...”. Each user generates their own token:
- Click the avatar on the right side of the header and choose MCP token in the personal menu. The “Change password” dialog opens on the “MCP token” tab.
- Click Generate token. The token appears in the field, but it becomes valid only after saving.
- Turn on the Reading all data and the model via the MCP server permission – and Writing all data and the model via the MCP server only if the assistant is meant to change the data or the applications as well.
- Click Save. Only then are the token and its permissions created.
- Copy the token while the dialog is open. It is displayed in readable form only once. Only its fingerprint is stored on the server.

The token is valid for 90 days. Once it expires, an Extend token button appears and generates a new token – which, too, comes into existence only when you save. Each user has at most one token and can delete it at any time. Unlike the other changes, deleting is not saved and the access ends immediately.
Only a user with administrator rights can have either permission. Besides the data they cover the implementation model as well: it can be read with either of them, and changed only with the second one. A token with neither box ticked is left with the knowledge of the framework – that one is given to every token whose owner has administrator rights and is not excluded by the list “Administrators with access to the MCP server”. The details of the token permissions are described in the guide The integrated MCP server.
Details
- After generating, the token has reading turned on if its owner may use the MCP server (an administrator not excluded by the list “Administrators with access to the MCP server”). Other users get only the “Access via a custom API” permission, which any user can have. The anonymous user cannot have a token.
- The “MCP token” item in the personal menu is shown only to administrators and only on a desktop. Other users reach the “MCP token” tab through the “Change password” item.
- The “Administrator” user (ID 1) sees the Other users' tokens section at the end of the “MCP token” tab – in it they can delete the tokens of others and switch their permissions – reading and writing only for users with administrator rights and, if the list “Administrators with access to the MCP server” is filled in, only for the users in it.
- Access is verified on every request. It is ended by the expiry or deletion of the token, the owner losing administrator rights, removal from the list “Administrators with access to the MCP server”, a licence key that does not allow AI, an IP address outside the allowed ones and exhausted licences – the licences are checked only when a new session is created. Expiry of the owner's password does not block access, because the token does not depend on the password. Signing the session out in the list of users online does not end the access – the next request with a valid token signs in again.
- Access through the MCP server consumes one licence, just like a regular login. Unlike signing in with a web browser, however, it refuses even a user with administrator rights when the licences are exhausted.
- An extended token takes over the permissions of the original token.
2.2. Values for your instance
Next to the token, the “MCP token” tab has three fields with ready-made values for your instance. The icon next to each one copies it to the clipboard, so you do not have to assemble anything in the steps that follow by hand:
| Field | What it contains | Where you use it |
| Server address | the address of the MCP server of your instance | in the configuration of a tool that is set up by hand |
| Environment variable | the command that stores the token in an environment variable | in the Windows command prompt – see the following section |
| Setup prompt | the text with which you have the connection set up by your AI tool | in Claude Code, Codex or another AI tool that writes its configuration on its own |
The setup prompt is written independently of the tool, so every AI tool writes the entry where it belongs for it.
2.3. Storing the token in an environment variable
The token is a credential – do not write it into configuration files. Store it in an environment variable and only refer to that variable in the configuration. Configuration files are usually part of version control and the token would reach the source code server with the nearest commit.
On Windows you create the variable with the command from the Environment variable field. For the instance at the address “https://identifier.netgenium.online” it looks like this, for example:
setx MCP_TOKEN_IDENTIFIER_NETGENIUM_ONLINE "ngt_..."
The real token is in the field only right after it has been generated. Later a “ngt_…” placeholder is shown instead. The name of the variable is derived from the address of the instance by the rule described in the chapter The name of the server and the environment variable.
The new value only takes effect in newly started programs – after creating or changing the variable, restart your AI tool. After extending the token you only change the value of the variable, the configuration stays as it is.
3. Claude Code
3.1. Setting up with the prompt
Copy the ready-made text from the Setup prompt field on the “MCP token” tab and paste it into Claude Code started in the root of the project. Claude Code creates the “.mcp.json” file on its own, with the address of your instance and with the reference to the environment variable. Finally it verifies that the variable exists and that its value starts with “ngt_”, and tells you what else to do so that it sees the server.
The server from the “.mcp.json” file – whether the prompt created it or you wrote it by hand – has to be approved by every user at the first start. Claude Code asks about it on its own.
Details
- The approval is remembered for the user and the project outside the repository. It can be written explicitly with the “enabledMcpjsonServers” array containing the name of the server in the “.claude/settings.local.json” file, which is not stored in version control. The array does not belong in the shared “.claude/settings.json”, because it would enable the server for the whole team without asking.
- The configuration is loaded at start-up, so after creating or changing “.mcp.json”, “.claude/settings.local.json” or the environment variable with the token, a new session has to be started. If the environment variable is missing, Claude Code does not load the server and reports the missing variable – so an empty token is never sent.
- The “ai-model” utility looks for the server of the instance in the “.mcp.json” file by its address, not by its name, so older configurations with differently named servers keep working. It knows the address of the instance from the “ngUrl” key of its configuration file “ai-model.json”. The password in the “ngPassword” key of the same file is used for downloading and uploading the model and cannot be used as an MCP token.
3.2. Manual configuration
Claude Code reads the configuration of MCP servers from the “.mcp.json” file in the root of the project. The configuration consists of the address of your instance and two names derived from it. For the instance at the address “https://identifier.netgenium.online” it looks like this, for example:
{
"mcpServers": {
"identifier-netgenium-online": {
"type": "http",
"url": "https://identifier.netgenium.online/mcp",
"headers": {
"Authorization": "Bearer ${MCP_TOKEN_IDENTIFIER_NETGENIUM_ONLINE}"
}
}
}
}
For your instance three values differ: the address in the “url” key, the name of the server above it and the name of the variable in the “Authorization” header. You copy the address from the Server address field and derive both names by the rule in the chapter The name of the server and the environment variable.
The “${MCP_TOKEN_IDENTIFIER_NETGENIUM_ONLINE}” notation is replaced with the value of the environment variable when the file is loaded, so the token itself is not in the file. If you work with several instances, add a separate entry for each one – thanks to the rule each has its own name and its own variable, and no two of them collide.
3.3. Connecting by signing in
Claude Code can also connect by signing in, without a token: you add the server with the command “claude mcp add --transport http netgenium https://identifier.netgenium.online/mcp” with the server address of your instance and start the sign-in with the “/mcp” command in an open conversation. The personal token is the simpler choice, though – it works for an instance in a subdirectory as well and needs no interactive sign-in.
4. Codex
4.1. Setting up with the prompt
Copy the ready-made text from the Setup prompt field on the “MCP token” tab and paste it into Codex. Codex writes the entry into its configuration on its own, with the address of your instance and with the reference to the environment variable.
4.2. Manual configuration
Codex keeps the configuration of MCP servers in the “config.toml” file in the “.codex” directory of your home directory. For the instance at the address “https://identifier.netgenium.online” the entry in it looks like this, for example:
[mcp_servers.identifier-netgenium-online]
url = "https://identifier.netgenium.online/mcp"
bearer_token_env_var = "MCP_TOKEN_IDENTIFIER_NETGENIUM_ONLINE"
The “bearer_token_env_var” key carries the name of the environment variable, not the token itself – Codex reads the value at start-up and sends it in the “Authorization” header.
For your instance three values differ: the name of the server in the square brackets, the address in the “url” key and the name of the variable in the “bearer_token_env_var” key. You copy the address from the Server address field and derive both names by the rule in the chapter The name of the server and the environment variable. For every further instance you add a further entry.
4.3. Connecting by signing in
Codex can also connect by signing in, without a token: you add the server with the command “codex mcp add netgenium --url https://identifier.netgenium.online/mcp” with the server address of your instance and sign in with the command “codex mcp login netgenium”. The personal token is the simpler choice, though – it works for an instance in a subdirectory as well and needs no interactive sign-in.
5. Another tool
In a tool that connects to an MCP server over HTTP, enter:
- the address of the server – the “/mcp” address in the root of the instance – you copy it from the Server address field on the “MCP token” tab,
- the header “Authorization” with the value “Bearer ngt_...” carrying the personal MCP token.
If the tool can write its configuration on its own, use the Setup prompt from the “MCP token” tab instead.
The server also supports the “OPTIONS” request (CORS preflight), so tools running in a browser can connect to it as well.
6. The name of the server and the environment variable
The name of the MCP server in the configuration of the tool and the name of the environment variable with the token are both derived from the address of the instance by a single rule:
- the name of the server is the address without the protocol, the port and “www”, read from left to right, with dots and slashes replaced by hyphens,
- the name of the variable is the same text in upper case, with underscores instead of hyphens and with the “MCP_TOKEN_” prefix.
| Address of the instance | Name of the server | Name of the variable |
| https://identifier.netgenium.online | identifier-netgenium-online | MCP_TOKEN_IDENTIFIER_NETGENIUM_ONLINE |
| https://portal.company.com/dev | portal-company-com-dev | MCP_TOKEN_PORTAL_COMPANY_COM_DEV |
Every instance thus has a name unique across everything you connect to, and you can derive it from the address even without the dialog – the dialog, the “ai-model” utility and this guide all use the same rule. The partner MCP server has the fixed name “netgenium-framework”, and the variable “MCP_TOKEN_NETGENIUM_FRAMEWORK” comes from it by the same rewriting.
7. Troubleshooting
| Symptom | Cause and remedy |
| The server returns error 404 | A wrong address – the MCP server has the address “/mcp” in the root of the instance. Older versions of NET Genium do not know this address – the instance has to be updated. |
| The server returns the 401 error | The token is missing, invalid or has expired. Check the “MCP token” tab in your instance. The “error” key in the response tells whether the token was missing from the request (“unauthorized”) or did not pass (“invalid_token”). |
| The server returns the 405 error | A request with a valid token using a method other than POST and OPTIONS, typically GET. Without a valid token the server does not return the 405 error. The server handles only POST and OPTIONS requests. A tool that works over POST is set up correctly. From the 405 response the tool learns that the server does not offer an SSE stream. |
| The server returns the 403 error | The token is valid, but access of its owner was denied: the owner does not have administrator rights, is not in the list of administrators with access to the MCP server, the licence key does not allow AI, their IP address is not among the allowed ones in the NET Genium settings, or the licences are exhausted. The reason is given in the server response and in the “Auth” log. |
| The server returns an empty response | The “DenyLogin.txt” configuration file exists in the “Config” directory of the instance. While it exists, the integrated MCP server is disabled. A detailed description is provided in the separate guide NET Genium settings. |
| The server returns the HTTP 503 error with the text “UnderConstructionException” | NET Genium is deactivated by the “UnderConstruction.txt” configuration file. The MCP server is available again only after the file is deleted. |
| The tool reports that the method does not exist | The token does not have the corresponding permission – the writing tools and writing the model require “Writing all data and the model via the MCP server”, the reading tools “Reading all data and the model via the MCP server”, and reading the model either of the two permissions. |
| The tool does not see the server at all | The environment variable with the token is missing, the user has not approved the server, or the tool has not been restarted since the configuration changed. |
| A “please wait” page arrives instead of an answer | Repeated requests with an invalid token have activated the protection against guessing tokens, and the server does not serve any requests from that IP address for a while. The page refreshes itself after 5 seconds. Wrong passwords entered on the pages protected by a password from the NET Genium settings dialog (print templates, restart, AI model) count towards the same limit as well if a visitor who has not signed in enters them from the same IP address. The token needs to be fixed, followed by a short wait. Trying further values only prolongs the situation. |
What the server can do and which tools it offers is described in the guide The integrated MCP server. The connection you have set up is the basis of agentic development – working with an AI agent that knows both the framework and the particular implementation and can work in it purposefully. The other ways to connect are listed in the overview MCP server setup.