Metadata-Version: 2.4
Name: ontoboom-mcp
Version: 0.2.1
Summary: MCP server for accessing OntoBoom Studio ontologies and the public Hub registry 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 and the public [Hub registry](https://hub.ontoboom.com) 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
- **Hub Discovery** — Search and explore public ontologies on the OntoBoom Hub (no auth required)
- **Secure** — Uses your OntoBoom API token for authenticated access

## 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://app.ontoboom.com)
2. Go to [Playground](https://playground.ontoboom.com) → **API Key**  
   *(or: avatar → API Tokens in the app)*
3. Click **Generate Token**, name it (e.g. "Claude Desktop"), select your projects
4. 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`

```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

### Your private 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"*

### Public Hub registry (no token required for these)

- *"Search the Hub for insurance ontologies"*
- *"What's in the @ontoboom namespace?"*
- *"Show me the classes in @ontoboom/supply-chain"*
- *"What versions of @ontoboom/fibo are available?"*
- *"Find ontologies about healthcare on the Hub"*

## Available Tools

### Private ontology tools (require API token)

| 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 |

### Hub tools (public, no auth required)

| Tool | Description |
|------|-------------|
| `search_hub` | Search public ontologies by keyword or domain |
| `explore_hub` | Browse featured, popular, and recent ontologies |
| `list_hub_namespace` | List ontologies in a namespace (e.g. `@ontoboom`) |
| `get_hub_ontology` | Get full manifest for a Hub ontology |
| `list_hub_versions` | List all published versions of a Hub ontology |

## Available Resources

| URI Pattern | Description |
|-------------|-------------|
| `ontoboom://ontology/{id}` | Full ontology model (private) |
| `ontoboom://ontology/{id}/classes` | Classes only |
| `ontoboom://ontology/{id}/properties` | Properties only |
| `ontoboom://ontology/{id}/turtle` | Turtle export |
| `ontoboom://hub/@{namespace}/{slug}` | Hub ontology manifest (public) |
| `ontoboom://hub/@{namespace}/{slug}@{version}` | Specific version manifest |

## Environment Variables

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

\* Hub tools work without a token. A token is only required for accessing your private ontologies.

## Development

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

python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

pip install -e .

ONTOBOOM_API_TOKEN=obt_xxx ontoboom-mcp
```

### Testing with MCP Inspector

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

## License

MIT — see [LICENSE](LICENSE) for details.

## Links

- [OntoBoom](https://ontoboom.com)
- [Hub](https://hub.ontoboom.com) — public ontology registry
- [Playground](https://playground.ontoboom.com) — API keys, Hub discovery, API explorer
- [API Docs](https://api.ontoboom.com/api/v1/docs)
- [Model Context Protocol](https://modelcontextprotocol.io/)
- [Report Issues](https://github.com/bojannyc/ontoboom/issues)
