morfiade
Python client for the Morfiade local API. Script real Chrome profiles on your own Windows machine — list, create, launch, stop, set proxies, attach Playwright — each profile with its own cookies, sessions and proxy.
from morfiade import Morfiade
api = Morfiade() # address and token are found automatically
for p in api.profiles():
print(p["name"], "running" if p["running"] else "stopped", p["proxy"])
info = api.start("shop-1", url="https://example.com/")
print(info["ws"]) # DevTools address for Playwright / Puppeteer
One file, standard library only, Python 3.7+. Русская версия — README.ru.md.
Install
pip install morfiade
Requirements
- Windows 10 or 11
- Morfiade 3.36 or newer, running
- Local API enabled in its settings
- The "API" checkbox ticked on the profiles a script may touch; unticked profiles do not exist as far as the API is concerned. Profiles created through the API are ticked automatically
- A valid licence to launch profiles (the check lives in the program)
Where the token comes from
Nothing to copy by hand in the usual case. First match wins:
Morfiade(url=..., token=...);MPC_API_URL/MPC_API_TOKEN— Morfiade sets them for scripts it runs from its own Scripts tab, so those need no setup;MORFIADE_API_URL/MORFIADE_API_TOKEN;- Morfiade's
config.jsonfor the current Windows user (MORFIADE_CONFIGpoints at another one). The token is stored there encrypted with Windows DPAPI and can be decrypted only under the same Windows account.
Two ways to drive a profile
start() tells you which one applies:
transport |
What you get | Use it with |
|---|---|---|
"port" |
ws — a DevTools address |
playwright.chromium.connect_over_cdp(ws), puppeteer.connect — see examples/playwright_attach.py |
"extension" |
no address, on purpose | api.cdp(...) and api.evaluate(...) — see examples/extension_cdp.py |
"none" |
the window only | nothing — tick a checkbox below and restart the profile |
Which one a profile gets is set by two checkboxes in Morfiade: Debug mode
gives it a port, antidetect without debug mode gives it the extension. A
profile with neither — a freshly created one, for instance — starts with no
control channel at all: the window opens, and start() says "none" (Morfiade
3.37 and older fail instead, after a 20-second wait). Tick Debug mode on
profiles you want to open in Playwright.
Why the second one exists: a debugging port on Chrome's command line is enough for Google to refuse sign-in, whatever else you do. Profiles that need a Google account run without it, and Morfiade passes CDP commands through its own extension instead.
Methods
Program: ping(), status()
Profiles: profiles(), profile(name), start(profile, url=None),
stop(profile), session(profile), create_profile(name, proxy=None,
proxy_type="http", category=None, note=None, note_title=None)
Recycle bin: trash(profile), trash_list(), restore(profile) — and
delete_profile(profile), which deletes for good after a zip backup. Emptying
the bin is not in the API at all: that stays with a human.
Proxy, tags, notes: set_proxy(profile, proxy, proxy_type="http"),
check_proxy(profile=None, proxy=None, proxy_type="http"),
tags(profile, tags=None), note(profile, note=None, title=None)
Running profile: cdp(profile, method, params=None, tab=None),
evaluate(profile, expression, tab=None)
Scripts: scripts(), run_script(script, profiles=None, timeout=120)
Window synchronizer: sync_windows(), sync_sets(name=None, lines=None),
sync_spread(set_name, profiles=None), sync_insert(set_name, leader=None)
Anything newer than this client: api.call("/route", {...}).
Proxy passwords never come back from the API — profiles() shows them masked —
and value sets come back as counts, not values.
Errors
A refusal raises MorfiadeError carrying the program's own reason, so there are
no ok fields to check. Subclasses tell the common cases apart:
| Exception | Meaning |
|---|---|
NotRunning |
nothing on the address: Morfiade is closed or its API is off |
Unauthorized |
the token was reissued in Morfiade's settings |
UnknownRoute |
the installed Morfiade is older than this call — update it |
Reasons come from the program and follow its interface language, so the wording may be your own.
Command line
morfiade status
morfiade profiles
morfiade start shop-1 https://example.com/
morfiade stop shop-1
See also
- morfiade-mcp — the same program for AI agents over MCP
- Manual — the local API section
License
MIT for everything in this repository — see LICENSE. Morfiade itself is a separate commercial product with its own terms.
Metadata
Release files for morfiade 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| morfiade-0.1.0.tar.gz | 11.4 kB | Without provenance | Details for morfiade-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| morfiade-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for morfiade-0.1.0-py3-none-any.whl |
Total release size: 23.2 kB
Release files / morfiade-0.1.0.tar.gz
| Download URL | morfiade-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
449bf791f859933c5f41c5638612a1adbb83873794d2c42806e1c49e6044907b
|
|
BLAKE2b-256 checksum How to use checksums |
ff1f0d04504637f15401bd395bb1e2e7c49368c5dd246c9f277f3c24deb3adaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / morfiade-0.1.0-py3-none-any.whl
| Download URL | morfiade-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ee49d46083cfeab8637fbf24fb9d4264bfb428f0e58867eed0bee46deff6fa5
|
|
BLAKE2b-256 checksum How to use checksums |
cb51effa75da41a0bcde5971b41963893d3b6fea06f8804d9e70d35574c5187f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for morfiade 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.