npm.io
0.0.20 • Published 3 months agoCLI

@mintmcp/hosted-cli

Licence
MIT
Version
0.0.20
Deps
9
Size
258 kB
Vulns
0
Weekly
0

MintMCP hosted-cli

This tool deploys MCP servers from local source code to MintMCP. If the server is already packaged in a registry such as npm or PyPI, consider using the MintMCP web UI for deploying packaged servers.

Javascript / Typescript Server

Prerequisites

  • The server must implement the MCP stdio transport (HTTP streamable is also supported, see the section below).
  • The default server startup command is npm install && npm run build && npm run start. If your server requires a different command, pass --startup-command "<command>" to deploy when you run them below.
Deploy

In the server's directory:

npx @mintmcp/hosted-cli deploy -n "<title for new server>"

This uploads the entire contents of the directory to a hosted server on MintMCP, and runs the startup command there.

Upon successful upload, this prints a server management URL where you can:

  • View server startup status and logs.
  • Configure environment variables.
  • Configure other server settings.

Rerun the command to upload changes as a new revision. The old revision will continue serving requests until the new revision starts up successfully.

Python FastMCP Server

Prerequisites

The server must implement the MCP stdio transport (HTTP streamable is also supported, see the section below). You can typically do this by adding at the bottom of your main server file:

if __name__ == "__main__":
    mcp.run(transport="stdio")
Deploy

If your server is a Python package (has a pyproject.toml or setup.py file), run in the server's directory:

npx @mintmcp/hosted-cli deploy -n "<title for new server>" --startup-command "uvx --from . python <path-to-main-file.py>"

Or, if your server is a plain Python file without a package, run in the server's directory:

# If necessary, specify additional dependencies with more `--with <dependency>` flags in the `uvx` command.
npx @mintmcp/hosted-cli deploy -n "<title for new server>" --startup-command "uvx --with fastmcp python <path-to-main-file.py>"

These upload the entire contents of the directory to a hosted server on MintMCP, and run the startup command there.

Upon successful upload, this prints a server management URL where you can:

  • View server startup status and logs.
  • Configure environment variables.
  • Configure other server settings.

Rerun the command to upload changes as a new revision. The old revision will continue serving requests until the new revision starts up successfully.

Other Types of Servers

Prerequisites

The server must implement the MCP stdio transport (HTTP streamable is also supported, see the section below). Most MCP server frameworks should be able to do this. Check your framework's documentation.

Deploy

In the server's directory:

npx @mintmcp/hosted-cli deploy -n "<title for new server>" --startup-command "<startup command>"

This uploads the entire contents of the directory to a hosted server on MintMCP, and runs the startup command there.

Upon successful upload, this prints a server management URL where you can:

  • View server startup status and logs.
  • Configure environment variables.
  • Configure other server settings.

Rerun the command to upload changes as a new revision. The old revision will continue serving requests until the new revision starts up successfully.

Environment Variables

You can set environment variables for your server at the server management URL. Click "Edit" in the "Server Configuration" section and then select "Environment Variables".

Environment Variable Editor

Global and Per-User environment variables are supported:

  • Global: Variable applies to all users across your organization.
  • Per-User: Each user will be prompted for values the first time they access the server.

HTTP Streamable Transport

You can also deploy servers that implement the HTTP streamable MCP transport on MintMCP. They must serve at "/mcp" on port 8000. Simply pass -t http to the deploy command to tell MintMCP to talk to the server using HTTP streamable.