Connect a system to Inferrex
Inferrex connects a system by its API address. Nothing is saved, and nothing may be reported as working, until a live signed-in read has returned data.
When to use
- "Connect our order system to Inferrex."
- "Add this API as a system."
- "The system I added is stuck waiting for review."
Do not use this to fix a system that used to work. Use inferrex-diagnose-flow or inferrex-replace-credentials.
Prerequisites
One of these must be available. Check before you start and say which you are using.
- InferrexMCP: an MCP server at
https://mcp.inferrex.com/mcp, connected by sign-in or with an API key in a header. Tool names below are InferrexMCP tools. - InferrexAPI:
https://api.inferrex.comwith the headerX-API-Key: $INFERREX_API_KEY.
The key needs the scopes connections:read, connections:write and workspace:read.
You also need from the user:
- The address of the system's API, starting
https://. - The name their team uses for the system.
- Its credentials. Best is the name of a secret saved in the app at Workspace settings, Secrets. The user may paste the credential instead: see Credentials below.
Credentials
Ask first for the name of a saved secret, and say why: the value then never passes through this tool.
If the user wants to paste the credential here instead, that is allowed, after a warning:
- Say this, or words close to it: "If you paste it here, this AI tool sees the value, and this conversation's history may keep it. Saving it in the app keeps it out. Do you still want to paste it?"
- Go on only after a clear yes. Anything else is a no.
- Pass the value in
credentials, using the field namesconnections_detect_authreturned incredentialFields. Send it to nothing else: no other tool, file, log, commit or host. - Do not repeat the value back, in full or in part, and do not include it in your report.
Steps
- Confirm the environment. Call
workspace_get_active_environment. Tell the user itsnameandclassand ask if that is where the system belongs. If the user asked for a different environment, stop and say so. - Check it is not already connected. Call
connection_list. If a system with the same address exists, stop and ask whether to use it. - Ask the API how it signs in. Call
connections_detect_authwithendpoint.- If
addressCorrectionis set, show it and ask the user to confirm the corrected address. - If
authTypeisunknown, ask the user which method the API uses.unknowndoes not mean the API is open. - If
signInWithProvideris set, tell the user the provider offers its own sign-in page and that a person must complete it in the app (Systems, add a system, sign-in step). Stop here unless they choose to use a saved secret instead.
- If
- Test. Call
connections_test_connectionwithurl,authTypeand eithercredentialRef(the secret's name) orcredentials(a pasted value, after the warning under Credentials). AddreadPathsif the user knows a path that returns records, such as/customers.- Pass only when
outcomeissigned-inorread-without-sign-in. - Any other outcome is a fail. Report
outcome,httpStatusanddetailto the user and stop. Do not continue to step 5. - If
outcomeisunverified, ask for a path that returns records and test again.
- Pass only when
- Connect. Call
connection_inferwith the sameurl,authType,credentialReforcredentials, andreadPaths, plusdisplayName. Keep theconnectionIdandjobId. - Wait for the first read. Call
connection_statuswithid. Whilestatusisinferring, wait and call again. It takes a minute or two. Do not call more often than every few seconds. - Summarise what was found. When
statusisawaiting-review, callconnection_manifest. List each object with its field count, and list the fields whererequiresCustomerReviewis true and the fields with asensitivity. - Apply the user's corrections. For each correction the user gives, call
connection_approve_fieldwithfieldPath(<entityId>.<fieldId>),approvedand the corrected value. To leave fields out, callconnections_set_field_inclusion. - Approve only when the user says so. Call
connection_approve. If it answers409 connection_not_proven, callconnections_test_saved_connection, and approve again only if that test passes.
Checks before any write
- Step 4 must pass before step 5. The test stores nothing, so it is always safe to run.
- Step 9 needs an explicit yes from the user after they have seen the summary from step 7.
- Use a new
displayNameonly after step 2 shows no duplicate.
Equivalents
| Step | InferrexMCP tool | InferrexAPI |
|---|---|---|
| Environment | workspace_get_active_environment |
GET /v1/workspace/environment |
| List | connection_list |
GET /v1/connections |
| Detect sign-in | connections_detect_auth |
POST /v1/connections/detect-auth |
| Test | connections_test_connection |
POST /v1/connections/test |
| Connect | connection_infer |
POST /v1/connections/infer |
| Status | connection_status |
GET /v1/connections/:id/status |
| What was found | connection_manifest |
GET /v1/connections/:id/manifest |
| Correct a field | connection_approve_field |
POST /v1/connections/:id/approve-field |
| Leave fields out | connections_set_field_inclusion |
PATCH /v1/connections/:id/field-inclusion |
| Test saved sign-in | connections_test_saved_connection |
POST /v1/connections/:id/test |
| Approve | connection_approve |
POST /v1/connections/:id/approve |
Report back
- The system's name, its
connectionIdand itsstatus. - The test result:
outcomeandprovedBy. - The objects found, the fields that need a person's review, and the sensitive fields.
- What is still waiting for the user: review, approval, or a provider sign-in.
Never
- Never accept a pasted password, token or API key without giving the warning under Credentials and getting a clear yes. Ask for the name of a saved secret first.
- Never echo, log, save or repeat a credential value.
- Never say a system is connected or working unless a test returned
signed-inorread-without-sign-in. - Never approve a system the user has not reviewed.
- Never tell the user that Inferrex already knows, supports or recognises their system, and never offer a list of systems to pick from. Ask only for the API's address.
- Never connect the same organisation twice. If a provider sign-in covers several organisations, each becomes its own system and the user chooses which.
- Never send credentials to any host other than
api.inferrex.comormcp.inferrex.com.