# Ninox MCP

> Ninox MCP Server connects your AI agent directly to a low-code database platform. It lets you manage structured data—read records, build new entries, run complex scripts, and check schemas—all through natural conversation. Stop using spreadsheets for mission-critical business logic; this gives your AI the power of a dedicated database administrator.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** low-code, relational-database, business-apps, data-automation, custom-scripts, schema-management

## Description

The Ninox MCP Server plugs your AI agent directly into a structured, low-code database platform. You'll manage mission-critical data—reading records, building new entries, running complex scripts, and checking schemas—all through natural conversation with your agent. Stop using messy spreadsheets for anything that matters; this gives your AI the full control of a dedicated database administrator.

**Discovering Your Data Structure**

You can start by asking your agent to list every database or workspace your team manages across Ninox. Need to see how a specific table is set up? You'll use `get_database_schema` to retrieve the complete field definition and structure for any table you reference, letting you understand exactly what data points are available.

**Viewing Records**

Your agent can pull an overview of multiple entries from an entire table using `list_records`, giving you a quick look at all the top-level data points. If you know the unique identifier for a specific record, you'll use `get_record` to pull every single detail associated with that one entry.

**Modifying Data Entries (CRUD Operations)**

To add new information, your agent uses `create_records`, which builds brand-new records or populates data when a specific field needs input. If the record already exists but some details are wrong, you'll use `update_record` to modify only the necessary fields without deleting and recreating the whole thing. You can permanently wipe out outdated information using `delete_record`, removing an existing record from any specified table.

**Running Custom Logic**

For complex calculations or specialized business rules that go beyond simple data entry, you'll run advanced, native Ninox scripts and complex queries directly with `execute_ninox_script`. This mechanism lets your agent perform custom data transformations or execute intricate logic the way a database administrator would. It’s full database power, all through natural language conversation.

**How Your Agent Interacts With Everything**

Your AI client uses these tools to handle the entire lifecycle of structured business information. You can first check what databases exist using `list_databases`, then get a schema definition with `get_database_schema`. When you need to write new data, your agent calls `create_records` and populates fields; when records are stale, it deletes them via `delete_record`; if the record is just wrong, it updates specific fields using `update_record`. To read information, it can list multiple entries with `list_records` or pull all details on a single ID using `get_record`, and for maximum complexity, you'll execute custom business logic through `execute_ninox_script`.

## Tools

### create_records
Adds brand new records or updates data when a specific field needs to be populated.

### delete_record
Removes an existing record permanently from a specified Ninox table.

### execute_ninox_script
Runs advanced, native Ninox scripts or complex queries to perform custom calculations or data manipulation.

### get_database_schema
Retrieves the full field definition and structure for any database table you reference.

### get_record
Pulls all details for a single, specific record when provided with its unique ID.

### list_databases
Lists every database and workspace your team manages within Ninox.

### list_records
Retrieves a list of records from an entire table, allowing you to see the top-level data points across multiple entries.

### update_record
Modifies specific fields on existing records without deleting and recreating them.

## Prompt Examples

**Prompt:** 
```
List all tables in my Ninox database ID 'db123'.
```

**Response:** 
```
I've retrieved your tables. You have 4 active structures including 'Invoices', 'Customers', and 'Inventory'. Which one would you like to see records for?
```

**Prompt:** 
```
Show me the schema and field definitions for the Customers table in database db_main.
```

**Response:** 
```
The Customers table in db_main has 8 fields: Name (text, required), Email (email), Phone (phone), Company (text), Status (choice: Active/Inactive/Lead), Revenue (number, currency), Created Date (date), and Notes (multiline text). There are 342 records currently in this table.
```

**Prompt:** 
```
Create a new record in the Orders table with customer Acme Corp, amount 4500, and status Pending.
```

**Response:** 
```
New record created successfully in the Orders table (Record ID: 1847). Customer: Acme Corp, Amount: $4,500.00, Status: Pending. The record was automatically timestamped with today's date and linked to the existing Acme Corp entry in your Customers table.
```

## Capabilities

### Inspect Database Structures
List all databases in your team or retrieve the detailed field schema for a specific table to understand its data layout.

### Query and View Records
List multiple records from a table, or pull specific details for one record when you know its ID.

### Write New Data Entries
Add brand new entries to any Ninox table using structured data input through the AI interface.

### Modify Existing Records
Update specific fields on records that already exist, ensuring your business metrics stay current.

### Delete Data Entries
Permanently remove records from a table when they are outdated or incorrect.

### Run Custom Scripts and Queries
Execute advanced, native Ninox scripts and complex queries to perform custom calculations or data transformations.

## Use Cases

