Chat Export

v1.0.4
io.github.svergio/chat-export-server Checked 20 hours ago Published 21 days ago

Local MCP for eight logged-in LLM UIs via the Chat Export Chrome extension on 127.0.0.1.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

browsers_list

List Chrome profiles currently connected through the Chat Export extension bridge. Use before browsers_bind to pick a browserId; use browsers_status for the already-bound session only.

browsers_bind

Set the active browserId for subsequent chat/project/job tools. Call after browsers_list; does not open tabs by itself. Prefer browsers_status to inspect the current binding without changing it.

ParameterTypeDescription
browserId *stringbrowserId from browsers_list

browsers_status

Show the currently bound browserId, connection state, and recent alerts. Prefer over browsers_list when you already bound a browser and only need health/permissions.

platforms_list

List supported providers and whether each is enabled on the server and the bound browser. Requires browsers_bind for browser-side enablement; use before chats_* when unsure which platforms are available.

platforms_capabilities

Read composer capabilities (models, modes, toggles, attach) from the bound browser tab.

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
refreshboolean

chats_list

List chats for one platform in the bound browser (titles/ids, optional query). Prefer for discovery; use projects_chats for chats inside one project, chats_get for a full payload, chat_outline for turn indexes. Requires prior browsers_bind.

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
cursorstring | nullOpaque pagination cursor from a previous chats_list response; null/omit for first page
includeProjectChatsbooleanWhen true (default), also include chats that live inside projects/folders
limitintegerMax chats to return (1-100)
querystringOptional title/text search filter when the provider supports it

chats_get

Return the full ExportPayload for one chat on the bound browser. Prefer for a complete dump of a known chatId; for turn index/previews use chat_outline, for a bounded slice use chat_read, for offline SQLite reuse use chat_cache_*. Empty chatId = currently open tab. Requires browsers_bind.

ParameterTypeDescription
chatId *stringChat id, or empty string for the currently open tab
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
branchstringConversation branch: active thread only, or all branches when the provider supports them

chat_outline

Build a turn index with short previews for a chat (auto-warms the SQLite cache for long threads). Prefer before chat_read to choose start/end indexes; use chats_get for the full payload, chat_cache_read when the cache is already warm. Empty/omitted chatId = open tab. Requires browsers_bind.

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
branchstringConversation branch: active thread only, or all branches when the provider supports them
chatIdstringChat id; omit or empty for the open tab
previewCharsintegerPreview length per turn (40-300 chars)

chat_read

Read a bounded slice of chat turns with a maxChars cap (uses/auto-fills the SQLite cache). Prefer after chat_outline for start/end indexes; use chats_get for the entire chat, chat_cache_read for offline cache-only access. Requires browsers_bind when the cache miss needs a host fetch.

ParameterTypeDescription
chatId *stringChat id to read
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
branchstringConversation branch: active thread only, or all branches when the provider supports them
endintegerExclusive end turn index from chat_outline
maxCharsintegerHard cap on returned characters (200-20000)
startintegerInclusive start turn index from chat_outline

chats_export

Export one chat via extension builders and write files under exportDir (returns paths). Prefer for durable files; use chats_get for in-memory payload, jobs_enqueue kind=export/export_batch for bulk/async queues. Set async:true to return job_id instead of blocking. Requires browsers_bind; writes to disk.

ParameterTypeDescription
chatId *stringChat id to export
formats *arrayOne or more export formats to write
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
asyncbooleanWhen true, enqueue via jobs and return job_id instead of blocking
branchstringConversation branch: active thread only, or all branches when the provider supports them
outDirstringAbsolute path under HOME; default server exportDir

chats_create

Create a new chat on the provider UI in the bound browser and seed it with text. Prefer chat_ask when you also need to wait for the assistant reply; use chats_create only to open/seed a chat. Requires browsers_bind and allowCreate on the extension.

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
text *stringInitial user message text to place in the new chat
filesarray
modestring
modelstring
titlestringOptional title when the provider supports setting one
togglesarray
toolsarray

chats_send

Send a follow-up message in an existing chat via the bound browser.

