Skip to content

MCP server won't connect to HTTP Portainer #36

@pbarone

Description

@pbarone

Running into a weird issue with the Portainer MCP server and hoping someone can help me out.

What's happening

I've got Portainer running on HTTP. The MCP server just refuses to connect via HTTP though - it keeps forcing HTTPS connections.

My setup

  • Portainer MCP Server: v0.6.0
  • Portainer: Running on HTTP at 192.168.1.100:9000 (works fine with curl)
  • Using it with Amazon Q CLI

Config I'm using

json
{
 "mcpServers": {
   "portainer": {
     "command": "/path/to/portainer-mcp",
     "args": [
       "-server",
       "192.168.1.100:9000",
       "-token",
       "ptr_xxx",
       "-tools",
       "/tmp/tools.yaml"
     ]
   }
 }
}

The errors I'm getting

failed to get Portainer server version: Get "https://192.168.1.100:9000/api/system/status": http: server gave HTTP response to HTTPS client

What I've tried

  • Double-checked that Portainer is actually responding (it is - curl http://192.168.1.100:9000/api/system/status works perfectly)
  • Restarted everything multiple times

Seems like the MCP server is either mangling the URL or just defaulting to HTTPS regardless of what I specify. Any ideas? Would love a flag like -insecure or something to force HTTP if that's easier than fixing the URL parsing.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions