# llms-bridge-mcp

An MCP (Model Context Protocol) server to bridge LLM calls via the Model Context Protocol.

## Installation

Using `uv`:

```bash
uv sync
```

## Usage

### Run in stdio mode (for MCP clients like Claude Desktop)

```bash
uv run stdio
```

### Run in HTTP mode

```bash
uv run http --host 0.0.0.0 --port 3011
```

### Run in SSE mode

```bash
uv run sse --host 0.0.0.0 --port 3011
```

### Development mode with Smithery

```bash
uv run dev
```

## Available Tools

### llm_bridge_echo

A simple mock tool that echoes back the input message.

**Parameters:**
- `message` (str): The message to echo back

**Returns:**
- `LLMBridgeResult` containing the echoed message and its length

**Example:**
```python
result = await llm_bridge_echo(message="Hello, World!")
```

## Testing

Run tests with pytest:

```bash
uv run pytest
```

## Configuration

Set the following environment variables:

- `LLM_BRIDGE_API_KEY`: API key for authentication (optional for mock tool)
- `MCP_HOST`: Host to bind to (default: 0.0.0.0)
- `MCP_PORT`: Port to bind to (default: 3011)
- `MCP_TRANSPORT`: Transport type (default: streamable-http)

## Project Structure

```
llms-bridge-mcp/
├── src/
│   └── llms_bridge_mcp/
│       ├── __init__.py
│       └── server.py
├── tests/
│   └── test_server.py
├── pyproject.toml
└── README.md
```
