DocsReference
MCP server
Control ModelDeck from an MCP client: list, load and chat with models, and run benchmarks.
What it does
ModelDeck runs an MCP server, so an agent such as Claude Code, Codex or Hermes can drive the app: see what is loaded, list, load and unload models, chat with a model, search and download from Hugging Face, run benchmarks, read the request log, and change the server and on-demand loading settings. Each tool does the same thing as the matching button in the app.
Address
http://127.0.0.1:8098/mcp
The MCP server is always on while ModelDeck runs. It has its own port, 8098, on your Mac's loopback interface, at the path /mcp. It stays up when you stop the local server, so an agent can start the server again. While the local server runs, the same endpoint is also at /mcp on the server's own address.
The transport is MCP Streamable HTTP. Requests must come from this Mac: ModelDeck rejects a Host or Origin that is not local, which stops web pages from reaching it.
If you set an API key in Settings > Local server, the MCP server needs the same key, as Authorization: Bearer <key> or x-api-key: <key>.
Add it to a client
ModelDeck does not show a ready-made MCP snippet yet. Use your client's command for an HTTP MCP server, with the address above. Ask the modeldeck_status tool for the exact mcp_url once you are connected through either path.
For Claude Code:
claude mcp add --transport http modeldeck http://127.0.0.1:8098/mcp
# With an API key set in ModelDeck:
claude mcp add --transport http modeldeck http://127.0.0.1:8098/mcp --header "Authorization: Bearer $MODELDECK_API_KEY"
Then ask the agent to call modeldeck_status. It returns the ModelDeck version, the server address, memory in use and the loaded models.
Tools
| Tool | What it does |
|---|---|
modeldeck_status | Version, server address and MCP address, memory in use, and the models loaded now. Start here. |
modeldeck_list_models | Downloaded models with the model_id to use in API calls. query filters by name or repo; loaded_only lists only running models. |
modeldeck_load_model | Loads a model with its last-used settings and waits until it is ready. Checks memory first. if_insufficient_memory can be unload_idle, wait, refuse or load_anyway; without it the app setting applies. |
modeldeck_unload_model | Stops a loaded model and frees its memory. |
modeldeck_chat | Sends one prompt to a local model and returns the reply. system, max_tokens (default 1024) and temperature are optional. Loads the model first if needed. |
modeldeck_search_models | Searches Hugging Face for models ModelDeck can run, with a fit verdict for this Mac. format is any, gguf, mlx or splash. |
modeldeck_download_model | Starts a download into the library and returns at once. For a GGUF repo, quant picks the file, for example Q4_K_M. |
modeldeck_list_downloads | Downloads and their progress. |
modeldeck_cancel_download | Cancels a download by its id. |
modeldeck_run_benchmark | Measures a model and saves the result to the Benchmark screen. test is speed (about a minute) or accuracy (the built-in ModelDeck Eval, several minutes). |
modeldeck_benchmark_results | Saved speed and accuracy results, for every model or one. |
modeldeck_recent_requests | The latest requests other apps sent to the local server, with status, speed and errors. Useful when a client cannot reach a model. |
modeldeck_server_settings | Whether the server runs, its port, whether it starts with the app, and the on-demand loading settings. |
modeldeck_configure_jit | Turns loading on first request on or off, for the app or one model, and sets the idle time before a model unloads (0 means never). |
modeldeck_server | Starts, stops or restarts the local server, and sets whether it starts with the app. |
A model can be named by its model_id, library id, display name or repository. Long tool output is cut at 25,000 characters; narrow the request if you see the note.
Things to know
- Stopping the server with
modeldeck_servercuts off every app that uses it but unloads nothing. - Whether the server starts with the app can be changed only through
modeldeck_server; it is on by default. - Loads through MCP get the same memory check as loads from the app and the API. A refused load returns an error that names the models in the way.
- If port 8098 is taken by another app, the dedicated MCP port does not start. The endpoint on the local server's address still works.
Coming in the next release
Headless mode (modeldeck serve) runs this MCP server too, with no window. See Headless mode and the CLI.