MCP Mode & AI Agent Integration
Manage instance profiles and packages through the Trident CLI's Model Context Protocol tools.
Last updated on
What is MCP?
The Model Context Protocol (MCP) is a standard for AI agents to interact with external tools. Polymerium's CLI (trident) can run as an MCP server, exposing 30+ tools that AI agents can call directly.
An agent can create instances, inspect and add packages, select versions, and export modpacks through these tools. Deployment and launch remain desktop or CLI commands; snapshots are created in the desktop app.
Starting the MCP Server
trident --mcpThis starts a local MCP server over stdio. Install the trident CLI separately, then connect an MCP client to it.
Configuration for AI Clients
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"polymerium": {
"command": "trident",
"args": ["--mcp"]
}
}
}Cursor
Add as an MCP tool server in Cursor's settings, pointing to trident --mcp.
Other Clients
Any client that supports MCP over stdio can connect. The server speaks the standard MCP protocol.
Available Tools (30+)
Instance Tools
| Tool | Description |
|---|---|
instance_list | List all instances |
instance_inspect | View instance details |
instance_create | Create a new instance |
instance_delete | Delete an instance |
instance_unlock | Unlock an imported instance's source binding |
instance_reset | Clear the Run Directory (build/); data not already in Local Data (persist/) is lost |
instance_export | Export instance as a modpack |
instance_import | Import a modpack file |
instance_install | Install a repository modpack as a new instance |
Package Tools
| Tool | Description |
|---|---|
package_list | List installed packages |
package_search | Search CurseForge / Modrinth for packages |
package_add | Add a package by Pref |
package_inspect | View package details |
package_enable / package_disable | Toggle packages |
package_dependency_list | List a package's dependencies |
package_dependent_list | List installed packages in this instance that depend on a package |
package_version_list | List available versions |
package_version_set | Pin a specific version |
Loader Tools
| Tool | Description |
|---|---|
loader_list | List supported mod loaders |
loader_version_list | List available loader versions |
loader_get / loader_set | Get or set the loader |
Config Tools
| Tool | Description |
|---|---|
config_get / config_set | Read/write configuration |
config_list / config_unset | List or remove config keys |
Account Tools
| Tool | Description |
|---|---|
account_list | List accounts |
account_add_offline | Add an offline account |
account_remove | Remove an account |
Repository Tools
| Tool | Description |
|---|---|
repository_list | List configured repositories |
repository_status | Check repository connectivity |
repository_add / repository_remove | Add or remove repositories |
Native Patch Tools
| Tool | Description |
|---|---|
patch_list | List an instance's imported and user patches |
patch_set_enabled | Enable or disable a patch |
patch_move | Reorder a patch within its layer |
Example: Build a Package List
These calls use the tool names and required parameters exposed by the current server:
instance_create(name="Performance", version="1.21.1",
loader="net.fabricmc:0.16.10", identity="perf-pack")
package_search(query="sodium", repository="modrinth")
package_add(pref="pref://modrinth/aC3cM3Vq", instance="perf-pack")The search result supplies the Pref for the package you choose. The added reference is saved in the profile; use the desktop app or trident instance build --instance perf-pack to deploy it. To take a snapshot before changing versions, use the desktop app first.
Limitations
- MCP runs locally over stdio. It does not expose deployment, game launch, snapshot creation, or Microsoft account sign-in tools.
- A package tool changes profile data; it does not install game files until you deploy.
- CLI account settings are separate from desktop accounts. Both hosts can access the same instances, so avoid editing an instance from both at the same time.