FluidMCP CLI

A command-line tool to run MCP servers from a single file, with support for automatic dependency resolution, environment setup, and package installation from local or S3 sources.


fluidmcp_file_


๐Ÿš€ Features

  • ๐Ÿ“ฆ Package Management

    • Install MCP packages with fluidmcp install author/package@version
    • Automatic dependency resolution and environment setup
    • Support for npm, Python, and custom MCP servers
  • ๐Ÿš€ FastAPI Gateway

    • Unified HTTP endpoints for all MCP tools
    • Server-Sent Events (SSE) streaming support
    • Swagger documentation at /docs
  • ๐Ÿ” Security & Authentication

    • Bearer token authentication
    • Secure mode with encrypted communications
    • Environment variable encryption for API keys

๐Ÿ“ฅ Installation

pip install fluidmcp

โšก Quick Start

1. Install a Package

fluidmcp install author/package@version

2. List Installed Packages

fluidmcp list

3. Run a Package

fluidmcp run ./config.json --file

๐Ÿ” Secure Run (Token Auth)

fluidmcp file_directory/config.json --file --secure --token your_token --start-server

fluidmcp_secure_1


after authorisation

fluidmcp_secure_2


โ˜๏ธ Run from S3 URL

fluidmcp run "https://bucket.s3.amazonaws.com/config.json" --s3

fluidmcp run "https://bucket.s3.amazonaws.com/config.json" --s3

Common Options:

  • --start-server โ€“ Starts FastAPI server
  • --master โ€“ Use S3-driven config
  • --file โ€“ Run from local config.json
  • --s3 โ€“ Run from S3 URL
  • --secure โ€“ Enable secure token mode
  • --token <token> โ€“ Custom bearer token

๐Ÿ“„ Run as an individual package

fluidmcp run author/package@version --start-server  

4. Run All Installed Packages

fluidmcp run all

๐Ÿ“‚ Run Modes

๐Ÿง  Master Mode (S3 Centralized)

fluidmcp install author/package@version --master
fluidmcp run all --master

๐Ÿงฉ Environment Variables

# S3 Credentials (used in --master mode)
export S3_BUCKET_NAME="..."
export S3_ACCESS_KEY="..."
export S3_SECRET_KEY="..."
export S3_REGION="..."


# Registry access
export MCP_FETCH_URL="https://registry.fluidmcp.com/fetch-mcp-package"
export MCP_TOKEN="..."

Edit Environment

fluidmcp edit-env <author/package@version>

๐Ÿ“ Directory Layout

.fmcp-packages/
โ””โ”€โ”€ Author/
    โ””โ”€โ”€ Package/
        โ””โ”€โ”€ Version/
            โ”œโ”€โ”€ metadata.json
            โ””โ”€โ”€ [tool files]

๐Ÿ“‘ metadata.json Example

{
  "mcpServers": {
    "maps": {
      "command": "npx",
      "args": ["-y", "@package/server"],
      "env": {
        "API_KEY": "xxx"
      }
    }
  }
}

๐Ÿงช Try an MCP Server

fluidmcp install Google_Maps/google-maps@0.6.2
fluidmcp run all

Then call it using:

import requests, json


url = "http://localhost:8099/google-maps/mcp"
payload = {
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "maps_search_places",
    "arguments": {
      "query": "coffee shops in San Francisco"
    }
  }
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2))

๐Ÿ“ก Streaming with SSE

curl -N -X POST http://localhost:8099/package/sse \
  -H "Content-Type: application/json" \
  -d @payload.json
  • sse/start
  • sse/stream
  • sse/message
  • sse/tools_call

Useful for LLMs, web scraping, or AI workflows that stream data.


๐Ÿ“ธ Demo

Installing an individual package

fluidmcp_install


Running an individual package

fluidmcp_run_individual (2)


Edit environment of a package

fluidmcp_edit-env (2)


๐Ÿค Contribute

FluidMCP is open for collaboration. Feel free to open issues or submit PRs.


๐Ÿ“Œ License

MIT License


Related Servers