MCP Fusion/Security and governance/Credentials
Credentials
Bring Your Own Credentials: declare the secret fields your connector needs and let each buyer configure their own keys in the Vinkius dashboard while the runtime injects them per request.
A connector that hardcodes one vendor's API key can only serve one deployment. A connector that declares its credential fields can be published, and every buyer configures their own keys. MCP Fusion calls this Bring Your Own Credentials, and it is what makes a connector marketplace publishable.
Declare the fields
import { defineCredentials } from '@mcpfusion/core';
export const credentials = defineCredentials({
openai_key: {
type: 'api_key',
label: 'OpenAI API key',
required: true,
sensitive: true,
validation: /^sk-/,
},
zendesk_subdomain: {
type: 'uri',
label: 'Zendesk subdomain',
required: true,
sensitive: false,
},
});| Field type | Use for |
|---|---|
api_key | Keys with a known prefix |
token | Opaque tokens such as PATs |
password | Secrets that must never be echoed |
uri | Endpoints and subdomains, not sensitive |
How buyers configure them
The buyer opens your connector in the Vinkius console and fills the credential form. This is the same editor documented in the Cloud docs at Credentials: required badges, encrypted storage, a test connection verdict. You never see their values and they never see yours.
How the runtime injects them
When your connector runs on the Vinkius Edge, the runtime injects the buyer's secrets into globalThis.__vinkius_secrets per request, isolated per buyer. Your server reads them through one accessor:
import { requireCredential } from '@mcpfusion/core';
.handle(async (input, ctx) => {
const openai = requireCredential('openai_key');
return callOpenAI(openai, input.prompt);
});If a required credential is missing, a typed CredentialMissingError surfaces with guidance instead of a raw undefined somewhere deep in a call.
Local development
Locally, put the same keys in your environment. The framework reads from the environment first, so the same server runs on your laptop and on the Edge with no code changes. Fusion still blocks PII locally by default, so the egress firewall works in development too.
Secrets injected by the runtime are per request and per buyer. Nothing sensitive is stored inside your bundle, which is exactly what allows one build of your connector to serve every buyer with their own keys.
Why this matters
- One build, many buyers. Publish once, every buyer brings their own vendor keys.
- You never hold secrets. Encrypted storage and per request injection happen on the platform.
- Rotation is a console operation. The buyer updates a key in the dashboard, your code never changes.
Next steps
- Deploy: ship the connector to Vinkius Cloud for free
- Tools: read credentials inside handlers
- Governance: prove the surface stayed safe across releases