### Checking a Project Status Across Teams
The Ops Lead needs to know if Acme Corp's invoice is ready. They ask the agent, 'What's the status of Invoice 1847?' The agent uses `get_record` on the Invoices table and returns the exact status and due date immediately. No dashboard clicks needed.

### Onboarding a New Client Record
A new customer walks in. Instead of filling out a multi-tab form, the agent uses `create_records` to populate the Customer table with all necessary details (Name, Email, Company). The record is created and linked instantly.

### Auditing Old Data
A data analyst needs to see every customer who signed up last quarter but hasn't placed an order. They prompt the agent to 'list records from Customers where Status is Lead.' The agent executes `list_records` and gives them a clean, filtered list.

### Running Quarterly Financial Reports
The manager needs a complex calculation: total revenue minus all pending payments. Instead of writing SQL or running a custom script manually, they ask the agent to 'run the quarterly net revenue script.' The agent uses `execute_ninox_script` and delivers the final number.

## Benefits

- **Real-time Data Checks:** Instead of opening a table and manually filtering, you ask your agent to run `list_records` or `get_record`. You get the exact data point (like 'Project Status' or 'Revenue') instantly, without clicking through dashboards.
- **Full Lifecycle Control:** The ability to `create_records`, `update_record`, and `delete_record` means your AI isn't just reading data; it's actively managing your business truth. This keeps records accurate and current right from the chat window.
- **Schema Clarity:** Need to know what fields are available before writing a query? Use `get_database_schema`. It pulls the table definition, so you never guess what column name or data type is correct again.
- **Complex Logic on Demand:** The `execute_ninox_script` tool lets you run advanced business logic—think complex joins or custom calculations—that would normally require a dedicated scripting environment. You just ask for it.
- **Instant Context Switching:** No more switching from your chat client to Ninox, navigating menus, and copying IDs. The agent handles all the context routing, keeping you in one place while running multi-step operations.

## How It Works

The bottom line is: You talk naturally, the agent runs the necessary Ninox tools, and you get structured data returned instantly.

1. First, subscribe to the server on Vinkius Marketplace and enter your Ninox Personal Access Token and Team ID.
2. Next, reference a specific database action in your chat prompt—for example, 'Show me the schema for the Customers table.'
3. Finally, your AI client executes the required tool (like `get_database_schema`), pulls the data, and reports the results back to you in plain text.

## Frequently Asked Questions

**How do I use the create_records tool in Ninox?**
You simply prompt your agent with the data and context, for example: 'Create a new record in the Orders table for Acme Corp, amount $4500.' The agent handles mapping that natural language request to the structured call using `create_records`.

**What is the difference between list_records and get_record with Ninox?**
`list_records` shows you a summary view of many entries in an entire table. Use it when you need to see if records exist or check general status. `get_record` pulls every single detail for one specific entry, requiring the record's unique ID.

**Can I run complex queries using execute_ninox_script?**
Yes. The `execute_ninox_script` tool lets you run native Ninox scripts and advanced logic directly. This is how you perform calculations or data manipulations that simple CRUD tools can't handle.

**If I need to check what fields a table has, which tool do I use? (get_database_schema)**
You must use `get_database_schema`. This tool reads the metadata for a given table and returns its field names, data types, and whether they are required. It's your blueprint.

**Before I use list_databases or any other tool, what setup is required?**
You need a Ninox Personal Access Token and Team ID. Your AI client uses these credentials to authorize every call, ensuring you only manage databases within your specific team structure.

**If I use the delete_record tool and the record is linked elsewhere, what happens?**
The deletion process respects data dependencies defined in Ninox. It checks for related records before confirming a delete; if constraints exist, it alerts you instead of failing silently.

**How does update_record handle changing just one field on a record?**
You specify the unique record ID and only the fields you want to change. The server modifies those exact parameters, preventing unintended overwrites on other data points in that record.

**What does list_databases show about my team’s overall structure?**
It returns a complete inventory of every managed database name and ID under your team's scope. This lets you quickly identify all potential data sources before targeting any specific table or record for action.

**Can my AI automatically find my Team ID for me?**
The Team ID is required during initial setup. You can find it in your browser URL when you are inside your Ninox workspace (e.g., `app.ninox.com/team/ABC123XYZ`).

**How do I find my Ninox Personal Access Token?**
Log in to your Ninox account at app.ninox.com, click the gear icon for Settings, and navigate to the **API** section to generate your unique secret token.

**Can I run native Ninox scripts via the AI?**
Yes! Use the `execute_ninox_script` tool. Provide your database ID and the script body, and the AI will perform the operation using Ninox's native server-side scripting engine.