Skip to content

python_install_packages

MCP tools › Run, test and tasks

Install Python packages into the selected virtual environment (no shell), using uv when the project or environment uses it and uv is on PATH, else pip; installer and notes say which and why. Without packages and imports, installs every unsatisfied declared dependency. imports maps unresolved import names to distributions (e.g. yaml to PyYAML). System or pyenv interpreters are refused. Dry run unless dry_run false: returns would_run; a real run needs the run right and returns exit code and last output lines. Logged.

Its results carry text from process, web: the client is told to treat that as data, never as instructions.

Capabilityexecution.python_install_packages
AreaRun, test and tasks
Accesschanges processes
Reachesprocess, network
Rightsrun, trusted-project
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
packagesarray of stringRequirements such as requests>=2.31; omit (together with imports) to install every declared dependency the environment does not satisfy.
importsarray of stringModule names as written in an import the language server cannot resolve, e.g. yaml; each is mapped to the distribution to install (SPEC-0117 v4 behaviour 8).
dry_runbooleanOnly return the command (default true).

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project python_install_packages
Input schema as JSON
{
"type": "object",
"properties": {
"packages": {
"description": "Requirements such as `requests>=2.31`; omit (together with `imports`) to install every\ndeclared dependency the environment does not satisfy.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"imports": {
"description": "Module names as written in an `import` the language server cannot resolve, e.g. `yaml`;\neach is mapped to the distribution to install (SPEC-0117 v4 behaviour 8).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dry_run": {
"description": "Only return the command (default true).",
"type": [
"boolean",
"null"
]
}
}
}