Is the assistant able to write python syntax via dynamo MCP that would make an http get request?
I don’t have the opportunity to test this myself
Is the assistant able to write python syntax via dynamo MCP that would make an http get request?
I don’t have the opportunity to test this myself
Best to test for yourself as real use cases will be far more involved, but yes.
Ran it live, zero prep beyond reading your question, got the expected result after less than two minutes using one prompt.

The authoring process took WAY less time than it took to get the screen recording into a format that the forum could support (not that I was counting, but it was 12 minutes from the time the raw recording was saved to when I got a GIF out of it it that was under the 10mb limit).
Just a additional thought, any HTTP request depending on the place it is going may have specific security protocol/processes to go through and may actually be HTTPS so you need to be fully compliant with these requirements too.
Adequate token/login methods should be properly thought out too.
Yep - that was what I was alluding to with the ‘test for yourself as real use cases will be far more involved’.
Authentication for say APS is doable though, and I imagine that AA would make quick work of it (though not as quick as this).
The standard Python install is going to limit the code to the built in http and urllib libraries. This is OK but you will miss out on the widely used requests and httpx libraries as options.
Check out my post here for details on adding additional libraries to Dynamo Python.
Also look at the msal library which works with Microsoft credentials for authorisation
Hmmmm…
I’m wondering if the tool would find a way around that by creative work-around… The tool seems scary good at finding another way when given the right prompt (i.e. it wouldn’t respond to “write a script that converts mpeg to gif”, but it did direct me to a download of ffmpg and wrote a script to execute such via the subprocess module).
![]()
It’s not too difficult to discover the python interpreter, install pip or uv and load in libraries, run once and delete the node. Although then you have to question what other payloads could be delivered this way?
Anyhow, apropos of nothing, here is some code
import subprocess
import sysconfig
import textwrap
from pathlib import Path
# Get exe location for Python interpreter
pyexe = Path(sysconfig.get_path("data")) / "python.exe"
SUBPRCS_ARGS = {
"shell": True,
"text": True,
"check": False,
"stdout": subprocess.PIPE,
"stderr": subprocess.STDOUT,
}
UV_INSTALL = [
"powershell",
"-ExecutionPolicy",
"ByPass",
"-c",
"irm https://astral.sh/uv/install.ps1 | iex",
]
UV_UPDATE = [
"uv",
"self",
"update",
"--system-certs",
]
UV_INIT = ["uv", "init", "--bare", "--python", pyexe]
UV_PIN = ["uv", "python", "pin", pyexe]
def get_uv():
uvexe = Path.home() / ".local" / "bin" / "uv.exe"
if uvexe.exists():
comm = UV_UPDATE
else:
comm = UV_INSTALL
return subprocess.run(comm, **SUBPRCS_ARGS) # noqa: PLW1510
def is_pinned():
pv = Path.cwd() / ".python-version"
return pv.exists() and pv.open().readline().strip() == str(pyexe)
def setup_uv_python(comm=None):
# Requires COMSPEC to be cmd.exe or PowerShell >=7
if not (Path.cwd() / "pyproject.toml").exists():
comm = UV_INIT + ["&&"] + UV_PIN
elif not is_pinned():
comm = UV_PIN
if comm:
return subprocess.run(comm, **SUBPRCS_ARGS) # noqa: PLW1510
return subprocess.CompletedProcess(None, None)
def uv_install(package=None, upgrade=False, requirements=None):
# **WARNING** Do not use without pinning Dynamo Python
# Otherwise will install to the system python
assert is_pinned()
comm = ["uv", "pip", "install"]
args = ["--system-certs", "--link-mode=copy", "--system"]
if upgrade:
args.append("--upgrade")
if requirements and Path(requirements).exists():
comm += ["--requirements", requirements] + args
elif isinstance(package, str):
comm += package.split() + args
elif isinstance(package, list) and all(isinstance(p, str) for p in package):
comm += package + args
else:
raise TypeError(
"Input is not string or list of python modules nor a requirements file"
)
return subprocess.run(comm, **SUBPRCS_ARGS) # noqa: PLW1510
OUT = []
# Comment out after first run
OUT.append(get_uv().stdout)
OUT.append(setup_uv_python().stdout)
# Uses 'uv pip' to install to Dynamo Python interpreter
OUT.append(textwrap.fill(uv_install(*IN).stdout, 50))
alternatively you can use HttpClient ( System.Net.Http namespace )
# Load the Python Standard and DesignScript Libraries
import sys
import clr
import System
import json
from System.Text import Encoding
clr.AddReference("System.Net.Http")
from System.Net.Http import HttpClient, StringContent
from System.Net.Http.Headers import AuthenticationHeaderValue, MediaTypeWithQualityHeaderValue
def post_json():
url = "https://httpbin.org/post"
response_data = {}
client = HttpClient()
try:
# add headers
client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue("application/json") )
payload = {
"name": "Cyril",
"job": "BIM something or other"
}
jsonRequest = json.dumps(payload, ensure_ascii=False)
httpContent = StringContent(jsonRequest, Encoding.UTF8, "application/json") # Content-Type
#
response = client.PostAsync(url, httpContent).GetAwaiter().GetResult()
jsonResponse = response.Content.ReadAsStringAsync().GetAwaiter().GetResult()
response.EnsureSuccessStatusCode()
response_data = json.loads(jsonResponse)
#
except Exception as e:
print(f"Error: {e}")
finally:
client.Dispose()
return response_data
result = post_json()
OUT = result["json"], result["headers"]
I tested it with the AI Assistant; after an initial attempt using requests, it correctly suggested a solution using urllib. However, I am surprised that the AI Assistant automatically executes the scripts to check for Python coding errors
( There should be a human validation step beforehand. )
There is if you prompt it correctly.
Paraphrasing your prompt:
Make a Python node that uses requests
And AA responded with “done”.
A better prompt might have been:
Before we start to make a graph can you recommend a bit of that uses requests? We’ll add it to a node after reviewing the recommendation.
In those cases AA will respond with a code snippet in most cases.
Welcome to the agentic world. PS: I think you can use French in conversations with the agent, which may or may not help with getting the intermediate step.
No matter how good the prompt is, the AI agent AUTOMATICALLY runs the script at the end to check the code and correct itself. I would have liked it to show me the code and ask for my permission before running it (or set an option execute automatically) .
Perhaps the code doesn’t run when there’s a transaction. I haven’t tested it yet.
It’s your prompt.
Try this:
In the current Dynamo workspace I’d like to use a Python node to call requests - what might the Python script look like?
This video below shows my result. Note that the outcome here was a non-functional script due to environment issues. However assistant told me it wouldn’t work, and my intent here is to show getting Autodesk Assistant to ‘show the script’ before it sends it to the Dynamo environment. This method also works for sandbox - in fact I had to reduce the video size before I could post it so I asked assistant to provide a script that would reduce the resolution using a Python node by way of FFMPEG, validated I like what it produced, and then told it to put the result into a Python node on canvas.
I understand, but I think there’s an MCP Dynamo tool that might benefit from some improvements.