ParameterTypeDescription
chatId *string
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
text *string
filesarray
modestring
modelstring
togglesarray
toolsarray

chat_ask

Send a prompt on a platform (new or existing chat) via the bound browser and wait for the assistant reply. Prefer over chats_create+manual wait; use jobs_enqueue kind=ask or wait:false for non-blocking. Requires browsers_bind; drives live provider UI (openWorld).

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
prompt *stringUser prompt to send
browserIdstringOverride bound browserId for this call only
chatIdstringExisting chat id; omit to create/continue per platform defaults
filesarrayLocal files to attach to the prompt
modestringProvider mode/style id when applicable
modelstringProvider model id when the UI exposes a model picker
timeout_sintegerMax seconds to wait for the assistant reply (10-300)
titlestringOptional title when creating a new chat
togglesarrayProvider UI toggle ids to enable
toolsarrayProvider tool/plugin ids to enable
waitbooleanDefault true; false returns job_id immediately

chat_cache_sync

Fetch a chat from the bound browser and store blocks+FTS5 in the temp SQLite cache. Prefer before repeated chat_cache_read on long threads; use chat_outline/chat_read when you need live outline/slice without an explicit sync. Writes local cache only; requires browsers_bind for the host fetch.

ParameterTypeDescription
chatId *stringChat id to sync into the local cache
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
branchstringBranch selector when the provider supports multiple branches
browserIdstringOverride bound browserId for this sync
forcebooleanWhen true, refresh even if a cache copy already exists

chat_cache_read

Read cached chat blocks from local SQLite by turn range, blockId, or FTS query without hitting the browser. Prefer after chat_cache_sync/chat_outline; use chat_read when the cache may be cold and a live fetch is OK. Identify the copy via cacheId or platform+chatId.

ParameterTypeDescription
blockIdstringSpecific cached block id to return
cacheIdstringCache row id from a previous sync/outline
chatIdstringChat id when selecting cache by platform+chatId
endTurnintegerExclusive end turn index
maxCharsintegerHard cap on returned characters (200-200000)
platformstringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
querystringFTS5 search query over cached turn text
startTurnintegerInclusive start turn index

chat_cache_append

Append turns to an existing local SQLite cache copy and refresh FTS/totals. Prefer for incremental offline updates; use chat_cache_sync to rebuild from the live tab, chat_cache_update_block to edit one turn. Does not write to the provider UI.

ParameterTypeDescription
turns *arrayOne or more turns to append
cacheIdstringCache row id to append into
chatIdstringChat id when selecting cache by platform+chatId
platformstringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity

chat_cache_update_block

Update one cached block (bumps revision) or resync that turn from the live tab via resyncFromHost. Prefer for surgical cache edits; use chat_cache_append to add turns, chat_cache_sync to refresh the whole chat. Local cache only unless resyncFromHost needs the bound browser.

ParameterTypeDescription
turnIndex *integerZero-based turn index of the block to update
cacheIdstringCache row id containing the block
chatIdstringChat id when selecting cache by platform+chatId
contentstringReplacement content when not resyncing from host
platformstringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
resyncFromHostbooleanWhen true, refresh this turn from the live provider tab instead of content
rolestringOptional role override for the block

chat_cache_delete

Delete a temp SQLite cached chat (metadata, blocks, FTS). Does not delete the provider chat — use chats_delete for that. Identify via cacheId or platform+chatId. Idempotent on missing rows.

ParameterTypeDescription
cacheIdstringCache row id to delete
chatIdstringChat id when selecting cache by platform+chatId
platformstringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity

projects_list

List projects/folders (containers) on a platform via the bound browser. Prefer this over containers_list (identical legacy alias). Use projects_chats for chats inside one project, chats_list for all chats. Requires browsers_bind.

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
cursorstring | nullOpaque pagination cursor; null/omit for first page
limitintegerMax projects to return (1-100)
querystringOptional name filter when the provider supports it

containers_list

Legacy alias identical to projects_list. Prefer projects_list for new agents; same args and result. Lists projects/folders on a platform via the bound browser.

