Metadata-Version: 2.4
Name: ontoboom-mcp
Version: 0.1.1
Summary: MCP server for accessing OntoBoom ontologies via Model Context Protocol
Project-URL: Homepage, https://ontoboom.com
Project-URL: Documentation, https://github.com/bojannyc/ontoboom/tree/main/mcp-server
Project-URL: Repository, https://github.com/bojannyc/ontoboom
Project-URL: Issues, https://github.com/bojannyc/ontoboom/issues
Author-email: OntoBoom <support@ontoboom.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,knowledge-graph,llm,mcp,model-context-protocol,ontoboom,ontology,owl,rdf
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25.0
Requires-Dist: mcp>=1.0.0
Description-Content-Type: text/markdown

# OntoBoom MCP Server

Access your [OntoBoom](https://ontoboom.com) ontologies directly from Claude Desktop and other MCP-compatible AI assistants via the [Model Context Protocol](https://modelcontextprotocol.io/).

## Features

- **List Projects & Ontologies** - Browse your accessible projects and ontologies
- **Get Ontology Data** - Retrieve classes, properties, and full ontology models
- **Export Formats** - Export ontologies as Turtle, JSON-LD, RDF/XML, or JSON
- **Search** - Search for classes across all your ontologies
- **Secure** - Uses your OntoBoom API token for authentication

## Installation

### Using pip

```bash
pip install ontoboom-mcp
```

### Using uvx (recommended for Claude Desktop)

No installation required - uvx runs directly:

```bash
uvx ontoboom-mcp
```

## Setup

### 1. Generate an API Token

1. Log in to [OntoBoom](https://ontoboom.com)
2. Click your avatar → **API Tokens**
3. Click **Generate Token**
4. Enter a name (e.g., "Claude Desktop")
5. Select the projects you want to access
6. Copy the token (shown only once!)

### 2. Configure Claude Desktop

Edit your Claude Desktop configuration file:

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

Add the OntoBoom MCP server:

```json
{
  "mcpServers": {
    "ontoboom": {
      "command": "uvx",
      "args": ["ontoboom-mcp"],
      "env": {
        "ONTOBOOM_API_TOKEN": "obt_your_token_here"
      }
    }
  }
}
```

**Alternative using pip installation:**

```json
{
  "mcpServers": {
    "ontoboom": {
      "command": "ontoboom-mcp",
      "env": {
        "ONTOBOOM_API_TOKEN": "obt_your_token_here"
      }
    }
  }
}
```

### 3. Restart Claude Desktop

Close and reopen Claude Desktop to load the MCP server.

## Usage

Once configured, you can ask Claude about your ontologies:

- *"What projects do I have in OntoBoom?"*
- *"List the ontologies in my Research project"*
- *"What classes are in the Medical Terms ontology?"*
- *"Export my Product Catalog ontology as Turtle"*
- *"Search for classes related to 'customer' across all my ontologies"*

## Available Tools

| Tool | Description |
|------|-------------|
| `list_projects` | List all accessible projects |
| `list_ontologies` | List ontologies in a project |
| `get_ontology` | Get full ontology metadata and model |
| `get_classes` | Get all classes from an ontology |
| `get_properties` | Get object and data properties |
| `export_ontology` | Export as Turtle, JSON-LD, XML, or JSON |
| `search_classes` | Search classes across all ontologies |

## Available Resources

The server also exposes ontologies as MCP resources:

| URI Pattern | Description |
|-------------|-------------|
| `ontoboom://ontology/{id}` | Full ontology model |
| `ontoboom://ontology/{id}/classes` | Classes only |
| `ontoboom://ontology/{id}/properties` | Properties only |
| `ontoboom://ontology/{id}/turtle` | Turtle export |

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `ONTOBOOM_API_TOKEN` | Yes | Your OntoBoom API token |
| `ONTOBOOM_API_URL` | No | API URL (default: `https://api.ontoboom.com`) |

## Development

### Local Development

```bash
# Clone the repository
git clone https://github.com/bojannyc/ontoboom.git
cd ontoboom/mcp-server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

# Install in development mode
pip install -e .

# Run the server
ONTOBOOM_API_TOKEN=obt_xxx ontoboom-mcp
```

### Testing with MCP Inspector

```bash
npx @modelcontextprotocol/inspector uvx ontoboom-mcp
```

## License

MIT License - see [LICENSE](LICENSE) for details.

## Links

- [OntoBoom](https://ontoboom.com) - Visual Ontology Design
- [OntoBoom API Docs](https://api.ontoboom.com/api/v1/docs) - REST API Documentation
- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP Specification
- [Report Issues](https://github.com/bojannyc/ontoboom/issues)
