The MCP server of the AI Suite comes with three console commands. Without Composer, you call typo3/sysext/core/bin/typo3 instead of vendor/bin/typo3.
| Command | Purpose |
|---|---|
| ai-suite-mcp:create-token | Generates a token without going through the OAuth flow. For tests, local clients and automation, not for regular operation. |
| ai-suite-mcp:cleanup | Cleans up expired OAuth data, session and task files. Mandatory in production. |
| ai-suite-mcp:server | Starts a local MCP server via stdio, see Local stdio transport. |
Generate token
The command issues a token directly and thus bypasses the OAuth flow. This is practical for tests and automated environments, but does not belong in regular operation. For everyday use, the backend module “AI Suite” under “MCP” (in a narrow view via “More”) is the right way.
Since version 0.12.0, --user and --audience are required. --user takes the UID or the username, there is no default account any more. --audience is the canonical resource URI the token is bound to, for example [typo3-url]/aisuite-mcp, because the console has no request host to derive it from. --client sets the client ID (default mcp-inspector). Without --scopes, the token receives all scopes the user is authorized for, requested scopes are cut down to these. The validity is determined by mcpTokenLifetimeDays, such a token cannot be refreshed.
The command refuses to run while enableMcp is off, for a disabled user and for a user without the permission enable_mcp_access. Since version 0.12.0, the same applies to ai-suite-mcp:server.
--workspace=<uid> binds the token to a workspace.
vendor/bin/typo3 ai-suite-mcp:create-token --user=1 --audience="https://[typo3-url]/aisuite-mcp" --workspace=3
Generate token for a backend user
vendor/bin/typo3 ai-suite-mcp:create-token --user=1 --audience="https://[typo3-url]/aisuite-mcp"
Token with restricted scopes
vendor/bin/typo3 ai-suite-mcp:create-token --user=admin --audience="https://[typo3-url]/aisuite-mcp" --scopes="mcp:read mcp:write mcp:generate"
Token for a specific client
vendor/bin/typo3 ai-suite-mcp:create-token --user=1 --audience="https://[typo3-url]/aisuite-mcp" --client=claude-code
Cleanup
The command removes:
- authorization codes older than 10 minutes
- tokens whose access and refresh token expired more than 37 days ago (fixed value, independent of the lifetime settings)
- revoked tokens older than 30 days. They are permanently deleted from
tx_aisuite_oauth_tokensto comply with the right to erasure. Until then, they remain as soft deletes, so that the reuse of a rotated refresh token can still be detected as theft. After that, the signal is worthless anyway. - session files under
var/aisuite_mcp_sessions/older than twicemcpSessionTimeoutSeconds, but at least one hour (so one hour with the default value) - task files under
var/mcp_tasks/older than 30 days - since version 0.12.0, client registrations unused for 30 days that no longer hold an active token
In production, the command should run at least hourly, via the scheduler or via system cron. If it does not run, the table of authorization codes grows without limit, the directories for sessions and tasks fill up, and expired tokens pile up. On installations with many concurrent users, it is worth looking at the row count in tx_aisuite_oauth_tokens. If it grows faster than it is cleaned up, smaller values for mcpRefreshIdleDays and mcpRefreshMaxLifetimeDays (OAuth) or mcpTokenLifetimeDays (tokens from the MCP screen and the CLI) help.
Clean up expired data
vendor/bin/typo3 ai-suite-mcp:cleanup