# Attach environments to tool sources

Attaching an environment to a tool source is useful when configuration should be available to all users of the toolset. This ensures consistent behavior across all users without requiring them to provide their own configuration values.

You can specify configuration that will be passed as headers to your API, even if those headers are not explicitly defined in your API specification.

<Callout title="Warning" type="warning">
Configuration attached to a tool source will apply to all users, including users of public MCP servers. Be careful not to include user-specific credentials or tokens that should only be available to certain users. 
For environment values that should be limited to private servers authenticated with a Gram API Key see [managed authentication](/docs/mcp/secure/public-private-servers#pass-through-authentication-vs-managed-authentication).
</Callout>

## Attaching an environment to a tool source

First, ensure you have [created an environment](/docs/mcp/build/toolsets/configuring-environments) with the configuration values you want to attach.

Then follow these steps:

1. Navigate to the **Toolsets** tab
2. Click the **More Actions** (<MoreVertical className="inline" size={16} />) menu on the Source Card you want to attach an environment to

![More Actions menu on Source Card](/assets/docs/gram/img/build-mcp/attach-env-more-actions-menu.png)

3. Click **Attach Environment**

![Attach Environment menu option](/assets/docs/gram/img/build-mcp/attach-env-select-dialog.png)

4. Select the environment you created in the first step

These environment values will now apply to all users of the toolset.
