[{"data":1,"prerenderedAt":275},["ShallowReactive",2],{"dev-\u002Fdeveloper\u002Fdocs\u002Fmcp":3},{"id":4,"title":5,"body":6,"description":265,"extension":266,"faq":267,"meta":268,"navigation":269,"noindex":270,"path":271,"seo":272,"stem":273,"__hash__":274},"content\u002Fdeveloper\u002Fdocs\u002Fmcp.md","AI assistants (MCP) — use Quicopt from Claude, ChatGPT or Claude Code",{"type":7,"value":8,"toc":257},"minimark",[9,14,37,45,50,73,77,121,135,142,146,191,194,239,243,246,253],[10,11,13],"h1",{"id":12},"ai-assistants-mcp","AI assistants (MCP)",[15,16,17,18,22,23,30,31,36],"p",{},"Quicopt runs an MCP server at ",[19,20,21],"code",{},"https:\u002F\u002Fmcp.quicopt.com",". An AI assistant\nconnected to it describes your optimization problem as Python code with\n",[24,25,29],"a",{"href":26,"rel":27},"https:\u002F\u002Fwww.pyomo.org",[28],"nofollow","Pyomo"," or ",[24,32,35],{"href":33,"rel":34},"https:\u002F\u002Fcoin-or.github.io\u002Fpulp\u002F",[28],"PuLP",", and\nQuicopt solves the model. The assistant gets back the status in plain words, a\nsummary of the model it built and the solution in the code's own variable\nnames, so it can check the model against your question before it reports the\nanswer.",[15,38,39,40,44],{},"You need a Quicopt account. ",[24,41,43],{"href":42},"\u002Fsignup","Sign up"," for free if you don't have one.",[46,47,49],"h2",{"id":48},"connect-claudeai-or-chatgpt","Connect claude.ai or ChatGPT",[51,52,53,60,67,70],"ol",{},[54,55,56,57,59],"li",{},"Add a custom connector with the URL ",[19,58,21],{},". In claude.ai,\ncustom connectors are under Settings, Connectors. In ChatGPT they need\ndeveloper mode; choose OAuth as the connector's authentication. Leave the\nfields for a client ID and a client secret empty: the assistant registers\nitself with Quicopt.",[54,61,62,63,66],{},"Connect. Your browser opens the Quicopt sign-in page at\n",[19,64,65],{},"platform.quicopt.com",". Sign in with the email address and the password from\nyour sign-up.",[54,68,69],{},"The next page names the app that asks for access and the address it will\nsend you back to. If both belong to the assistant you are using, allow\naccess.",[54,71,72],{},"Ask an optimization question, such as how to split a list of crates over\nthree trucks so that the heaviest truck carries as little as possible.",[46,74,76],{"id":75},"connect-claude-code","Connect Claude Code",[78,79,84],"pre",{"className":80,"code":81,"language":82,"meta":83,"style":83},"language-bash shiki shiki-themes github-dark","claude mcp add -s user --transport http quicopt https:\u002F\u002Fmcp.quicopt.com\n","bash","",[19,85,86],{"__ignoreMap":83},[87,88,91,95,99,102,106,109,112,115,118],"span",{"class":89,"line":90},"line",1,[87,92,94],{"class":93},"svObZ","claude",[87,96,98],{"class":97},"sU2Wk"," mcp",[87,100,101],{"class":97}," add",[87,103,105],{"class":104},"sDLfK"," -s",[87,107,108],{"class":97}," user",[87,110,111],{"class":104}," --transport",[87,113,114],{"class":97}," http",[87,116,117],{"class":97}," quicopt",[87,119,120],{"class":97}," https:\u002F\u002Fmcp.quicopt.com\n",[15,122,123,126,127,130,131,134],{},[19,124,125],{},"-s user"," makes the server available in every project; without it, Claude Code\nadds the server to the current directory only. Then run ",[19,128,129],{},"\u002Fmcp"," in Claude Code,\nchoose ",[19,132,133],{},"quicopt"," and authenticate. Your browser opens the same sign-in page as\nabove.",[15,136,137,138,141],{},"If you had added the server earlier with an API key in an ",[19,139,140],{},"Authorization","\nheader, reconnecting keeps that header. Remove the server, add it again as\nabove, and restart Claude Code before you authenticate.",[46,143,145],{"id":144},"what-the-assistant-gets","What the assistant gets",[147,148,149,159,169],"ul",{},[54,150,151,154,155,158],{},[19,152,153],{},"solve(code, time_limit?)"," runs the assistant's code, which builds a Pyomo or\nPuLP model and assigns it to ",[19,156,157],{},"model",", and sends the model to Quicopt. The code\nruns in an isolated sandbox without file or network access, so all data has to\nbe in the code.",[54,160,161,164,165,168],{},[19,162,163],{},"get_result(job_id)"," fetches the result of a solve that took longer than about\n50 seconds and answered with a ",[19,166,167],{},"job_id"," instead.",[54,170,171,174,175,178,179,182,183,186,187,190],{},[19,172,173],{},"guide(topic)"," returns a short how-to with a complete example: ",[19,176,177],{},"structured","\n(orderings such as routes and schedules, splitting items into groups,\nquantities that are 0 or within bounds), ",[19,180,181],{},"stochastic"," (uncertain data),\n",[19,184,185],{},"limits"," (model sizes and time limits) and ",[19,188,189],{},"local"," (solving a model yourself\nwith the quicopt Python package, for data in local files).",[46,192,193],{"id":185},"Limits",[147,195,196,203,213,219,225],{},[54,197,198,202],{},[199,200,201],"strong",{},"Size."," Up to 100,000 variables for a linear model (LP or MILP), or one\nthat uses orderings, groups or uncertain data; up to 1,000 variables for any\nother model, such as one with quadratic or other nonlinear terms. A model with\nuncertain data is solved over at most 1,000 scenarios.",[54,204,205,208,209,212],{},[199,206,207],{},"Time."," Quicopt chooses how long a solve runs unless the assistant sets\n",[19,210,211],{},"time_limit",", up to 120 seconds. Results are kept for 24 hours.",[54,214,215,218],{},[199,216,217],{},"Building the model."," The code must build the model within 30 seconds.",[54,220,221,224],{},[199,222,223],{},"Rate."," The server runs code at most 10 times a minute for each account;\nbeyond that, the assistant is told how many seconds to wait.",[54,226,227,230,231,233,234,238],{},[199,228,229],{},"Data in the chat."," Every number the assistant writes into the code passes\nthrough the chat. A few hundred numbers are fine. For larger data in files,\nthe ",[19,232,189],{}," guide has the assistant write a script that reads the files on\nyour computer and calls Quicopt with the ",[24,235,237],{"href":236},"\u002Fdeveloper\u002Fdocs\u002Fclients#python","Python client",".",[46,240,242],{"id":241},"staying-connected","Staying connected",[15,244,245],{},"You sign in each time you connect; Quicopt keeps no sign-in session in your\nbrowser. Once connected, the assistant stays connected as long as it uses the\nconnection at least once every 90 days. If it reports that the sign-in is no\nlonger valid, reconnect and sign in again. To disconnect, remove the connector.",[15,247,248,249,238],{},"What the server does with your code and models is set out in section 5 of the\n",[24,250,252],{"href":251},"\u002Fprivacy","privacy policy",[254,255,256],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":83,"searchDepth":258,"depth":258,"links":259},2,[260,261,262,263,264],{"id":48,"depth":258,"text":49},{"id":75,"depth":258,"text":76},{"id":144,"depth":258,"text":145},{"id":185,"depth":258,"text":193},{"id":241,"depth":258,"text":242},"Connect an AI assistant to Quicopt through the MCP server at mcp.quicopt.com. The assistant writes a Pyomo or PuLP model, Quicopt solves it and answers with the status, a model summary and the solution.","md",null,{},true,false,"\u002Fdeveloper\u002Fdocs\u002Fmcp",{"title":5,"description":265},"developer\u002Fdocs\u002Fmcp","XNFGeDki5DaNkOgXMsHgobc2zeghM5zt0n3ZIdKixxs",1795538843958]