Metadata-Version: 2.4
Name: research-and-development-11-mcp
Version: 0.1.0
Summary: Add your description here
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: fastmcp>=3.4.4

# JSON Converter MCP Server

An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that converts JSON payloads into various target formats: SOAP XML envelopes, structured files, SQL queries, and message-queue messages.

Built with [FastMCP](https://github.com/jlowin/fastmcp) against the **MCP Specification 2026-07-28 RC**.

---

## Project Structure

```
research-and-development-11-mcp/
├── mcp_server/
│   ├── mcp_server.py                  # FastMCP server entry point & tool definitions
│   ├── mcp_tools_soap_adapter/        # JSON → SOAP XML
│   ├── mcp_tools_file_adapter/        # JSON → CSV / YAML / TOML
│   ├── mcp_tools_sql_adapter/         # JSON → SQL
│   └── mcp_tools_queue_adapter/       # JSON → AMQP / Kafka / SQS
├── mcp_client/
├── pyproject.toml
└── README.md
```

---

## Tools

| Tool | Description | Status | Details |
|---|---|---|---|
| `json_to_soap_xml` | Convert a JSON payload into a SOAP 1.1 or 1.2 XML envelope | ✅ Implemented | [README](mcp_server/mcp_tools_soap_adapter/README.md) |
| `json_to_other_files` | Convert a JSON payload into CSV, YAML, or TOML | 🚧 Planned | [README](mcp_server/mcp_tools_file_adapter/README.md) |
| `json_to_sql_query` | Generate an INSERT, UPDATE, or CREATE TABLE SQL statement | 🚧 Planned | [README](mcp_server/mcp_tools_sql_adapter/README.md) |
| `json_to_msgqueue` | Serialize a JSON payload into an AMQP, Kafka, or SQS message | 🚧 Planned | [README](mcp_server/mcp_tools_queue_adapter/README.md) |

---

## Requirements

- Python **3.13+**
- [uv](https://docs.astral.sh/uv/) (recommended package manager)

---

## Setup

```bash
# Clone the repository
git clone https://github.com/finastra-ai/research-and-development-11-mcp.git
cd research-and-development-11-mcp

# Install dependencies
uv sync

# (Optional) Install pre-commit hooks
pip install pre-commit && pre-commit install
```

---

## Running the Server

```bash
# Run via stdio transport (default)
uv run python mcp_server/mcp_server.py
```

---

## Build Windows EXE (PyInstaller)

You can package the MCP server as a standalone Windows executable (`.exe`) using PyInstaller.

### 1. Ensure dependencies are installed

```bash
uv sync
```

`pyinstaller` is included in dev dependencies via `pyproject.toml`.

### 2. Build the executable

```bash
uv run pyinstaller --onefile --name json-converter-mcp mcp_server/mcp_server.py
```

### 3. Output

- Executable: `dist/json-converter-mcp.exe`
- Build metadata/logs: `build/`
- Generated spec file: `json-converter-mcp.spec`

### 4. Run the executable

```bash
.\dist\json-converter-mcp.exe
```

This server uses `stdio` transport (same behavior as running the Python script), so the process stays active waiting for MCP client communication.

### Notes

- Build on Windows to produce a Windows `.exe`.
- If you change imports or add new runtime data files, rebuild the `.exe`.
- You can customize packaging options by editing `json-converter-mcp.spec` and rebuilding from the spec.

---

## Running with MCP Inspector

[MCP Inspector](https://github.com/modelcontextprotocol/inspector) is a visual tool for exploring and testing MCP servers interactively.

### Prerequisites

```bash
npm install -g @modelcontextprotocol/inspector
```

### Launch

```bash
npx @modelcontextprotocol/inspector uv run python mcp_server/mcp_server.py
```

This starts the Inspector UI (default: `http://localhost:5173`) connected to the server over stdio.

### What you can do in Inspector

- **List tools** — browse all registered tools and their input schemas
- **Call tools** — fill in parameters via a form and execute a tool directly
- **Inspect results** — view raw JSON responses and any errors
- **Read server info** — check the server name, version, and declared capabilities

---

## Dependencies

| Package | Version |
|---|---|
| `fastmcp` | `>=3.4.4` |

---

## Development

```bash
# Run pre-commit checks against all files
pre-commit run --all-files
```
