Skip to content

Commit 288e615

Browse files
committed
Update build structure
1 parent 49dd089 commit 288e615

File tree

6 files changed

+93
-166
lines changed

6 files changed

+93
-166
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Thumbs.db
124124

125125
# Custom
126126
.clinerules/
127+
.clineignore
127128
data/
128129
src/online_llm_server/
129130
build.bat

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ A Model Context Protocol (MCP) server wrapper designed to facilitate seamless in
1313
- Designed for extensibility, allowing easy integration of new LLM backends.
1414
- Integrates with `llm-accounting` for robust logging, rate limiting, and audit functionalities, enabling monitoring of remote LLM usage, inference costs, and inspection of queries/responses for debugging or legal purposes.
1515

16+
## Dependencies
17+
18+
This project relies on the following key dependencies:
19+
20+
### Core Dependencies:
21+
* `fastapi`: A modern, fast (high-performance) web framework for building APIs with Python 3.7+.
22+
* `uvicorn`: An ASGI server, used to run FastAPI applications.
23+
* `pydantic`: Data validation and settings management using Python type hints.
24+
* `pydantic-settings`: Pydantic's settings management for environment variables and configuration.
25+
* `python-dotenv`: Reads key-value pairs from a `.env` file and sets them as environment variables.
26+
* `requests`: An elegant and simple HTTP library for Python.
27+
* `tiktoken`: A fast BPE tokeniser for use with OpenAI's models.
28+
* `llm_accounting`: For robust logging, rate limiting, and audit functionalities, enabling monitoring of remote LLM usage, inference costs, and inspection of queries/responses for debugging or legal purposes.
29+
30+
### Development Dependencies:
31+
* `pytest`: A mature full-featured Python testing framework.
32+
* `black`: An uncompromising Python code formatter.
33+
* `isort`: A Python utility / library to sort imports alphabetically, and automatically separate into sections and by type.
34+
* `mypy`: An optional static type checker for Python.
35+
* `pytest-mock`: A pytest plugin that provides a `mocker` fixture for easier mocking.
36+
1637
## Installation
1738

1839
1. Create and activate a virtual environment:
@@ -112,6 +133,8 @@ python -m llm_wrapper_mcp_server --query "Calculate 15 * 3." --tool "calculator"
112133

113134
## Development
114135

136+
For a detailed overview of the project's directory and file structure, refer to [docs/STRUCTURE.md](docs/STRUCTURE.md). This document is useful for understanding the codebase during development.
137+
115138
Install development dependencies:
116139

117140
```bash

docs/STRUCTURE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Project Structure
2+
3+
This document outlines the directory and file structure of the `llm-wrapper-mcp-server` project.
4+
5+
```
6+
.
7+
├── .gitignore
8+
├── CHANGELOG.md
9+
├── LICENSE
10+
├── pyproject.toml
11+
├── README.md
12+
├── requirements.txt
13+
├── config/
14+
│ └── prompts/
15+
│ └── system.txt
16+
├── data/
17+
├── docs/
18+
│ └── STRUCTURE.md
19+
├── logs/
20+
├── src/
21+
│ └── llm_wrapper_mcp_server/
22+
│ ├── __init__.py
23+
│ ├── __main__.py
24+
│ ├── llm_client.py
25+
│ ├── llm_mcp_server.py
26+
│ ├── llm_mcp_wrapper.py
27+
│ └── logger.py
28+
├── tests/
29+
│ ├── test_llm_client.py
30+
│ ├── test_llm_mcp_wrapper.py
31+
│ ├── test_model_validation.py
32+
│ └── test_openrouter.py
33+
└── version_manager.py
34+
└── release_orchestrator.py
35+
└── build.bat
36+
```
37+
38+
### Directory Descriptions:
39+
40+
* `.`: The root directory of the project.
41+
* `config/`: Contains configuration files for the application.
42+
* `prompts/`: Stores system prompts used by the LLM.
43+
* `data/`: Intended for storing any data files generated or used by the application.
44+
* `docs/`: Contains project documentation, including this structure description.
45+
* `logs/`: Stores application log files.
46+
* `src/`: Contains the source code of the application.
47+
* `llm_wrapper_mcp_server/`: The main Python package for the LLM wrapper MCP server.
48+
* `tests/`: Contains unit and integration tests for the project.
49+
50+
### File Descriptions:
51+
52+
* `.gitignore`: Specifies intentionally untracked files to ignore by Git.
53+
* `CHANGELOG.md`: Documents all notable changes to the project.
54+
* `LICENSE`: Contains the licensing information for the project.
55+
* `pyproject.toml`: Project configuration file, including build system and dependencies.
56+
* `README.md`: Provides a general overview of the project, setup instructions, and usage.
57+
* `requirements.txt`: Lists the Python dependencies required for the project.
58+
* `src/llm_wrapper_mcp_server/__init__.py`: Initializes the `llm_wrapper_mcp_server` Python package.
59+
* `src/llm_wrapper_mcp_server/__main__.py`: Entry point for running the package as a script.
60+
* `src/llm_wrapper_mcp_server/llm_client.py`: Handles interactions with LLM APIs.
61+
* `src/llm_wrapper_mcp_server/llm_mcp_server.py`: Implements the MCP server logic for the LLM wrapper.
62+
* `src/llm_wrapper_mcp_server/llm_mcp_wrapper.py`: Wraps LLM functionalities for MCP integration.
63+
* `src/llm_wrapper_mcp_server/logger.py`: Configures and provides logging utilities.
64+
* `tests/test_llm_client.py`: Tests for the `llm_client.py` module.
65+
* `tests/test_llm_mcp_wrapper.py`: Tests for the `llm_mcp_wrapper.py` module.
66+
* `tests/test_model_validation.py`: Tests for model validation logic.
67+
* `tests/test_openrouter.py`: Tests specific to the OpenRouter LLM integration.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "llm-wrapper-mcp-server"
7-
version = "0.1.1"
7+
version = "0.1.2"
88
description = "Wrap a call to any remote LLM model and expose it as an MCP server tool to allow your main model to communicate with other models."
99
authors = [
1010
{name = "Mateusz", email = "[email protected]"},
@@ -14,7 +14,6 @@ dependencies = [
1414
"uvicorn>=0.24.0",
1515
"pydantic>=2.4.2",
1616
"pydantic-settings>=2.0.0",
17-
"httpx>=0.25.0",
1817
"python-dotenv>=1.0.0",
1918
"requests>=2.31.0",
2019
"tiktoken>=0.6.0",

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
pydantic-settings
2-
pytest-mock
3-
tiktoken>=0.5.1 # Token counting library
1+
tiktoken>=0.6.0
42
llm-accounting

tests/test_stdio_server.py

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)