MCP Http Server
📋 Project Overview
MCP Http Server is a Model Context Protocol (MCP) server implemented based on the Python httpx library. It supports HTTP request operations via a REST API, including various methods like GET, POST, PUT, and DELETE, aiming to simplify integration with various Web APIs.
🚀 Quick Start
Dependencies
Installation and Startup
Clone the project
git clone https://github.com/one-matrix/mcp-http.git
cd mcp-http-server
Please replace
one-matrixwith the actual username or project URL.
Install dependencies
Using uv (recommended):
uv pip install .
Or using pip:
pip install .
Start the server
Please add the actual startup command in your project, e.g.,
python server.pyoruv run server.py.
🛠️ Available Tools
This service provides the following core tools for Web API interaction:
1. http_get
- Description: Executes a GET request to the specified URL.
- Parameters:
url(str): The target URL, e.g.,https://api.example.com/data.params(dict, optional): A dictionary of URL query parameters.
- Returns: Status code (int) and response content (str).
2. http_post
- Description: Executes a POST request to the specified URL, optionally with a data body.
- Parameters:
url(str): The target URL.params(dict, optional): A dictionary of URL query parameters.body(dict, optional): A dictionary for the JSON request body.headers(dict, optional): Request headers. Defaults to includeContent-Type: application/json.
- Returns: Status code (int) and response content (str).
3. http_put
- Description: Executes a PUT request to the specified URL, optionally with a data body.
- Parameters:
url(str): The target URL.params(dict, optional): A dictionary of URL query parameters.body(dict, optional): A dictionary for the JSON request body.headers(dict, optional): Request headers. Defaults to includeContent-Type: application/json.
- Returns: Status code (int) and response content (str).
4. http_delete
- Description: Executes a DELETE request to the specified URL.
- Parameters:
url(str): The target URL.params(dict, optional): A dictionary of URL query parameters.
- Returns: Status code (int) and response content (str).
The original document described this as a "status code string"; typically, the status code is an integer, and the response content might be empty or a simple confirmation message. This has been adjusted for consistency.
🤝 Integration with Claude Desktop
You can integrate this MCP Http Server with Claude Desktop.
Method 1: Using uv to start
Add the following configuration to your claude_desktop_config.json file:
{
"mcpServers": {
"mcp-httpx": {
"command": "uv",
"args": [
"--from",
"git+https://github.com/one-matrix/mcp-http", // Replace with the path to the parent directory of the mcp-http-server project
"run",
"mcp-http" // Replace with the actual server startup script
]
}
}
}
or you can install : uv pip install mcp-http
{ "mcpServers": { "mcp-httpx": { "command": "uvx", "args": [ "--from", "git+https://github.com/one-matrix/mcp-http", "mcp-http" ] } } }
{ "mcpServers": { "mcp-httpx": { "command": "uv", "args": [ "run", "-m", "mcp_http" ] } } }
Example
📜 License
This project is open-sourced under the MIT License. You are free to use, modify, and distribute this software. For specific terms, please refer to the LICENSE file in the project repository.
Metadata
Release files for mcp-http 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_http-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / mcp_http-0.1.3-py3-none-any.whl
| Download URL | mcp_http-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d051b26856772ef18670a782b1d628b82516343cdee3b447924533cb6bc74b42
|
|
BLAKE2b-256 checksum How to use checksums |
6f3f01d0eb7ac7ba2c86858e957cd5480957c8b4d27adf8ffc2a3d7093d1eb03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for mcp-http 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.