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
- Never logged — MCPCore redacts
env.*values from all log output - 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
Enter the key and value
| Field | Description |
|---|---|
| Key | The name you’ll reference in code as env.KEY. Use UPPER_SNAKE_CASE by convention. |
| Value | The secret value. Encrypted immediately on save. |

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:| Example key | What it stores |
|---|---|
GITHUB_TOKEN | GitHub personal access token or app token |
OPENAI_API_KEY | OpenAI API key |
DB_PASSWORD | Database password |
STRIPE_SECRET_KEY | Stripe secret key |
SLACK_BOT_TOKEN | Slack bot token |
SENDGRID_API_KEY | SendGrid API key |
WEBHOOK_SECRET | HMAC signing secret for webhook verification |
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.
Secret visibility
| Who can see secrets | Access level |
|---|---|
| Tool code | env.KEY_NAME (value only, not key list) |
| Dashboard — Secrets tab | Key names only; values are masked |
| Logs (Traffic, Error) | Never — values are redacted automatically |
| MCPCore support | Never — we cannot decrypt your secrets |
