What are secrets?
Secrets are encrypted key-value pairs stored on your MCPCore server. They let you use sensitive credentials in tool code without hardcoding them. Instead of writing:- Encrypted at rest with AES-256
- Not sent to the AI on their own: MCPCore doesn’t add secret values to MCP messages. A value reaches the AI client only if your tool returns it or includes it in an error
- Per-server: secrets on one server are not accessible from another
- Not version-controlled: they live in the dashboard, not in your code
Adding a secret
1
Open the Secrets tab
On the server detail page, click the Secrets tab.
2
Click Add secret
Click Add secret.
3
Enter the key and value
4
Save
Click Save secret. The value is encrypted and stored. You can update or delete the secret later, but the dashboard doesn’t show the value after saving.
Creating a secret from the editor
You don’t have to leave the tool editor to add a missing secret. Secret fields in the Snippets panel and in workflow steps such as Database and HTTP Request offer Create a new secret. The secret is saved to the server and selected in the field right away.Referencing secrets in code
Access secrets through theenv object using the key name you defined:
Naming conventions
MCPCore has no enforced naming convention, but UPPER_SNAKE_CASE is standard and makes secrets easy to distinguish from regular variables:Updating a secret
To rotate a credential:- Open the Secrets tab
- Click the edit icon next to the secret
- Enter the new value
- Click Save
Deleting a secret
Click the delete icon next to the secret and confirm. Any tool code that references the deleted key will receiveundefined for env.DELETED_KEY. Update the tool code to remove the reference, or add a new secret with the same key name.