ContextForge CLI
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
- ContextForge MCP Gateway — The gateway server this CLI manages
- MCP Specification — Model Context Protocol documentation
License
Apache 2.0 — See LICENSE for details.
Contributing
Contributions welcome! Please see the ContextForge contributing guidelines.
Metadata
Release files for cforge 0.9.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cforge-0.9.4.tar.gz | 103.7 kB | Without provenance | Details for cforge-0.9.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cforge-0.9.4-py3-none-any.whl | Python 3 | none | any | Details for cforge-0.9.4-py3-none-any.whl |
Total release size: 155.7 kB
Release files / cforge-0.9.4.tar.gz
| Download URL | cforge-0.9.4.tar.gz |
|---|---|
| Size | 103.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdeece207e5d89cdc6cbf1c3cadf0b08f5456ca02131ebd941e4a294abd89277
|
|
BLAKE2b-256 checksum How to use checksums |
3f18f8c450cf21a83875947086111017fb55f5e978d32b94efa19a5ac23458d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / cforge-0.9.4-py3-none-any.whl
| Download URL | cforge-0.9.4-py3-none-any.whl |
|---|---|
| Size | 52.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ec5d8b6ea0cf2bf852db048471829f501cc801a5cdc529701cf245e26befc00
|
|
BLAKE2b-256 checksum How to use checksums |
897278ea54caf86550989a17ef7d7d173d692e92412f977006237eefbe57d4b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for cforge 0.9.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.