Skip to main content

CLI Commands

publish

The publish command publishes your local MCP server to the Cogni+ Platform.

Usage

cogni publish [OPTIONS] [SERVER_ID]

Description

The publish command takes a local MCP server that you’ve developed and tested, and publishes it to the Cogni+ Platform. This makes your model server available in the cloud for you and your organization to use. Publishing a model server involves:
  • Validating the model’s configuration
  • Packaging the model and its dependencies
  • Uploading to the Cogni+ Platform registry
  • Creating a deployment record in your account
Once published, your model server can be deployed to the Cogni+ Platform and accessed via API.

Options

OptionDescription
--version TEXTVersion string for this publication (default: auto-increment)
--description TEXTShort description of the model or this version
--privatePublish as a private model (only visible to your organization)
--publicPublish as a public model (visible to all Cogni+ users)
--tags TEXTComma-separated list of tags to apply
--dry-runValidate the package but don’t actually publish
--helpShow help message for the publish command

Arguments

ArgumentDescription
SERVER_IDThe ID or path of the server to publish

Examples

# Publish a server with automatic version
cogni publish my-custom-model

# Publish with specific version and description
cogni publish --version 1.0.0 --description "Initial release" my-custom-model

# Publish as a private model with tags
cogni publish --private --tags "nlp,research" my-custom-model

# Validate without publishing
cogni publish --dry-run my-custom-model

Output

Publishing MCP server: my-custom-model
Validating server configuration...
Packaging server (432MB)...
Uploading to Cogni+ Platform...
[========================================] 100%
Server published successfully!

Server details:
  ID: my-custom-model
  Version: 1.0.0
  Visibility: private
  Status: pending-review

Your server will be available after review at:
  https://cogni.cogni.plus/models/my-custom-model

Publishing Process

  1. Validation: The CLI checks that your model server meets all requirements
  2. Packaging: The server is packaged into a portable format
  3. Upload: The package is securely uploaded to the Cogni+ Platform
  4. Registration: The model is registered in your account or organization
  5. Review: For public models, a brief review ensures quality standards
  6. Deployment: After review, the model is available for deployment

Visibility Options

  • Private: Only visible to your organization members
  • Public: Available to all Cogni+ users (subject to review)

Tips

  • Test your model thoroughly locally before publishing
  • Use semantic versioning (e.g., 1.0.0) for version numbering
  • Provide a clear description to help users understand your model
  • Use tags to make your model discoverable
  • For large models, ensure you have a stable internet connection