Skip to main content
Glama

cookie_import

Import cookies in bulk from JSON, header strings, Netscape files, or curl arguments to restore browser session state.

Instructions

Bulk-import cookies. Three input modes — pick whichever is easiest:

1. cookies=[{...}]            inline array of dicts (DevTools / EditThisCookie shape)
2. file_path="..."            JSON file (array OR storage_state {"cookies":[...]})
3. raw_text="..."             paste any of these and we auto-parse:
                                • JSON array / object (same shapes as 1+2)
                                • Header string: "name=val; name2=val2" or
                                  "Cookie: name=val; name2=val2"
                                • Netscape cookies.txt (tab-separated)
                                • curl --cookie / -b argument string
   NOTE: header / netscape formats lack domain — pass default_domain=".example.com"
   (or call this AFTER navigate so the active tab's URL provides it).

Per-cookie fields (when JSON):
  {"name":"...", "value":"...", "domain":".example.com", "path":"/",
   "expires":1234567890, "secure":true, "httpOnly":false, "sameSite":"Lax"}

Args:
    cookies: inline array
    file_path: JSON file
    raw_text: any cookie text — format auto-detected
    default_domain: fallback domain for header / netscape cookies (or auto-uses
        current tab URL's host)
    clear_first: wipe all existing cookies before import (default False)

For full cookies + localStorage + sessionStorage restore, use storage_state_load.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cookiesNo
file_pathNo
raw_textNo
default_domainNo
clear_firstNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Latest Blog Posts

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/RobithYusuf/mcp-stealth-chrome'

If you have feedback or need assistance with the MCP directory API, please join our Discord server