Skip to content

Add jf mcp command docs #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* [Count Contributing Developers](jfrog-applications/jfrog-cli/cli-for-jfrog-security/how-tos/count-contributing-developers.md)
* [CLI for JFrog Distribution](jfrog-applications/jfrog-cli/cli-for-jfrog-distribution.md)
* [CLI for JFrog Cloud Transfer](jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer.md)
* [Model Context Protocol (MCP)](jfrog-applications/jfrog-cli/model-context-protocol.md)
* [CLI Command Summaries](jfrog-applications/jfrog-cli/cli-command-summaries.md)
* [JFrog CLI Plugins](jfrog-applications/jfrog-cli/cli-plugins/README.md)
* [JFrog CLI Plugins Developer Guide](jfrog-applications/jfrog-cli/cli-plugins/developer-guide.md)
Expand Down
71 changes: 71 additions & 0 deletions jfrog-applications/jfrog-cli/model-context-protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Managing JFrog Model Context Protocol (MCP)

## Overview

The JFrog Model Context Protocol (MCP) server enables integration between JFrog tools and AI models/agents. The `jf mcp` command allows you to manage the MCP server, including starting it with specific configurations and updating it to the latest version.

## Commands

### Start MCP Server

Starts the MCP server with configured options.

```
jf mcp start [options]
```

#### Options

| Flag | Environment Variable | Description |
|------|---------------------|-------------|
| `--toolsets` | `JFROG_MCP_TOOLSETS` | Comma-separated list of toolsets to enable (e.g., "artifactory,xray"). Default: "read" |
| `--tools-access` | `JFROG_MCP_TOOL_ACCESS` | Semicolon-separated list of tool access rights. Default: "all-toolsets" |
| `--mcp-server-version` | - | Specific version of the MCP server to use. Default: "[RELEASE]" (latest) |

#### Examples

```
# Start the MCP server with default settings
jf mcp start

# Start the MCP server with specific toolsets
jf mcp start --toolsets=artifactory,xray

# Start the MCP server with specific tools access
jf mcp start --tools-access="read;write"
```

### Update MCP Server

Updates the MCP server binary to the latest version.

```
jf mcp update
```

#### Example

```
jf mcp update
```

## Implementation Details

### Binary Management

- **Storage Location**: The MCP server binary is stored in `~/.jfrog/cli-mcp/cli-mcp-server` (or platform equivalent).
- **Download**: The command automatically downloads the binary if not present or when updating.
- **Version Checking**: When updating, the command checks if you already have the latest version.

### Access Control

The MCP server can be configured to provide different levels of access to JFrog tools:

- Use `--toolsets` to specify which JFrog tools are accessible via MCP
- Use `--tools-access` to specify access rights (read, write, etc.)

### Common Use Cases

1. **AI Tool Integration**: Start the MCP server to provide JFrog platform access to AI agents.
2. **Regular Updates**: Use the update command periodically to ensure you have the latest MCP server features.
3. **Controlled Access**: Specify which JFrog tools and access levels are available to AI agents.