MCP cover image

HTTP4K MCP桌面客户端

2

Github Watches

4

Github Forks

29

Github Stars

http4k MCP Desktop Client

http4k Logo

A command-line desktop client for connecting to MCP (Model Context Protocol) servers via standard input/output (StdIO). This client is designed to work seamlessly with AI assistants and applications that communicate through StdIO, such as Claude and other desktop AI applications.

Overview

The http4k MCP Desktop Client serves as a proxy that enables communication between desktop applications and MCP servers. While it works with any MCP-compliant server, it's specially optimized for servers built using the http4k MCP SDK.

Features

  • Multiple remote transport options: HTTP Streaming, SSE (Server-Sent Events), JSON-RPC, WebSocket
  • Various authentication methods: API Key, Bearer Token, Basic Auth, and OAuth
  • Customizable reconnection strategy
  • Simple StdIO interface for easy integration with desktop applications when using natively compiled Kotlin apps.

Remote Protocol Comparison

The MCP Standard remote protocol is HTTP Streaming, which superceded the previous standard (SSE) in the 2025-03-26 version. http4k has implemented other standard transports into the http4k-mcp-desktop, as these will be more appropriate for distributed/hosted MCP servers.

Protocol Standard/Extension State Default server path Setting Description
HTTP Non-streaming MCP Standard Stateless http://host/mcp http-nonstream Pure HTTP-based streaming communication Use this setting for Cursor!
HTTP Streaming MCP Standard Stateful http://host/mcp http-stream HTTP/SSE-based streaming communication. Supports sessions and replaying/reconnection of stram
SSE MCP (Legacy) Stateful http://host/sse sse Server-Sent Events, part of HTML5 spec, ideal for streaming data from server to client
WebSocket Protocol Extension Stateful http://host/ws websocket Full-duplex communication protocol, maintains persistent connection
JSON-RPC Protocol Extension Stateless http://host/jsonrpc jsonrpc Remote Procedure Call protocol encoded in JSON, request/response model

Installation

Via Homebrew

brew tap http4k/tap
brew install http4k-mcp-desktop

Via GitHub Releases

Download the latest release from GitHub Releases.

Usage

http4k-mcp-desktop --url http://localhost:3001/<protocol> [OPTIONS]

Command Line Options

Option Description Default
--transport MCP transport mode: http-stream, http-nonstream, sse (legacy), jsonrpc (non-streaming), websocket (streaming) http-stream
--url URL of the MCP server to connect to (required) N/A
--reconnectDelay Reconnect delay in seconds if disconnected 0
--version Get the version information for the app N/A

Authentication Options

At time of writing, there are no MCP Standard authorisation mechanisms. http4k has implemented some standard HTTP mechanisms into the http4k-mcp-desktop.

Option Description Format
--apiKey API key for server authentication String
--apiKeyHeader Custom header name for API key X-Api-key (default)
--bearerToken Bearer token for server authentication String
--basicAuth Basic authentication credentials <user>:<password>
--oauthTokenUrl OAuth token endpoint URL URL
--oauthScopes OAuth scopes to request Comma-separated list
--oauthClientCredentials OAuth client credentials <client>:<secret>

Examples

Basic connection: HTTP Streaming (HTTP+SSE) HTTP Connection

http4k-mcp-desktop --url http://localhost:3001/mcp
...or
http4k-mcp-desktop --url http://localhost:3001/mcp --transport http-stream

Basic connection: HTTP Non-streaming (HTTP) + Cursor

http4k-mcp-desktop --url http://localhost:3001/mcp --transport http-nonstream

Basic SSE Connection (legacy MCP standard)

http4k-mcp-desktop --url http://localhost:3001/sse --transport sse

OAuth Authentication

http4k-mcp-desktop --url http://localhost:3001/sse --oauthTokenUrl http://localhost:3001/token --oauthClientCredentials client:secret

JSON-RPC with API Key Auth

http4k-mcp-desktop --transport jsonrpc --url http://localhost:3001/jsonrpc --apiKey your-api-key

WebSocket with Bearer Token and Reconnect

http4k-mcp-desktop --transport websocket --url ws://localhost:3001/ws --bearerToken your-token --reconnectDelay 5

Integration with AI Applications

This client is specifically designed to work with desktop AI applications that use StdIO for communication. It handles:

  1. Reading input from the AI application via stdin
  2. Sending that input to the MCP server
  3. Receiving responses from the server
  4. Passing those responses back to the application via stdout

This enables seamless connections between desktop AI applications like Claude and remote MCP servers.

Configuring Claude Desktop

To configure Claude Desktop to use the http4k MCP Desktop Client, you'll need to create a JSON configuration file. Note that if you're on mac and installed the app via Brew, it will already be on your path. Here's how to set it up:

  1. Create a config.json file with the following structure:
{
    "command": "/path/to/http4k-mcp-desktop",
    "args": [
        "--url",
        "http://your-mcp-server:port/sse",
        "--transport",
        "httpstream"
    ],
    "env": {}
}
  1. Adjust the parameters as needed:

    • Update the path to where you've installed the http4k-mcp-desktop binary. For brew users it's already on your path so just use http4k-mcp-desktop
    • Set the correct URL and protocol options for your MCP server (see examples)
    • Add any authentication options required (see examples)
  2. In the Claude Desktop application settings, specify the path to your config.json file.

Example Configurations

Basic MCP Server Connection:

{
    "command": "/usr/local/bin/http4k-mcp-desktop",
    "args": [
        "--url",
        "http://localhost:3001/sse"
    ],
    "env": {}
}

With API Key Authentication:

{
    "command": "/usr/local/bin/http4k-mcp-desktop",
    "args": [
        "--url",
        "http://localhost:3001/sse",
        "--apiKey",
        "your-api-key"
    ],
    "env": {}
}

With OAuth Authentication:

{
    "command": "/usr/local/bin/http4k-mcp-desktop",
    "args": [
        "--url",
        "http://localhost:3001/sse",
        "--oauthTokenUrl",
        "http://localhost:3001/token",
        "--oauthClientCredentials",
        "client:secret"
    ],
    "env": {}
}

Learn More

FAQ

  • Q: I'm using Cursor but I get an error message when installing my MCP connection
  • A: Cursor users should currently use HTTP Non-streaming mode (--transport http-nonstream)

License

This project is licensed under the http4k Commercial License, which is totally free for non-commercial, non-profit and research use.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • open-webui
  • 用户友好的AI接口(支持Ollama,OpenAi API,...)

    Reviews

    4 (1)
    Avatar
    user_rm9TI8m1
    2025-04-18

    As a dedicated user of mcp-desktop, I am thoroughly impressed by its performance and user-friendly interface. Created by the talented team at http4k, this product offers exceptional reliability and functionality. The seamless integration and ease of use make it a standout in desktop applications. Highly recommended for anyone looking for a robust and efficient desktop solution! Check it out at https://github.com/http4k/mcp-desktop.