To answer from a database, connect it at query time instead. See Connect a PostgreSQL database with MCP.
API Reference:
Before you start
- Create with an API key. A connector keeps running in the background, and every sync runs as the key that created it. Creating one with a console session is refused. The other calls also accept a console session.
- Scopes. The key needs
read:files,write:files,read:vector-storesandwrite:vector-storesto create, change, sync, link, unlink or delete a connector. Listing, retrieving and browsing connectors, and reading their runs and objects, needread:vector-stores. - No end user. Connector endpoints return
400when the request carriesX-On-Behalf-Of. A connector mirrors team knowledge, not one end user’s files, so leave the header off every call on this page. - Who can manage it. The principal that created the connector, and organization admins.
- Who can search it. Mirrored files are governed by the access settings of the vector store they are mirrored into. Permissions set at the source, such as who may open a file in SharePoint, are not copied: everyone who can use a linked vector store can search everything the connector mirrors.
- Limits. A file larger than 25 MB, or of a type that cannot be indexed, is skipped and reported with the reason. It does not fail the sync.
Connect S3-compatible storage
Create an access key that can list the bucket and read its objects, and nothing more. On AWS that iss3:ListBucket on the bucket and s3:GetObject on its objects.
The connector validates the location and the credential by listing once, so a wrong bucket, region or key is refused at creation with a message that names the problem.
With auto_sync on and at least one store in vector_store_ids, the first sync starts at once.
credentials_configured and never returns them.
Response
location.endpoint with the service’s https address. The location and the chunking strategy are fixed at creation; to change either, create a new connector.
Connect SharePoint Online
The connector reads SharePoint with an app that your Microsoft administrator registers in your own Microsoft Entra tenant. There is no interactive sign-in.- In the Microsoft Entra admin center, register an app and note its Application (client) ID and Directory (tenant) ID.
- Give the app a Microsoft Graph application permission to read sites and grant admin consent. Use
Sites.Selectedto limit the app to the sites you choose, then grant it thereadrole on each of those sites.Sites.Read.Allalso works and lets the app read every site in the tenant. - Create a client secret for the app and note its value and its expiry date.
Choose what to mirror
A connector mirrors everything under its prefix or folder unless you narrow it withinclude_patterns and exclude_patterns.
A file is mirrored when it matches at least one include pattern, or there are none, and matches no exclude pattern. Exclude always wins.
Patterns are paths relative to the connector’s prefix or folder, and they are case-sensitive:
Browse the location to see what the current rules select. Browsing reads the source live, one folder at a time, works before any sync has run, and changes nothing.
selected, which says whether the current rules mirror it. Pass a folder’s path to open it, and next_cursor as cursor for the next page.
Set the rules at creation, or change them later. A rule change starts a sync at once while auto_sync is on, and files the rules no longer select are removed from the index.
Sync
Withauto_sync on, the connector syncs every sync_interval_minutes, from 15 minutes to 7 days (10080). With auto_sync off it syncs only when you ask, and the files already mirrored stay as they are.
Run a sync once at any time. A request made while a sync is running returns that run.
- A new file is uploaded and indexed.
- A file whose content changed is replaced. Unchanged files are not downloaded again.
- A file that was deleted at the source, or that the rules no longer select, is removed from every linked store.
- A renamed or moved file is removed under its old path and added under its new one in the same sync.
Check a sync
The connector’sstatus is syncing while a run is in progress, error when the last run failed, and idle otherwise. last_run summarizes the most recent run.
List the runs, then open one to see every file it skipped or failed and why.
Response
status of mirrored, skipped or failed, and a mirrored object carries the file_id of its file.
Search mirrored files
Mirrored files are ordinary vector store files, so search and retrieval in a response work unchanged. Each mirrored file carries two attributes:connector_id, and source_path, the file’s full path as the source shows it. Use them to filter search to one connector, or to show where a result came from.
Link and unlink vector stores
One connector can feed several vector stores. Linking a store attaches the connector’s current files to it at once, without downloading them again.vector_store_id.
Change a connector
An update changes the name, the credential, the selection rules or the sync settings. Fields you leave out are unchanged. Rotate the source credential by sending the new one. It takes effect at the next sync.auto_sync to false.
Delete a connector
Deleting a connector unlinks it from every store and deletes its files. The removal runs in the background, and the connector showsstatus: "removing" until it is gone.