Skip to main content
Glama
netlify

Netlify MCP Server

Official
by netlify
ctx.ts1.21 kB
export const siteIdContext = ` If site ID is needed, find it in the following ways: - see if there is a .netlify/state.json file in the directory. The site ID can be found there. - lookup the site by repo which can be pulled from the git information on the directory (if available) - if terminal commands can be run, use 'netlify status' command which should include the site ID. `; export const accountIdContext = ` If the account ID is needed for a site specific, find it in the following ways: - get the site id and then lookup the account id for the site ${siteIdContext} `; export const command_env_vars = ` ### Netlify CLI Command - The site must be linked first before the CLI will add variables. See the rules for initializing and linking sites for how to do this. - Use \`env: set\` for changes, \`env: unset\` to delete. \`env:import \` to import from a dotenv\`.env\` file. #### Example usage of env var CLI - Basic setting an environment variable for the site \`\`\`sh netlify env:set API_KEY "not-a-secret" \`\`\` - Setting an environment variable that should be treated as a secret \`\`\`sh netlify env:set API_KEY "secret-value" --secret \`\`\` `

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/netlify/netlify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server