Tght1211 http 4 mcp

Tght1211 http 4 mcp avatar

by Tght1211

HTTP-4-MCP configuration tool allows you to easily convert HTTP API to MCP tool without writing code. With simple interface operations, you can quickly configure an mcp-server.

What is Tght1211 http 4 mcp

MseeP.ai Security Assessment Badge

๐Ÿš€ HTTP-4-MCP Middleware Server

Version Python License

English | ไธญๆ–‡

๐ŸŒŸ Introduction

HTTP-4-MCP is a powerful middleware server that magically transforms regular HTTP interfaces into MCP (Model Control Protocol) interfaces. With simple configuration, your HTTP API becomes an MCP tool instantly!

โœจ Key Features

  • ๐Ÿ”„ HTTP to MCP: One-click conversion of HTTP APIs to MCP interfaces
  • ๐Ÿ“ JSON Configuration: Simple and intuitive configuration
  • ๐ŸŒŠ SSE Support: Real-time data streaming
  • ๐ŸŽจ Visual Configuration: Drag-and-drop interface for API configuration
  • ๐Ÿ”ฅ Hot Reload: Instant configuration updates without restart
  • ๐Ÿ“Š Complete Monitoring: Detailed logging and error tracking
  • ๐Ÿ›ก๏ธ Secure & Reliable: Built-in error handling and parameter validation

๐Ÿ‘จโ€๐Ÿ’ป Author Information

GitHub Gitee

๐Ÿ“ธ System Demo

๐Ÿ–ฅ๏ธ Intuitive Visual Configuration Interface

Visual Configuration Interface

๐Ÿ”„ Powerful API Conversion

API Conversion

๐Ÿ“Š cURL Import Support

cURL Import Support

๐Ÿš€ Tool Description

Tool Description

๐Ÿš€ Quick Start

๐Ÿ“ฆ Installation

# Clone repository
git clone https://gitee.com/tght1211/http-for-mcp-server.git
# or git clone https://github.com/tght1211/http-for-mcp-server.git

cd http-for-mcp-server

# Install dependencies (recommended using uv package manager)
uv venv
uv pip install -r requirements.txt

๐ŸŽฎ Start Service

# Activate virtual environment
.venv/Scripts/activate  # Windows
source .venv/bin/activate  # Linux/Mac

# Start main server
uv run run.py

# Start configuration UI (optional)
uv run run_config_ui.py

๐ŸŽฏ Usage Guide

1๏ธโƒฃ Configure API

Method 1: ๐ŸŽจ Visual Configuration (Recommended)

  1. Visit http://localhost:8002
  2. Click "Add New Interface"
  3. Fill in configuration parameters
  4. Save and apply instantly!

Method 2: ๐Ÿ“ JSON Configuration

{
  "tools": [
      {
          "name": "weather_api",
          "description": "Get real-time weather information for a specified city, including temperature, humidity, weather conditions, wind direction, and wind speed.\n    \n    This tool uses a two-step query process:\n    1. First, get the precise location ID through city name\n    2. Then, query real-time weather data using the location ID\n    \n    Example usage:\n    - Get weather information for \"Beijing\"\n    - Get real-time weather conditions for \"Shanghai\"\n    - Query temperature and humidity for \"Guangzhou\"\n    \n    Returns formatted weather information text, including city name, weather conditions, temperature, humidity, wind direction, and wind speed.",
          "url": "https://devapi.qweather.com/v7/weather/now",
          "method": "GET",
          "params": {
              "location": {
                  "type": "string",
                  "desc": "City name or ID",
                  "required": true,
                  "default": "101010100"
              },
              "key": {
                  "type": "string",
                  "desc": "API key",
                  "required": true,
                  "default": "05a3e2c04b65416e912088b76a7a487e"
              },
              "lang": {
                  "type": "string",
                  "desc": "Language",
                  "required": false,
                  "default": "zh"
              },
              "unit": {
                  "type": "string",
                  "desc": "Unit system",
                  "required": false,
                  "default": "m"
              }
          },
          "headers": {
              "User-Agent": "weather-app/1.0"
          },
          "response": {
              "code": {
                  "path": "code",
                  "desc": "Response status code"
              },
              "updateTime": {
                  "path": "updateTime",
                  "desc": "Data update time"
              },
              "fxLink": {
                  "path": "fxLink",
                  "desc": "Detailed weather information link"
              },
              "now": {
                  "path": "now",
                  "desc": "Real-time weather data object"
              },
              "now_obsTime": {
                  "path": "now.obsTime",
                  "desc": "Actual observation time"
              },
              "now_temp": {
                  "path": "now.temp",
                  "desc": "Current temperature (Celsius)"
              },
              "now_feelsLike": {
                  "path": "now.feelsLike",
                  "desc": "Feels like temperature (Celsius)"
              },
              "now_icon": {
                  "path": "now.icon",
                  "desc": "Weather icon code"
              },
              "now_text": {
                  "path": "now.text",
                  "desc": "Weather phenomenon text description"
              },
              "now_wind360": {
                  "path": "now.wind360",
                  "desc": "Wind direction 360-degree angle"
              },
              "now_windDir": {
                  "path": "now.windDir",
                  "desc": "Wind direction description"
              },
              "now_windScale": {
                  "path": "now.windScale",
                  "desc": "Wind scale"
              },
              "now_windSpeed": {
                  "path": "now.windSpeed",
                  "desc": "Wind speed (km/h)"
              },
              "now_humidity": {
                  "path": "now.humidity",
                  "desc": "Relative humidity percentage"
              },
              "now_precip": {
                  "path": "now.precip",
                  "desc": "Precipitation (mm)"
              },
              "now_pressure": {
                  "path": "now.pressure",
                  "desc": "Atmospheric pressure (hPa)"
              },
              "now_vis": {
                  "path": "now.vis",
                  "desc": "Visibility (km)"
              },
              "now_cloud": {
                  "path": "now.cloud",
                  "desc": "Cloud coverage percentage"
              },
              "now_dew": {
                  "path": "now.dew",
                  "desc": "Dew point temperature (Celsius)"
              }
          },
          "response_mode": "metadata"
      }
  ]
}

