# Vectorify Php

> Vectorify package for PHP

- **Type:** MCP server
- **Install:** `agentstack add mcp-vectorifyai-vectorify-php`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [vectorifyai](https://agentstack.voostack.com/s/vectorifyai)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [vectorifyai](https://github.com/vectorifyai)
- **Source:** https://github.com/vectorifyai/vectorify-php
- **Website:** https://vectorify.ai

## Install

```sh
agentstack add mcp-vectorifyai-vectorify-php
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Vectorify package for PHP

[](https://packagist.org/packages/vectorifyai/vectorify-php)
[](https://packagist.org/packages/vectorifyai/vectorify-php)
[](https://github.com/vectorifyai/vectorify-php/actions/workflows/tests.yml)
[](LICENSE.md)

Vectorify is the end-to-end AI connector for PHP, letting you query and explore your data in natural language in seconds.

To interact with your data, you have four primary methods to choose from:

1. Use the [Chats](https://app.vectorify.ai/) page within our platform (fastest)
2. Embed the [Chatbot](https://docs.vectorify.ai/project/chatbot) into your PHP app (turn data querying into a product feature)
3. Add the [MCP](https://docs.vectorify.ai/mcp-server) server to ChatGPT, Claude, etc. (use your data anywhere you work)
4. Call the REST [API](https://docs.vectorify.ai/api-reference) endpoints (build custom integrations and workflows)

Unlike text-to-SQL tools that expose your entire database and take 30+ seconds per query, Vectorify uses proven RAG technology to deliver accurate answers in  ['type' => 'string'],
        'status' => [
            'type' => 'enum',
            'options' => ['draft', 'sent', 'paid'],
        ]
    ],
);

// Create items
$items = [
    new ItemObject(
        id: '123',
        data: [
            'customer_name' => 'John Doe',
            'status' => 'draft',
            'amount' => '100',
            'currency' => 'USD',
            'due_date' => '2023-10-01'
        ],
        metadata: [
            'customer_name' => 'John Doe',
            'status' => 'draft'
        ],
        tenant: 987,
        url: 'https://example.com/invoice/123',
    ),
];

// Upsert data
$upsertObject = new UpsertObject($collection, $items);
$success = $vectorify->upserts->create($upsertObject);

if ($success) {
    echo "Data upserted successfully!\n";
}

// Query data
$queryObject = new QueryObject(
    text: 'how many invoices are in draft status?',
    collections: ['invoices'],
    tenant: 987,
    identifier: [
        'id' => '123',
        'name' => 'John Doe',
        'email' => 'john@example.com',
    ]
);

$result = $vectorify->query->send($queryObject);

if ($result !== false) {
    print_r($result);
}
```

## Features

- **Rate Limiting**: Automatic rate limit handling with exponential backoff
- **Retry Logic**: Built-in retry mechanism for failed requests
- **Type Safety**: Fully typed objects for better development experience
- **Error Handling**: Comprehensive error handling and logging
- **PSR-7 Compatible**: Uses PSR-7 HTTP message interfaces

## API Methods

### Upsert

Create or update items in your Vectorify collection:

```php
$upsertObject = new UpsertObject($collection, $items);
$success = $vectorify->upserts->create($upsertObject);
```

### Query

Ask questions about your data:

```php
$queryObject = new QueryObject('your question here');
$result = $vectorify->query->send($queryObject);
```

## Configuration

### Timeout

You can configure the request timeout when initializing the client:

```php
$vectorify = new Vectorify('your-api-key', 60); // 60 seconds timeout
```

### Debug Logging

Enable debug logging by defining a constant:

```php
define('VECTORIFY_DEBUG', true);
```

## Error Handling

The SDK includes comprehensive error handling:

- **Rate Limiting**: Automatically handles 429 responses with appropriate delays
- **Server Errors**: Retries server errors (5xx) with exponential backoff
- **Client Errors**: Returns `null` or `false` for client errors (4xx)
- **Network Errors**: Retries network-related errors

## Changelog

Please see [Releases](../../releases) for more information on what has changed recently.

## Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

## Security

Please review [our security policy](https://github.com/vectorifyai/laravel-vectorify/security/policy) on how to report security vulnerabilities.

## License

The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [vectorifyai](https://github.com/vectorifyai)
- **Source:** [vectorifyai/vectorify-php](https://github.com/vectorifyai/vectorify-php)
- **License:** MIT
- **Homepage:** https://vectorify.ai

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-vectorifyai-vectorify-php
- Seller: https://agentstack.voostack.com/s/vectorifyai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
