Connector reference¶
Lookup tables for connector authors and host applications: the connectors.yaml schema,
the factory and registry APIs, how to call a connector in-process, and the catalog of what ships today.
For walkthroughs, see Use a connector and Build a connector.
config/connectors.yaml¶
Each connector entry has the following shape:
connectors:
<connector_id>:
enabled: true # false → connector not instantiated
exposed_via: # controls which bindings surface this connector
- rest
- grpc
- mcp
# connector-specific keys passed via SecretProvider or connector __init__
# REST (OpenAPI-generated) connectors also read:
base_url: https://api.example.com # overrides the spec's server
auth: {provider: static_token, secret_key: EXAMPLE_TOKEN}
headers: # sent on every request
Client-Id: ${EXAMPLE_CLIENT_ID}
Any string value can use ${VAR} or ${VAR:default}; it is replaced from the environment when
the file loads.
headers are fixed headers a REST connector sends on every request, for APIs that need more than
the credential, such as Twitch's Client-Id. They are not credentials: put those in auth, which
wins over any header set here. Authorization, Proxy-Authorization, Cookie, Host,
Content-Type, Content-Length, Transfer-Encoding and Connection are refused. A configured
header also wins over an operation parameter of the same name. If a ${VAR} is still unresolved
when the connector makes a call, because VAR was not set, the call fails with an error that names
VAR instead of sending the placeholder. Tenant config documents (tenants.yaml, /v1) can set
headers too, top level or under config; their values are used as written, with no ${VAR}
substitution, so give the value itself there. nw gen-all --header and nw gen-stacklok --header
write this key for a generated connector. Needs node-wire-runtime 1.1.0 or later.
ConnectorFactory API¶
| Method | Description |
|---|---|
load() |
Reads connectors.yaml and bootstraps the runtime config store. Does not instantiate connectors — instantiation is lazy. |
await get(connector_id, *, tenant_id=None, config_name=None) |
Resolves the tenant's config from the store (the default, or config_name), then returns the cached tenant-pinned instance or builds one. Raises ConfigNotFoundError when the tenant has no config — existence is entitlement. Omitting tenant_id means __default__. |
store |
The runtime ConnectorConfigStore (create / update / delete / set_default / list). Writes drop the affected cached instances immediately. |
get_for_protocol(id, protocol, action=None) |
Sync, __default__ tenant only. Returns the default-tenant instance, or None if the connector isn't enabled or isn't exposed for that protocol in YAML. For playground and enumeration — use get() for tenant-scoped calls. |
is_exposed(connector_id, protocol) |
True if the YAML entry lists protocol in exposed_via. Connectors with no YAML entry (pushed only through the store) are exposed on every protocol. Does not check enabled. |
list_for_protocol(protocol) |
Default-tenant instances of every enabled, registered connector exposed for protocol. |
Connector registry API¶
get_connector_registry() is defined in base_connector.py and exported from the top-level node_wire_runtime package — it is not in node_wire_runtime.connector_registry. Use it to read the connector-id → class map after auto_register() has imported your logic module:
from node_wire_runtime import get_connector_registry
from node_wire_runtime.connector_registry import auto_register
auto_register() # requires NW_ALLOWED_CONNECTORS
registry = get_connector_registry() # Dict[str, Type[BaseConnector]]
connector_cls = registry["google_drive"]
For the full run pipeline (YAML config, instantiation, protocol routing), use ConnectorFactory (see Calling a connector directly).
Calling a connector directly (in-process)¶
Use connector.run(dict) for the full pipeline (validation, policy, retries, error mapping).
Set NW_ALLOWED_CONNECTORS to a comma-separated list of entry-point names (for example, google_drive) before calling auto_register() — without it, auto_register() loads nothing (fail-closed).
Scope policy applies here too. The factory attaches the same policy hook to every run(), however the instance was obtained. With the default NW_MCP_SCOPE_POLICY_DEFAULT=deny, a call with no principal or scopes fails with POLICY_DENIED. How to grant scopes, or switch to allow for local scripts: Build a connector — Security.
For a complete, runnable walkthrough — two tenants, the config store, TENANT_MISMATCH, and revoking access — see Use a connector.
Multi-tenant / named configs: resolve the tenant in your host, then await factory.get("google_drive", tenant_id=tenant_id, config_name=name). The instance is pinned to that tenant. The contract is in Tenancy — the pin contract.
For composing actions within a connector, use self.call_action. It routes through connector.run so policy hooks, resilience, and the ConnectorResponse error path apply (including MCP scope policy). It returns the nested action’s output model on success (validated from run()’s data). On policy denial it raises PolicyDenied, which the outer run() maps like any other action failure.
Optional keyword args principal, tenant_id, and scopes override the caller identity for the nested call. When omitted, call_action inherits identity from the outer run() (MCP/REST with JWT or scoped API key), so nested actions receive the same authorization as a direct tool call. On a factory-pinned instance, an explicit nested tenant_id must agree with the instance pin.
The following action creates a file, then reads it back through call_action:
from node_wire_runtime import BaseConnector, nw_action
@nw_action("upload_then_describe")
async def upload_then_describe(
self, params: MyInput, *, trace_id: str
) -> GoogleDriveOperationOutput:
created = await self.call_action(
"files.create",
{"action": "files.create", "name": params.name, "mime_type": params.mime_type},
)
file_id = created.raw["id"]
return await self.call_action(
"files.get",
{"action": "files.get", "file_id": file_id},
)
Connector catalog¶
Every shipped connector, with the same fields for each. Request and response schemas are not
repeated here. They are generated from each connector's Pydantic models and served live at
/docs (Swagger UI) and /openapi.json, and the same models drive the MCP tool schemas. Tool names
are <connector_id>_<action> with dots replaced by underscores (google_drive_files_list).
Environment variables are also listed in Configuration.
Per-tenant secrets follow the tenant secret naming.
| Connector | Actions | auth.provider |
Setup guide |
|---|---|---|---|
http_generic |
request |
none |
— |
smtp |
send_email, send_bulk, send_raw, check_connection, get_server_capabilities, get_tls_info, ping, verify_address, expand_list, get_help, validate_address_syntax (11 actions) |
static_credentials |
— |
postgres |
55 actions: server and session, schema discovery, read, write, DDL | none (credentials via secrets) |
— |
stripe |
charge, create_payment_intent, create_subscription, cancel_subscription, issue_refund |
static_token |
— |
salesforce |
150 actions: leads and contacts, plus the REST API v68.0 (records, metadata, query, search, composite, process, knowledge, consent and more) and Bulk API 2.0 | oauth2 (refresh_token) |
Salesforce |
salesforce |
create_lead, read_lead, update_lead, delete_lead, create_contact, read_contact, update_contact, delete_contact |
oauth2 (refresh_token) |
Salesforce |
google_drive |
49 Drive v3 actions (48 generated, plus drive_files_upload) (drive_files_list, drive_files_get, drive_files_create, drive_files_update, drive_files_delete, drive_permissions_create, comments, revisions, shared drives and more); upload up to 5 MB, no download |
service_account (or upstream_bearer) |
Google Drive |
slack |
post_message, send_direct_message, upload_file |
static_token |
Slack |
fhir_epic |
137 Epic R4 actions: read_<resource>, search_<resource>, create_<resource>, update_<resource> for Epic's public resources, patient_match, patient_summary, bulk export and more |
oauth2 (private_key_jwt) |
— |
n8n |
173 actions: every n8n 2.47.7 public API operation except 3 deprecated ones (workflows, executions, tags, variables, credentials, folders, data tables, evaluations, projects, roles, users, audit, insights, community packages, source control, instance settings, policies, promotions, n8n packages), plus trigger_workflow |
static_token (X-N8N-API-KEY) |
— |
fhir_cerner |
129 actions: every R4 read, search, write and operation of Millennium, bulk export; the original five are read_patient, search_patients, search_encounter, create_document_reference, search_document_reference |
oauth2 (private_key_jwt) |
— |
http_generic¶
- Package:
node-wire-http,src/node_wire_http_generic/. No standalone MCP image. - Secrets / settings: none. The whole request (method, URL, params, body) is the payload.
- Egress: only
GET,POST,PUT,PATCHandDELETE. Internal destinations (localhost, loopback, private and link-local ranges, metadata endpoints) are rejected. SetNW_HTTP_GENERIC_ALLOWED_HOSTSto restrict hosts further. Logs drop query strings and fragments.
smtp¶
- Package:
node-wire-smtp,src/node_wire_smtp/. MCP imagenw-smtp. - Secrets / settings:
SMTP_HOST,SMTP_PORT,SMTP_USE_TLS,SMTP_USERNAME,SMTP_PASSWORD,FROM_EMAIL.host,portanduse_tlscan also be set inconnectors.yaml; the environment wins. - Actions:
send_email(plus optionalcc,bcc,reply_to,html_body, base64attachments, extraheaders,priority,dsn_notify,dsn_return; returns themessage_id),send_bulk(up to 100 messages over one connection, one result each),send_raw(a finished RFC 5322 message to given envelope recipients; itsFromheader must equalfrom_email, it may not carryBcc,ReceivedorReturn-Path, and it is limited to 10 MB),check_connection,get_server_capabilities,get_tls_info,ping,verify_address(VRFY),expand_list(EXPN),get_help(HELP) andvalidate_address_syntax(offline, no server call). Many servers disable VRFY, EXPN and HELP and answer 502 (anSMTP_ERROR).from_emailis required unlessFROM_EMAILorSMTP_USERNAMEis set. - Egress: relay settings are server-side only and no action accepts them, so credentials never go to a
caller-chosen host. Set
NW_SMTP_ALLOWED_HOSTSin production.subjectand header values may not contain newlines or control characters.
postgres¶
- Package:
node-wire-postgres,src/node_wire_postgres/. Driver: psycopg 3 withpsycopg_pool. - Versions: PostgreSQL 11 or later (tested on 16;
reindexwithconcurrentlyneeds 12; 17 and 18 expected to work but not tested; older than 11 unsupported). psycopg>=3.2,<4, Python 3.11+. - Secrets / settings: secrets
POSTGRES_USERNAME,POSTGRES_PASSWORD. Settingshost,port,database,sslmodeinconnectors.yamlorPOSTGRES_HOST,POSTGRES_PORT,POSTGRES_DATABASE,POSTGRES_SSLMODE. They are server-side only: the payload never names the server. - Modes:
mode(NW_POSTGRES_MODE) isread_only,read_writeoradmin(defaultread_only). Each action needs a minimum mode. Read actions always run inSET TRANSACTION READ ONLY, so the database enforces it. - Limits:
statement_timeout_ms(30000),max_rows(1000),pool_max(5),allowed_schemas,allowed_tables(schema.table). Raw SQL takes one statement with bound parameters. The allowlists cover the structured actions; give the database role only the privileges it needs, because that role is the real boundary. - Actions: see
src/node_wire_postgres/README.md. Expose a subset with the action-expose function.
stripe¶
- Package:
node-wire-stripe,src/node_wire_stripe/. MCP imagenw-stripe. - Secrets / settings:
STRIPE_BASIC_AUTH(the Stripe secret key followed by a colon,sk_test_...:), sent as HTTP Basic inAuthorization(prefix: Basic,encoding: base64). - Errors: the connector is generated, so it uses the shared REST error map: 401 is
HTTP_AUTH_ERROR(auth), 429 isHTTP_RATE_LIMITEDand 502, 503 and 504 on reads and deletes areHTTP_UNAVAILABLE(both retryable), and any other status, including a declined card (402), isHTTP_STATUS_ERROR(business) (Build a connector). - Key format:
STRIPE_BASIC_AUTHmust besk_test_…:,sk_live_…:or anrk_restricted key, each followed by the colon. A tenant secret in any other form (no colon, or already base64) is refused when stored.
salesforce¶
- Package:
node-wire-salesforce,src/node_wire_salesforce/. MCP imagenw-salesforce. - Secrets / settings:
SALESFORCE_INSTANCE_URL,SALESFORCE_TOKEN_URL,SALESFORCE_CLIENT_ID,SALESFORCE_CLIENT_SECRET,SALESFORCE_REFRESH_TOKEN.api_version(defaultv68.0) can be set inconnectors.yaml. - Actions: the 8 lead and contact actions, plus 142 for the REST API and Bulk API 2.0, listed by group in the guide.
The instance URL and token are server-side only; no action accepts them. The shipped config has it disabled and on REST only. Use an exposure profile
(
expose/salesforce/:salesforce-readonly,salesforce-records,salesforce-leads-contacts,salesforce-bulk) to limit what a deployment can do (it includes password resets and bulk deletes). - Guide: Salesforce covers configuration, the action list and the error codes.
google_drive¶
- Package:
node-wire-google-drive,src/node_wire_google_drive/. MCP imagenw-google-drive. - Secrets / settings:
GOOGLE_DRIVE_SA_JSON(JSON contents, or an absolute path locally),GOOGLE_DRIVE_FOLDER_ID. - Per-user access:
upstream_bearerrelays each caller's own Google token (Google Drive — upstream bearer). - Not supported: file-content upload, download and update. The connector calls only the
/drive/v3address, sodrive_files_createanddrive_files_updatework on metadata, anddrive_files_getcannot return content. - Guide: Google Drive covers service-account setup, the action list and the error codes.
slack¶
- Package:
node-wire-slack,src/node_wire_slack/. MCP imagenw-slack. - Secrets / settings:
SLACK_BOT_TOKEN. File uploads from disk must sit underNW_SLACK_ATTACHMENTS_DIR(default/slack_attachments). - Guide: Slack covers bot setup, channel resolution and the error codes.
fhir_epic¶
- Package:
node-wire-fhir-epic(src/node_wire_fhir_epic/, MCP imagenw-smartonfhir-epic). Epic on FHIR R4, SMART backend services. - Secrets / settings:
EPIC_FHIR_BASE_URL,EPIC_TOKEN_URL,EPIC_CLIENT_ID,EPIC_KID,EPIC_PRIVATE_KEY. - Actions: 137, in waves: the original five, US Core and other resources (read and search), writes (create and update, the
FHIR resource as JSON), and the operations (
patient_match,patient_summary,value_set_expand, group bulk export,fetch_next_page). The full list, the request rules and the error codes are insrc/node_wire_fhir_epic/README.md. - Privacy: logs record the operation, the method, the URL path, the status and counts, never query values or FHIR bodies (Privacy).
- Writes: a create that timed out after it was sent is not retried (Epic has no conditional create). Limit a deployment with an exposure profile; the connector can write to a patient chart.
- Arguments: the original five accept common LLM aliases (
patientId→resource_id; root-levelpatient/patientId→patient_idandsort→_sortonsearch_encounter).
fhir_cerner¶
- Package:
node-wire-fhir-cerner(src/node_wire_fhir_cerner/, MCP imagenw-smartonfhir-cerner). Oracle Health (Cerner) Millennium FHIR R4, SMART backend services. - Secrets / settings:
CERNER_FHIR_BASE_URL,CERNER_TOKEN_URL,CERNER_CLIENT_ID,CERNER_KID,CERNER_PRIVATE_KEY, plusCERNER_SCOPES. - Actions: 129, in waves: the original five, clinical and other resources (read and search), writes (create, update
with PUT, patch with JSON Patch, and
delete_coverage), and the operations ($autogen-ccd-if,$docref,$health-cards-issue, the charge item operations, batch, group and patient bulk export,fetch_next_page). The full list, the request rules, the scopes and the error codes are insrc/node_wire_fhir_cerner/README.md. - Scopes: Cerner checks the scopes of the token request (
system/<Resource>.readand.write), so setCERNER_SCOPES(orscopesinconnectors.yaml, which ships with four) for the resources you use. - Writes: updates, patches and deletes take
if_match, theetagof the last read. A write that timed out after it was sent is not retried. A 5xx other than a retried gateway error on a read isCERNER_SERVER_ERROR(fatal). Limit a deployment with an exposure profile; the connector can write to a patient chart. - Privacy: logs record the operation, the method, the URL path, the status and counts, never query values or FHIR bodies (Privacy).
- Arguments: the original five accept the same aliases as the Epic ones. Encounter search requires a patient filter before any outbound call.
The following table lists the main read and search actions:
| Action | When to use | Example arguments |
|---|---|---|
read_patient |
You have a Patient ID | {"resource_id": "12765407"} |
search_patients |
No ID, or name-based search | {"given_name": "Nancy", "family_name": "Smart"} |
search_encounter |
Find medical visits | {"patient_id": "12765407"} |
n8n¶
- Package:
node-wire-n8n,src/node_wire_n8n/. Versions: n8n public API v1 (spec 1.1.1), written against n8n 2.47.7. - Secrets / settings: secret
N8N_API_KEY, sent asX-N8N-API-KEY(auth: static_token,prefix: "").instance_urlis the instance root and is set inconnectors.yamlonly: no action accepts it, so the key can only go to the configured host. - Egress: there is no private-address guard, so an n8n on localhost or a private network works. Use a scoped API key
(n8n 2.14+) and an exposure profile to limit what the connector can do. It is disabled and REST-only in the shipped config;
profiles
n8n-readonlyandn8n-workflowsare inexpose/n8n/. - Actions: see
src/node_wire_n8n/README.md.trigger_workflowcalls a workflow's webhook without the API key, and only on the configured n8n host.
Related documentation¶
| Doc | When to read it |
|---|---|
| Use a connector | Calling a connector in-process or over REST, per tenant |
| Build a connector | Writing a connector by hand |
| Connectors on REST, MCP and gRPC | How actions surface on REST / MCP / gRPC |
| Configuration | NW_* environment variables |
| Public API | What is covered by SemVer |