2๏ธโƒฃ Connect to MCP

# SSE connection URL
ws_url = "http://localhost:8000/mcp/sse"

๐Ÿ› ๏ธ Project Structure

๐Ÿ“ฆ http-for-mcp-server
 โ”ฃ ๐Ÿ“‚ config/            # Configuration files
 โ”ฃ ๐Ÿ“‚ demo/             # Example code
 โ”ฃ ๐Ÿ“‚ static/           # Static resources
 โ”ฃ ๐Ÿ“œ mcp_server.py     # Main server
 โ”ฃ ๐Ÿ“œ config_ui.py      # Configuration UI
 โ”ฃ ๐Ÿ“œ run.py           # Startup script
 โ”— ๐Ÿ“œ requirements.txt  # Dependencies

๐Ÿ“š Configuration Reference

๐Ÿ”ง Global Configuration

Configuration Description Default
๐ŸŒ host Server address "0.0.0.0"
๐Ÿ”Œ port Server port 8000
๐Ÿ› debug Debug mode false
๐Ÿ“ log_level Log level "info"

๐ŸŽ‰ Special Features

๐Ÿ”„ cURL Import

Paste cURL command directly, automatically generate configuration:

curl -X GET 'https://api.example.com/weather?city=beijing'

๐ŸŽจ Pixel Art Interface

  • ๐ŸŽฎ Game-like configuration experience
  • ๐ŸŽฏ Drag-and-drop parameter setting
  • ๐Ÿ“Š Real-time request test
  • ๐Ÿ”„ Automatically generate configuration

๐Ÿค Contribution Guide

  1. ๐Ÿด Fork this repository
  2. ๐Ÿ”ง Create feature branch
  3. ๐Ÿ“ Submit changes
  4. ๐Ÿš€ Push branch
  5. ๐Ÿ“ฌ Submit Pull Request

๐Ÿ“ž Get Help

  • ๐Ÿ“ง Submit Issue
  • ๐Ÿ’ฌ Join Discussion Group
  • ๐Ÿ“š View Wiki

๐Ÿ“„ Open Source License

This project uses the MIT license - see LICENSE file


Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

Brave Search MCP avatar

Brave Search MCP

Integrate Brave Search capabilities into Claude through MCP. Enables real-time web searches with privacy-focused results and comprehensive web coverage.

searchapiofficial
chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP ๆœๅŠกๅ™จ๏ผŒ็”จไบŽ็ฎก็†ๆกŒ้ขๅ›พ็‰‡ใ€ๆŸฅ็œ‹่ฏฆๆƒ…ใ€ๅŽ‹็ผฉใ€็งปๅŠจ็ญ‰๏ผˆๅฎŒๅ…จ่ฎฉTraeๅฎž็Žฐ๏ผ‰

mcp

Submit Your MCP Server

Share your MCP server with the community

Submit Now