# Hermoso: set_site_secret: Save a secret · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/publish/set_site_secret/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Publishing & scheduling](https://hermoso.ai/docs/reference/publish/) / set_site_secret

# `set_site_secret`

Save a secret for a site’s server code

Area: LAUNCH PAGES · [Publishing & scheduling](https://hermoso.ai/docs/reference/publish/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

Save a secret (an API key) for a hosted site's server code: key in UPPER_CASE, value. Write-only: the value is never shown again, and the site's functions/_worker.js reads it as env.<KEY>. Never put secrets in page files, which are public. Needs a paid plan or a funded balance. Free.

## Parameters

Parameter Type Description

`name` required `string` the page name, which is its address: spring-sale is served at https://spring-sale.hermoso.page

`key` required `string` e.g. STRIPE_SECRET_KEY

`value` required `string` the secret itself

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/set_site_secret`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"set_site_secret","arguments":{"name":"<string>","key":"<string>","value":"<string>"}}}`
**CLI**

`hermoso call set_site_secret --json '{"name":"<string>","key":"<string>","value":"<string>"}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [disconnect_domain](https://hermoso.ai/docs/reference/publish/disconnect_domain/) Disconnect a domain from a page
- [delete_site_secret](https://hermoso.ai/docs/reference/publish/delete_site_secret/) Delete a site secret
- [domain_status](https://hermoso.ai/docs/reference/publish/domain_status/) Check a connected domain
- [rollback_page](https://hermoso.ai/docs/reference/publish/rollback_page/) Roll a hosted project back
- [connect_domain](https://hermoso.ai/docs/reference/publish/connect_domain/) Serve a page on your own domain
- [list_site_usage](https://hermoso.ai/docs/reference/publish/list_site_usage/) Hosting usage of hosted projects
- [unpublish_page](https://hermoso.ai/docs/reference/publish/unpublish_page/) Take a hosted page offline
- [set_site_spend_cap](https://hermoso.ai/docs/reference/publish/set_site_spend_cap/) Cap hosting spend
- [get_page](https://hermoso.ai/docs/reference/publish/get_page/) Read a hosted page
- [export_site](https://hermoso.ai/docs/reference/publish/export_site/) Download a hosted project as a zip

[All 728 Publishing & scheduling tools](https://hermoso.ai/docs/reference/publish/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
