Overview/MCP/Transport modes

Transport modes

Choose local stdio or remote Streamable HTTP.

Transport Modes

KPainter MCP supports local stdio and remote Streamable HTTP.

stdio

Use stdio for desktop MCP clients, IDEs, and local agents:

kp-mcp --stdio

From source:

python -m src.mcp_server --stdio

Benefits:

  • simple local configuration
  • API key stays in local environment variables
  • straightforward process-level troubleshooting

Streamable HTTP

Use Streamable HTTP for hosted agents and remote MCP clients. The production endpoint is:

https://api.kpainter.ai/mcp

Run it locally with:

uvicorn src.mcp_server:app --reload --port 8002

The default local endpoint is:

http://127.0.0.1:8002/mcp

Streamable HTTP clients should follow the MCP session lifecycle and preserve the Mcp-Session-Id response header.

Which One Should I Choose?

  • Desktop or local IDE: start with stdio.
  • Hosted agent or remote service: use Streamable HTTP.
  • Conventional website or mobile backend: KPainter OpenAPI is usually simpler.

The same eight tools and fields are available through both transports.