ParameterTypeDescription
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
cursorstring | nullOpaque pagination cursor; null/omit for first page
limitintegerMax projects to return (1-100)
querystringOptional name filter when the provider supports it

projects_chats

List chats inside one project/container on the bound browser. Prefer over chats_list when scoped to a known containerId; use projects_list first to discover ids. Requires browsers_bind.

ParameterTypeDescription
containerId *stringProject/container id from projects_list
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
cursorstring | nullOpaque pagination cursor; null/omit for first page
limitintegerMax chats to return (1-100)

projects_create

Create a project/folder on the provider UI. Prefer when organizing chats; does not create chats (use chats_create/chat_ask). Requires browsers_bind and allowProjects on the browser.

ParameterTypeDescription
name *stringProject/folder display name
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
descriptionstringOptional project description
instructionsstringOptional custom instructions for the project

projects_delete

Permanently delete a project/folder on the provider. Destructive: requires confirm:true, allowProjects, and allowDestructive on the browser. Prefer projects_move_chat to rehome chats first. Does not delete local SQLite cache rows.

ParameterTypeDescription
confirm *booleanMust be true to proceed with deletion
containerId *stringProject/container id to delete
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
namestringOptional name hint for UI confirmation matching

projects_move_chat

Move a chat into a project, or pass containerId null to remove it from its project. Prefer over delete when reorganizing. Requires browsers_bind and allowProjects.

ParameterTypeDescription
chatId *stringChat id to move
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
containerIdstring | nullTarget project id; null/omit-as-null removes the chat from its project

chats_delete

Permanently delete a chat on the provider UI. Destructive and audited: requires confirm:true plus allowDestructive on server and browser. Prefer chats_export first if you need a copy; chat_cache_delete only removes local cache.

ParameterTypeDescription
chatId *stringChat id to delete on the provider
confirm *booleanMust be true to proceed with deletion
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity

jobs_enqueue

Enqueue a background job on the bound browser lane (ask, export, export_batch, delete, delete_batch) and return job_id immediately. Prefer for long/bulk work; use chat_ask/chats_export synchronously when you can wait. Poll with jobs_status; cancel with jobs_cancel. Requires browsers_bind; delete kinds need confirm + allowDestructive.

ParameterTypeDescription
kind *stringBackground job kind for the bound browser lane
platform *stringProvider id: chatgpt | grok | grok-x | claude | copilot | qwen | deepseek | perplexity
branchstringBranch selector when applicable
browserIdstringOverride bound browserId for this job
chatIdstringTarget chat id for ask/export/delete
chatIdsarrayChat ids for batch export/delete
confirmbooleanRequired true for delete/delete_batch
filesarrayAttachments for ask
formatsarrayExport formats for export kinds
maxintegerMax items for batch jobs
modestringProvider mode id for ask
modelstringProvider model id for ask
outDirstringOutput directory for export kinds
promptstringPrompt text when kind=ask
querystringOptional filter query for batch discovery
testOnlybooleanWhen true, validate only without mutating
timeout_sintegerPer-op timeout seconds for ask-like work (10-300)
titlestringOptional title when creating a chat for ask
togglesarrayProvider toggle ids for ask
toolsarrayProvider tool ids for ask

jobs_status

Get status, progress, result, or error for a job_id from jobs_enqueue. Prefer for polling one job; use jobs_list to browse many. Local job store only.

ParameterTypeDescription
job_id *stringJob id returned by jobs_enqueue

jobs_list

List background jobs newest-first with optional status/kind/browser filters. Prefer over repeated jobs_status when surveying the queue; use jobs_status for one job_id detail.

ParameterTypeDescription
browserIdstringFilter jobs for one browserId
kindstringBackground job kind for the bound browser lane
limitintegerMax jobs to return (1-200)
statusstringFilter by job status string

jobs_cancel

Cancel a queued job immediately, or request cancel for a running job. Prefer when stopping work started via jobs_enqueue/chat_ask wait:false. Does not roll back provider-side side effects already applied.

ParameterTypeDescription
job_id *stringJob id to cancel