Skip to content

Commit 9233bc8

Browse files
committed
Sync open source content 🐝 (from 46becb23a35c53b13070bd37e6adad1b774e6fc2)
1 parent 0214140 commit 9233bc8

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

docs/gram/clients/using-claude-code-with-gram-mcp-servers.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,21 @@ gram install claude-code --toolset taskmaster
5555
This command automatically:
5656
- Fetches your toolset configuration from Gram
5757
- Derives the MCP URL and authentication settings
58-
- Creates a `.mcp.json` file with the correct configuration
58+
- Creates the correct configuration (by default in user-level `~/.claude/settings.local.json`)
59+
60+
**Configuration Scopes:**
61+
62+
You can control where the MCP server configuration is installed using the `--scope` flag:
63+
64+
```bash
65+
# Install to user-level config (default) - available across all projects
66+
gram install claude-code --toolset taskmaster --scope user
67+
68+
# Install to project-level config - can be shared with your team
69+
gram install claude-code --toolset taskmaster --scope project
70+
```
71+
72+
Use `--scope project` when you want to commit the `.mcp.json` configuration to version control and share it with your team.
5973

6074
For more details and advanced options, see the [`gram install` documentation](/docs/gram/command-line/install).
6175

docs/gram/command-line/install.mdx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ Install a Gram toolset for Claude Code:
5353
gram install claude-code --toolset speakeasy-admin
5454
```
5555

56-
This creates or updates the `.mcp.json` file in your current directory with the native HTTP transport configuration.
56+
By default, this creates or updates the user-level configuration file (`~/.claude/settings.local.json`). To install at the project level instead, use the `--scope` flag:
57+
58+
```bash
59+
gram install claude-code --toolset speakeasy-admin --scope project
60+
```
61+
62+
This creates or updates the `.mcp.json` file in your current directory, which can be committed to version control.
5763

5864
**With environment variable substitution:**
5965

@@ -163,6 +169,24 @@ This allows for:
163169
- **Development**: Use actual values when env vars are set
164170
- **Distribution**: Use substitution when sharing configs with your team
165171

172+
### `--scope`
173+
174+
Configuration scope that determines where the MCP server configuration is installed. Defaults to `user`.
175+
176+
```bash
177+
gram install claude-code --toolset speakeasy-admin --scope user
178+
```
179+
180+
**Available scopes:**
181+
- **`user`** (default): Installs to user-level configuration (`~/.claude/settings.local.json`). Configuration is available across all projects for the current user.
182+
- **`project`**: Installs to project-level configuration (`.mcp.json` in current directory). Configuration can be committed to version control and shared with team members.
183+
184+
**When to use each scope:**
185+
- Use `user` scope for personal toolsets or when you want the same MCP servers available in all your projects
186+
- Use `project` scope when specific MCP servers should be shared with your team through version control
187+
188+
**Note:** This flag applies to Claude Code and Gemini CLI installations. Cursor and Claude Desktop installations use their own installation mechanisms that don't support scope selection.
189+
166190
## Examples
167191

168192
### Example 1: Quick Setup with Automatic Configuration
@@ -208,6 +232,17 @@ gram install claude-desktop --toolset my-toolset
208232
gram install cursor --toolset my-toolset
209233
```
210234

235+
### Example 5: Project-Level Configuration
236+
237+
```bash
238+
# Install to project-level config for team sharing
239+
gram install claude-code --toolset my-toolset --scope project
240+
241+
# The .mcp.json file can now be committed to version control
242+
git add .mcp.json
243+
git commit -m "Add MCP server configuration for team"
244+
```
245+
211246
## Advanced Configuration
212247

213248
### Custom Project Context

0 commit comments

Comments
 (0)