Skip to main content
Glama
yuvraj9056

ls-mcp-server

by yuvraj9056
README.md
# ls-mcp-server

MCP server (FastMCP) that exposes two tools:

- `query_struct_data` — Generates/validates/executes SQL queries via the SQL agent.
- `search_kb` — Answers questions grounded in the RAG knowledge base via the RAG agent.

## Quick start

### 1) Install dependencies

```bash
pip install -r requirements.txt
```

### 2) Configure environment

Create a `.env` file (example values shown in `.env.example` if present) and set any credentials/connection strings required by:

- SQL Server (ODBC / connection settings)
- LLM provider (OpenAI / Groq / Ollama)
- Azure Search (if used)

### 3) Run the MCP server

```bash
python main.py
```

Server runs on:

- HTTP transport
- `0.0.0.0:8000`

## MCP inspector

Inspect the exposed tools for `main.py`:

```bash
mcp inspector --file main.py
```

If your installation uses the module form:

```bash
python -m mcp_inspector --file main.py
```

## Project structure

- `main.py` — MCP server + tool definitions
- `RAG_AGENT/` — RAG agent implementation
- `SQL_AGENT/` — SQL agent implementation
- `config/` — configuration / LLM factory

## Tests

```bash
pytest -q
```