Metadata-Version: 2.4
Name: ormcp-server
Version: 0.6.3
Summary: MCP server that connects AI applications to relational databases via object-relational mapping (ORM)
Project-URL: Homepage, https://www.softwaretree.com/v1/products/ormcp/
Project-URL: Documentation, https://github.com/softwaretree/ormcp-docs
Project-URL: Bug Reports, https://github.com/softwaretree/ormcp-docs/issues
Author-email: Damodar Periwal <dperiwal@softwaretree.com>
License: ORMCP Server Beta License Agreement
        
        Copyright (c) 2025 Software Tree, LLC
        
        PROPRIETARY SOFTWARE - ALL RIGHTS RESERVED
        
        This software and all associated documentation are proprietary and confidential 
        products of Software Tree, LLC ("Software Tree"). All rights are reserved.
        
        BETA EVALUATION LICENSE
        
        As a beta product, ORMCP Server is provided to you under this evaluation license 
        for testing and evaluation purposes only, at no cost, for a limited evaluation 
        period (typically up to 2 months from the date of first use).
        
        PERMITTED USE
        
        You may:
        - Use ORMCP Server for internal testing and evaluation
        - Install and run ORMCP Server in non-production environments
        - Provide feedback to Software Tree
        
        RESTRICTIONS
        
        You may not:
        - Use ORMCP Server in production without a separate commercial license
        - Modify, reverse engineer, decompile, or create derivative works
        - Distribute, sublicense, or transfer the software
        - Remove or alter any copyright notices or proprietary markings
        - Use the software beyond the evaluation period without a commercial license
        
        GILHARI AND JDX DEPENDENCY AND LICENSING
        
        ORMCP Server requires the Gilhari microservice to function, which in turn
        depends on JDX — the underlying ORM technology used
        by Gilhari. Both Gilhari and JDX are proprietary software products owned
        by Software Tree, LLC. Use of each is governed by their respective separate
        license agreements.
        
        By using ORMCP Server, you agree to comply with all terms of the Gilhari
        License and the JDX License, including any evaluation periods, licensing
        requirements, and usage restrictions.
        
        Gilhari and JDX incorporate various third-party software components. The
        complete details of these third-party components and their respective
        licenses are provided in the Gilhari LICENSE file included in the Gilhari
        SDK.
        
        For complete Gilhari and JDX license terms and third-party component
        details, see the LICENSE file in the Gilhari SDK or visit:
        https://www.softwaretree.com/v1/products/gilhari/
        https://www.softwaretree.com/v1/products/jdx/jdx.html
        
        PYTHON DEPENDENCIES
        
        ORMCP Server depends on the following open-source Python libraries:
        - mcp (Model Context Protocol SDK)
        - fastmcp (FastMCP framework)
        - httpx (HTTP client library)
        - pydantic (Data validation library)
        - uvicorn (ASGI server)
        - requests (HTTP library)
        
        These dependencies are governed by their respective open-source licenses. 
        See each library's license for specific terms.
        
        DISCLAIMER
        
        ORMCP Server (including, without limitation, any Software Tree Software or 
        updates provided hereunder) is provided "AS IS" without warranty of any kind, 
        express or implied, including but not limited to warranties of merchantability, 
        fitness for a particular purpose, or non-infringement.
        
        LIMITATION OF LIABILITY
        
        IN NO EVENT SHALL SOFTWARE TREE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
        SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO 
        DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA, OR USE, EVEN IF ADVISED OF THE 
        POSSIBILITY OF SUCH DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT 
        (INCLUDING NEGLIGENCE), STRICT LIABILITY, OR OTHERWISE, ARISING OUT OF OR 
        IN CONNECTION WITH THIS SOFTWARE OR ITS USE OR INABILITY TO BE USED.
        
        SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CONSEQUENTIAL DAMAGES, 
        SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU.
        
        TERMINATION
        
        This license is effective until the end of the evaluation period and 
        automatically terminates thereafter. Software Tree may terminate this license 
        immediately if you breach any terms.
        
        COMMERCIAL LICENSING
        
        Commercial licensing terms will be announced at the time of commercial release.
        
        For information about commercial licensing or to express interest:
        Email: ormcp_support@softwaretree.com
        Web: https://www.softwaretree.com
        
        GOVERNING LAW
        
        This Agreement and the rights of the Parties hereunder shall be governed by and 
        interpreted in accordance with the laws of the State of California, without 
        regard to its conflicts of law principles. The Parties agree that any appropriate 
        state or federal district court located in Santa Clara County, California, shall 
        have exclusive jurisdiction over any case or controversy arising hereunder and 
        shall be the proper forum in which to adjudicate such case or controversy.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Requires-Dist: fastmcp<4.0,>=3.4
Requires-Dist: httpx>=0.24.0
Requires-Dist: mcp[cli]<2,>=1.9.2
Requires-Dist: pydantic<3.0.0,>=2.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: uvicorn>=0.23.0
Provides-Extra: dev
Requires-Dist: myst-parser; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: sphinx; extra == 'dev'
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
Description-Content-Type: text/markdown

# ORMCP Server

**Make your relational data AI ready**

ORMCP Server is a Model Context Protocol (MCP) server that enables AI assistants to interact with relational databases using intuitive, object-oriented operations in JSON format.

## What is ORMCP Server?

ORMCP Server bridges the gap between AI applications and relational databases. It leverages the Gilhari microservice framework and JDX ORM to provide seamless database access through the standardized MCP protocol.

Instead of writing SQL, AI assistants like Claude and Gemini can work with your data using natural language and high-level object operations.

## Key Features

