Environments
APIs and functions typically require configuration before they can be used as MCP tools. This configuration may include API keys, server URLs, tenant identifiers, and other runtime parameters. In many cases, multiple environment configurations are needed to support production and staging deployments or multi-tenant architectures.
Gram environments are sets of configuration names and values stored fully encrypted within Gram. The contents are never exposed to end users but can be attached to toolsets to simplify configuration management. Environments can be used to manage system-level configuration, end-user configuration, or both.
System configuration includes parameters like API URLs, default timeouts, or feature flags that remain constant across users. End-user configuration includes user-specific values like credentials or tenant identifiers that vary per user. Gram environments support both use cases: attach a system configuration to your tool source, or allow end users to provide their own configuration values when initializing the Gram SDKs.

Creating environments
To create an environment, navigate to the Environments page, click + New Environment, and enter a name for the environment.

On the environment page, add environment variables by clicking New Variable.

Attach an environment to a toolset by clicking the Fill for toolset button, then selecting the specific toolset you want to configure. This allows you to pre-fill all required environment variables for that toolset, ensuring it’s ready to use across the Playground, SDKs, and MCP clients.

Last updated on