ampl-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| UV_INDEX | Yes | Must include https://pypi.ampl.com for resolution to succeed. | |
| AMPLKEY_UUID | No | AMPL licence UUID. Optional; without it a size-limited demo licence is used. | |
| AMPL_MCP_ALLOW_SHELL | No | Set to '1' to permit AMPL's shell and cd statements. | |
| AMPL_MCP_LICENCE_DIR | No | Override the durable licence directory. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ampl_versionA | Report server build, AMPL versions, licence tier and installed solvers. Requires no session. Call this first when anything is unexplained: a demo licence solves small models happily and fails only on larger ones, with an error that reads like a modelling problem.
|
| ampl_init_sessionA | Start an AMPL engine. No engine exists until this is called. workdir defaults to a per-session temporary directory; pass a path to work
against a real project. Every path ARGUMENT to a tool is resolved inside
it and an escape is refused - but this is not a sandbox: AMPL expression
text is not path-guarded ( |
| ampl_list_sessionsA | List live sessions and which one is current. |
| ampl_use_sessionC | Make |
| ampl_restart_sessionB | Restart the engine, discarding all model state. The recovery path. |
| ampl_close_sessionB | Dispose the engine, removing the workdir if the server created it. |
| ampl_evalA | Run AMPL statements in order, returning per-statement output and errors. Model-mode set literals need braces:
A |
| ampl_read_filesA | Load .mod/.dat/.run files by path, resolved inside the session workdir. Each file's contents are guard-checked exactly like a statement passed to
ampl_eval before AMPL is asked to load it: a That check stops at the file it is given. If the file itself loads
another file ( On a load failure, |
| ampl_set_dataA | Assign a parameter from JSON, avoiding hand-written .dat syntax.
|
| ampl_list_entitiesA | List declared entities with their shape. The map of what has been built. Call this when unsure what exists rather than guessing at names. |
| ampl_get_dataA | Read an entity's values as records.
Reading a PARAMETER can have a side effect: an indexed
|
| ampl_displayA | Evaluate an arbitrary AMPL display expression. The reach-anything tool. A This tool evaluates AMPL, so AMPL's own output redirection ( |
| ampl_solveA | Solve the current model and summarise the outcome. Returns a bounded tail of solver output, not the whole log. Read duals and reduced costs afterwards with ampl_get_data(name, suffix="dual"|"rc").
|
| ampl_sweepA | Set a scalar parameter to each value, re-solve, and collect results. Server-side so a twenty-point study is one call rather than forty round
trips; AMPL re-presolves only what changed. Each run goes through the
same shared core as ampl_solve ( A value that fails to assign (wrong parameter name, wrong type, a value
outside a declared domain) is recorded as its own failed run ( The parameter is left at whatever the LAST swept value was; this tool
never restores the value it had before the call. A later |
| ampl_optionA | Get an AMPL option, or set it when An option name AMPL does not have is an
|
| ampl_diagnoseA | Explain the last solve: status, message, and violated constraints. Call this after an infeasible or unbounded result rather than guessing at the model. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/worc4021/ampl-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server