- **🌍 Database Agnostic** - Works with any JDBC-compliant database (PostgreSQL, MySQL, Oracle, SQL Server, SQLite, etc.)
- **✅ MCP Compliant** - Fully compatible with the Model Context Protocol standard
- **🔄 Object-Relational Mapping** - JSON object operations transparently mapped to relational data
- **🧾 Declarative ORM** - Define mappings using simple JDX grammar
- **🚀 High Performance** - Optimized with connection pooling, caching, and minimal database trips
- **🔒 Secure** - Domain model-specific operations with optional read-only mode

## Quick Start

### Installation

```bash
pip install ormcp-server
```

**Existing Gemfury beta users:** If you previously installed via Gemfury, you can continue using that channel or switch to PyPI. Both are supported during the beta period.

### Accessing Full Package with SDK and Examples

The source distribution includes everything you need to get started beyond the
installable package itself — a curated subset of the Gilhari SDK and a
ready-to-use example microservice.

```bash
# Download source distribution from PyPI
pip download --no-binary :all: ormcp-server

# Extract it (use the appropriate version number)
tar -xzf ormcp_server-*.tar.gz
cd ormcp_server-*/

# Now you have access to:
# - Gilhari_SDK/          Gilhari SDK essentials (libs, config, docs)
#                         Note: JDX User Manual excluded due to size; available at
#                         https://www.softwaretree.com/v1/products/jdx/docs/JDX-5.0-Manual-v1.pdf
# - gilhari_example1/     Ready-to-use SQLite-backed example microservice
# - package/client/       Example MCP client code
# - package/docs/         Additional ORMCP documentation
```

**Existing Gemfury beta users:**
```bash
pip download --no-binary :all: \
  --index-url https://YOUR_TOKEN@pypi.fury.io/softwaretree/ \
  --extra-index-url https://pypi.org/simple \
  ormcp-server
```

### Basic Usage

1. **Configure and start your Gilhari microservice** (handles database connectivity)
2. **Configure ORMCP Server:**

```bash
export GILHARI_BASE_URL="http://localhost:80/gilhari/v1/"
export MCP_SERVER_NAME="MyORMCPServer"
```

3. **Start the server:**

```bash
ormcp-server
```

4. **Connect your AI client** (e.g., Claude Desktop):

```json
{
  "mcpServers": {
    "my-ormcp-server": {
      "command": "ormcp-server",
      "env": {
        "GILHARI_BASE_URL": "http://localhost:80/gilhari/v1/",
        "MCP_SERVER_NAME": "MyORMCPServer"
      }
    }
  }
}
```

## How It Works

```
AI Assistant <--MCP--> ORMCP Server <--REST--> Gilhari Microservice <--JDBC--> Database
```

1. User sends natural language request to AI assistant (e.g., Claude)
2. AI assistant translates natural language into MCP tool calls
3. ORMCP Server receives MCP tool calls and translates to REST API calls
4. Gilhari microservice executes database operations via JDBC/SQL
5. Results returned as JSON objects through the chain back to user

## Example Interactions

**Query data:**
```
"Show me all users in California"
"What's the average age of users?"
```

**Manage data:**
```
"Create a new user named John Smith in Boston"
"Update all users in New York to have status=active"
```

**Explore schema:**
```
"What types of objects are available?"
"Show me the attributes of the User class"
```

## Available MCP Tools

- **getObjectModelSummary** - Discover classes and relationships
- **query** - Retrieve objects with filtering and sorting
- **getObjectById** - Fetch specific objects by primary key
- **access** - Navigate object relationships
- **getAggregate** - Calculate COUNT, SUM, AVG, MIN, MAX
- **insert** - Create new objects
- **update** - Update existing objects
- **update2** - Bulk-update existing objects
- **delete** - Delete objects
- **delete2** - Bulk-delete existing objects

In the READONLY mode, the insert/update/update2/delete/delete2 tools are not available.

## Requirements

- Python 3.12+
- Docker (for Gilhari microservice)
- JDBC driver for your database
- MCP-compatible client (Claude Desktop, Gemini CLI, etc.)

## Documentation

- **Complete Documentation**: [github.com/softwaretree/ormcp-docs](https://github.com/softwaretree/ormcp-docs)
- **API Reference**: [ORMCP Tools Reference](https://github.com/softwaretree/ormcp-docs/blob/main/reference/ormcp_tools_reference.md)
- **Quick Start**: [Getting Started Guide](https://github.com/softwaretree/ormcp-docs#quick-start)
- **GitHub repositories with working examples**: [Browse Examples](https://github.com/softwaretree/ormcp-docs/tree/main/examples)
- **Example Microservice**: [github.com/SoftwareTree/gilhari_example1](https://github.com/SoftwareTree/gilhari_example1)

## Beta Notice

ORMCP Server is currently in Beta for testing and evaluation purposes only. Not intended for commercial use.

## Support

- **Email**: ormcp_support@softwaretree.com
- **Issues**: [github.com/softwaretree/ormcp-docs/issues](https://github.com/softwaretree/ormcp-docs/issues)
- **Website**: [softwaretree.com](https://www.softwaretree.com)

## License

Proprietary software owned by Software Tree, LLC. See LICENSE for terms.

**Beta Evaluation**: Free for testing during evaluation period. 

**Commercial licensing** terms will be announced at the time of commercial release. For information or to express interest, contact Software Tree at [ormcp_support@softwaretree.com](mailto:ormcp_support@softwaretree.com) or visit [https://www.softwaretree.com](https://www.softwaretree.com).

---

**Software Tree** | Making databases AI-accessible