Polymerium
Advanced

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 --mcp

This 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

ToolDescription
instance_listList all instances
instance_inspectView instance details
instance_createCreate a new instance
instance_deleteDelete an instance
instance_unlockUnlock an imported instance's source binding
instance_resetClear the Run Directory (build/); data not already in Local Data (persist/) is lost
instance_exportExport instance as a modpack
instance_importImport a modpack file
instance_installInstall a repository modpack as a new instance

Package Tools

ToolDescription
package_listList installed packages
package_searchSearch CurseForge / Modrinth for packages
package_addAdd a package by Pref
package_inspectView package details
package_enable / package_disableToggle packages
package_dependency_listList a package's dependencies
package_dependent_listList installed packages in this instance that depend on a package
package_version_listList available versions
package_version_setPin a specific version

Loader Tools

ToolDescription
loader_listList supported mod loaders
loader_version_listList available loader versions
loader_get / loader_setGet or set the loader

Config Tools

ToolDescription
config_get / config_setRead/write configuration
config_list / config_unsetList or remove config keys

Account Tools

ToolDescription
account_listList accounts
account_add_offlineAdd an offline account
account_removeRemove an account

Repository Tools

ToolDescription
repository_listList configured repositories
repository_statusCheck repository connectivity
repository_add / repository_removeAdd or remove repositories

Native Patch Tools

ToolDescription
patch_listList an instance's imported and user patches
patch_set_enabledEnable or disable a patch
patch_moveReorder 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.

On this page