Skip to main content

CLI for Context Forge allowing seamless management of local or hosted MCP and A2A resources.

Project description

ContextForge CLI

Python 3.11+ License

A command-line interface for managing ContextForge MCP Gateway — seamlessly manage local or hosted MCP servers, tools, resources, prompts, and Agent-to-Agent services.

Part of the ContextForge ecosystem by IBM


Quick Start

Installation

pip install git+https://github.com/contextforge-org/contextforge-cli.git

First Steps

# Authenticate with your gateway
cforge login

# List available tools
cforge tools list

# Start a local gateway server
cforge serve

Features

Capability Description
MCP Server Management Register, configure, and monitor MCP server peers
Tool Operations Create, update, toggle, and organize MCP tools
Resource Management Manage MCP resources with subscription support
Prompt Library Store, organize, and execute prompt templates
Virtual Servers Build composite servers from multiple sources
A2A Integration Manage and invoke Agent-to-Agent services
Config Import/Export Backup and migrate gateway configurations

Commands

Authentication & Settings

cforge login              # Authenticate with the gateway
cforge logout             # Clear saved credentials
cforge whoami             # Show current user
cforge version            # Display CLI version

Resource Management

To see the full set of available comands, use cforge --help. To see the options for a sub command, use cforge <command> --help.

Here are some examples:

# Tools
cforge tools list [--mcp-server-id ID] [--json]
cforge tools get <tool-id>
cforge tools create [file.json]
cforge tools toggle <tool-id>

# Resources
cforge resources list
cforge resources create [file.json]

# Prompts
cforge prompts list
cforge prompts execute <prompt-id>

# MCP Servers
cforge mcp-servers list
cforge mcp-servers update <mcp-server-id> [file.json]

Server Operations

# Start the gateway server
cforge serve [--host HOST] [--port PORT] [--reload]

# Configuration management
cforge export [--output file.json]
cforge import <file.json>
cforge support-bundle      # Generate diagnostics

Output Options

Most commands support:

  • --json — Output raw JSON instead of formatted tables
  • --mcp-server-id — Filter by specific MCP server
  • --active-only — Show only enabled items

Configuration

Environment Variables

Variable Default Description
CONTEXTFORGE_HOME ~/.contextforge Configuration directory
MCG_HOST localhost Gateway host
MCG_PORT 8000 Gateway port

Additionally, all configuration in mcpgateway can be set via the environment or via CONTEXTFORGE_HOME/.env. For full details, see the docs.


Development

Setup

git clone https://github.com/contextforge-org/contextforge-cli.git
cd contextforge-cli
pip install -e ".[dev]"

Running Tests

pytest

Related Projects


License

Apache 2.0 — See LICENSE for details.


Contributing

Contributions welcome! Please see the ContextForge contributing guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cforge-0.9.3.tar.gz (96.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cforge-0.9.3-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file cforge-0.9.3.tar.gz.

File metadata

  • Download URL: cforge-0.9.3.tar.gz
  • Upload date:
  • Size: 96.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cforge-0.9.3.tar.gz
Algorithm Hash digest
SHA256 39426fc646891bbc8dd16874c86aca37e19d510453165d28bd3258e6b4730908
MD5 e991304c7cfc7287e261c87d09ebb79b
BLAKE2b-256 e85aaadb8f8d8be482b81921dce665fdf997de85d6febd83b975ccbf51de0dee

See more details on using hashes here.

File details

Details for the file cforge-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: cforge-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 48.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cforge-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30af4f58043aed98d05c7311af0ad0a55215843ba0d72bec65a3ffcfbe529cbc
MD5 aa9c5e45360efb94f3c930183b9d2f96
BLAKE2b-256 b50d0c389679bfb409ad6e2b42ee5af642a8f8e84603878c1bcef6c2223f4b3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page