Content
# Tool List
[中文](./README.md) | [English](./README.en.md)
A Model Context Protocol (MCP) server bridge that allows dynamic registration of simple CLI tools and HTTP requests as MCP tools.
## Features
- **Dynamic Tool Registration**:
- **CLI Tools**: Register available CLI tools in the environment as MCP tools.
- **HTTP Tools**: Register simple HTTP endpoints as MCP tools.
- **Configuration Persistence**:
- CLI tools are persisted as YAML configurations.
- HTTP tools are persisted as JSON configurations.
## Project Structure
- `src/mcp_server_bridge/`: Main package source code.
- `server.py`: Core server logic and tool definitions.
- `config/`: Directory to store registered tool configurations (YAML/JSON).
- `__init__.py`: Package exports.
- `__main__.py`: Entry point.
- `tests/`: Test suite.
## Usage
### Connecting to the Server
The server runs in stdio or SSE mode:
- `-t sse` starts SSE mode
- `-t stdio` or no argument specified defaults to stdio mode
```json
"mcp-server-bridge": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-bridge"
]
}
```
### Example Usage
#### Registering CLI Tools
Register a CLI tool `fscan` as an `MCP` tool:

Using the CLI tool:

#### Registering HTTP Tools
Register an HTTP interface as an `MCP` tool:

Using the HTTP tool:

#### Other Tools
You can also register the following APIs and CLI tools through LLM conversations:
- **CLI**: `fscan`, `httpx`, `naabu`, `nmap`, `nuclei`, `subfinder`
- **HTTP**: `http://cip.cc`
### Built-in Management Tools
1. `get_cli_tool_help(command, help_flag)`:
- Retrieves the help text of a CLI command.
- Used to determine parameters during registration.
2. `register_cli_tool(command, tool_description, tool_usage, tool_args)`:
- Registers a new CLI tool to be exposed through MCP.
- Generates YAML configuration in `src/mcp_server_bridge/config/`.
3. `register_http_tool(name, description, method, url, params, data, headers)`:
- Registers a new HTTP tool.
- Generates JSON configuration in `src/mcp_server_bridge/config/`.
## Development
1. Install `uv` (if not already installed):
```bash
pip install uv
```
2. Install dependencies and packages:
```bash
uv sync
```
3. Run the server:
```bash
python src/mcp_server_bridge/server.py
```
4. Install
```bash
uv tool install . --force
```
## Testing
```bash
uv run pytest
```