npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flexweg/mcp-cli

v1.0.14

Published

CLI tool to configure Flexweg MCP server in AI coding assistants (Claude Code, Cursor, Windsurf, VSCode)

Readme

@flexweg/mcp-cli

CLI tool to configure Flexweg MCP server in AI coding assistants

npm version License: MIT

What is this?

This CLI tool helps you quickly set up Flexweg MCP server in your AI coding assistant (Claude Code, Cursor, Windsurf, VSCode, Codex).

With one simple command, you can start deploying and managing HTML files directly from your AI assistant!

Quick Start

# Interactive setup (recommended)
npx -y @flexweg/mcp-cli init

# Specific IDE
npx -y @flexweg/mcp-cli init cursor
npx -y @flexweg/mcp-cli init windsurf
npx -y @flexweg/mcp-cli init vscode
npx -y @flexweg/mcp-cli init codex

That's it! The CLI will guide you through the rest.

Features

  • 🎯 One-command setup - No manual config editing
  • 🔐 Secure authentication - API key validation & temporary key generation
  • 🤖 Multi-IDE support - Works with Claude Code, Cursor, Windsurf, VSCode, Codex
  • Interactive wizard - Guides you step-by-step
  • 📝 Auto-gitignore - Excludes sensitive config files automatically

Supported AI Assistants

| IDE | Config Scope | Setup Command | |-----|-------------|---------------| | Claude Code | Project | npx @flexweg/mcp-cli init | | Cursor | Project | npx @flexweg/mcp-cli init cursor | | Windsurf | Project | npx @flexweg/mcp-cli init windsurf | | VSCode | Project | npx @flexweg/mcp-cli init vscode | | Codex | Project | npx @flexweg/mcp-cli init codex |

What Does It Do?

The CLI configures your AI assistant to connect to Flexweg MCP server, giving it access to tools like:

  • publish_html - Publish HTML pages (temporary, 1h auto-delete)
  • list_files - List all files in your storage
  • get_file_content - Read file content
  • upload_file - Create or update files
  • rename_file - Rename or move files
  • delete_file - Delete files
  • create_folder - Create directories
  • rename_folder - Rename directories
  • delete_folder - Delete directories

After setup, you can simply ask your AI assistant:

"Deploy this HTML page to Flexweg"

"Show me all my files on Flexweg"

"Update the index.html file on Flexweg"

Usage

Interactive Mode (Recommended)

npx @flexweg/mcp-cli init

The wizard will:

  1. Ask which IDE you want to configure
  2. Guide you through API key setup (3 options):
    • Enter existing API key
    • Generate temporary key (24h, requires login)
    • Open dashboard to copy permanent key
  3. Verify your API key
  4. Write configuration files
  5. Show next steps

Non-Interactive Mode

# With existing API key
npx @flexweg/mcp-cli init cursor --api-key=abc123...

# Trust Codex project
npx @flexweg/mcp-cli init codex --trust-project --api-key=abc123...

Environment Variables

# Use custom Flexweg instance (self-hosted)
FLEXWEG_BASE_URL=https://my-flexweg.com npx @flexweg/mcp-cli init

# Use API key from environment
FLEXWEG_API_KEY=abc123... npx @flexweg/mcp-cli init --api-key=$FLEXWEG_API_KEY

Configuration Files

The CLI creates different config files depending on the IDE:

Claude Code (Project-level)

.mcp.json
.claude/
  skills/
    flexweg-hosting/
      SKILL.md
  commands/
    flexweg.md
.gitignore (updated)

.mcp.json example:

{
  "mcpServers": {
    "flexweg": {
      "type": "http",
      "url": "https://www.flexweg.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Important: Claude Code VSCode extension requires version 2.1.0+ for MCP HTTP transport to work correctly.

Cursor (Project-level)

.cursor/mcp.json
.gitignore (updated)

Windsurf (Project-level)

.windsurf/mcp.json
.gitignore (updated)

VSCode (Project-level)

.vscode/settings.json
.gitignore (updated)

Codex (Project-level)

.codex/mcp.json
.codex/.trusted (if --trust-project flag used)
.gitignore (updated)

API Key Management

Option 1: Existing API Key

Get your permanent API key from Flexweg Dashboard.

npx @flexweg/mcp-cli init --api-key=YOUR_64_CHAR_API_KEY

Option 2: Generate Temporary Key

The CLI can generate a 24-hour temporary API key:

npx @flexweg/mcp-cli init
# Select: "Generate a temporary API key (24h)"
# Enter email & password

Option 3: Open Dashboard

The CLI can open your browser to the API keys page:

npx @flexweg/mcp-cli init
# Select: "Open dashboard to get my API key"
# Copy your key from the browser
# Paste when prompted

Security

  • API keys are validated before writing config
  • Config files are auto-gitignored to prevent accidental commits
  • Keys are stored locally in config files (not sent to Flexweg CLI servers)
  • Use temporary keys for short-term projects or testing

⚠️ Never commit API keys to version control!

Command Reference

# Show help
npx @flexweg/mcp-cli --help

# Show version
npx @flexweg/mcp-cli --version

# Initialize with options
npx @flexweg/mcp-cli init [ide] [options]

Options:
  --api-key=KEY        Use existing API key
  --trust-project      Trust project (Codex only)
  --help, -h           Show help message
  --version, -v        Show version number

Troubleshooting

Claude Code: "No running MCP servers" or "flexweg failed"

Most common issue: Outdated VSCode extension version.

Solution:

  1. Open VSCode
  2. Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
  3. Search for "Claude Code"
  4. Click "Update" button (if available)
  5. Restart VSCode

Required version: 2.1.0 or higher (version 2.0.37 and earlier have broken MCP HTTP transport)

Check your version:

ls ~/.vscode/extensions/ | grep anthropic.claude-code
# Should show: anthropic.claude-code-2.1.X-...

The CLI automatically warns you if your extension is outdated during setup.

"Invalid API key format"

Flexweg API keys are 64 hexadecimal characters. Make sure you copied the full key from your dashboard.

"API key verification failed"

  • Check your internet connection
  • Verify the API key is active in your dashboard
  • Try generating a new temporary key

"Permission denied" errors

  • Make sure you have write permissions in the project directory
  • Make sure you have write permissions in the project directory

Config not detected by IDE

  • Claude Code: Ensure .mcp.json is in project root, restart VSCode, run /mcp command
  • Cursor: Ensure .cursor/mcp.json is in project root, restart Cursor
  • Windsurf: Ensure .windsurf/mcp.json is in project root, restart Windsurf
  • VSCode/Codex: Restart the application

Self-hosted Flexweg instance

FLEXWEG_BASE_URL=https://your-instance.com npx @flexweg/mcp-cli init

Development

# Clone the repo
git clone https://github.com/fleweg/static-host.git
cd static-host/mcp-cli

# Install dependencies
npm install

# Link for local testing
npm link

# Test locally
flexweg-mcp init

# Or run directly
node bin/flexweg.js init

Requirements

  • Node.js >= 18.0.0
  • Internet connection (for API key verification)
  • One of the supported AI assistants installed

Links

License

MIT © Flexweg Team

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our GitHub repository.


Made with ❤️ by the Flexweg team