Context7 MCP

Import a library bundle

Import pre-parsed libraries into an airgapped on-premise install, as a JSON body or a Context7 Cloud export file
1 min read
posthttps://your-instance.example.com/api/import-libraries
Request example
Response
posthttps://your-instance.example.com/api/import-libraries

Authorization

Authorizationstringheaderrequired#
API key generated from Personal Settings. See Authentication.

Query parameters

forceboolean#
Overwrite libraries that already exist. Handy when posting a piped export body, which carries no force field. Without it, existing libraries are skipped.

Default: false

Body

application/json · multipart/form-data
librariesobject[]required#
The libraries to import. Each carries its full snippet content; embeddings are recomputed on this install.
Show child attributes
projectstringrequired#
Library identifier, e.g. /your-org/your-repo
titlestring#
descriptionstring#
typestring#
Source type of the library (e.g. repo, website, openapi)
languagestring#
branchstring#
docsRepoUrlstring#
docsSiteUrlstring#
totalTokensinteger#
codeSnippetsobject[]required#
Show child attributes
idstring#
titlestring#
descriptionstring#
languagestring#
codeListobject[]#
Show child attributes
languagestring#
codestring#
tokensinteger#
infoSnippetsobject[]required#
Show child attributes
idstring#
contentstring#
breadcrumbstring#
tokensinteger#
forceboolean#
Overwrite libraries that already exist on this install

Default: false

Responses

application/json
Libraries accepted and queued for import
messagestringrequired#
queuedstring[]required#
Library identifiers queued for import
skippedobject[]required#
Libraries that were not imported, with a reason
Show child attributes
projectstring#
reasonstring#