# SeaTable MCP

> SeaTable MCP Server connects your AI client directly to SeaTable's database structure. You can manage data across projects—from CRM records to inventory counts—using natural conversation instead of complex UIs or SQL editors. This server exposes 11 tools that let your agent list, create, update, delete rows, and run advanced `query_sql` operations against your entire base.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** seatable, database-api, collaborative-data, sql-query, spreadsheet-database, no-code-automation, data-orchestration, mcp

## Description

SeaTable MCP Server connects your AI client directly to SeaTable's database structure, letting your agent manage data across every project—whether it’s CRM records or inventory counts. You use natural conversation instead of wrestling with complex UIs or SQL editors. This server exposes eleven tools that let your agent list, create, update, delete rows, and run advanced `query_sql` operations against your entire base.

**Querying Data with SQL**

The `query_sql` tool executes specific data retrieval and aggregation commands using standard SQL syntax. You can tell your AI client to run complex queries, letting it pull exactly what you need from your tables. This is how you get detailed reports without writing a single line of code yourself.

**Retrieving Specific Records and Full Lists**

The `list_tables` tool tells your agent every table and view available in the current database base. If you want to see all records, the `list_rows` tool retrieves the full dataset for any given table, so you can look over everything at once. For a single record, the `get_row` tool fetches all column data, needing just the unique ID and the table name. If you only need high-level structure info about the whole base, the `get_base_metadata` tool delivers that overview.

**Listing Database Structure**

The server gives you multiple ways to check what's going on under the hood. You can use `list_columns` to see every column header and its data type within a specific table. If you want to know which virtual filtered sets are available, the `list_views` tool retrieves all defined views for a given table. The structure itself is also exposed via `get_base_metadata`, giving you a complete picture of your base's layout.

**Creating and Modifying Records**

The ability to build data starts with the `create_table` tool, which defines and builds an entirely new data structure—a whole new table—within the database. Once the table exists, the `create_row` tool adds a brand-new, fully populated row record to any specified table in your base. When you need to change something that's already there, the `update_row` tool lets your agent modify specific field values inside an existing record. These tools let you handle creation and modification of data without ever touching the spreadsheet itself.

**Deleting Records**

The `delete_row` tool permanently removes a specified row record from a table, deleting the data for good. You use this when you know exactly which record needs to be wiped out.

This whole setup means your AI client acts like an expert database administrator sitting right next to you. It automatically handles all the complex API token exchanges needed for these data operations, keeping everything secure and reliable while letting you talk to your database naturally.

## Tools

### create_row
Adds a new, populated row record to a specified table in your base.

### create_table
Defines and builds an entirely new data structure (table) within the database.

### delete_row
Removes a specified row record from a table, permanently deleting the data.

### get_base_metadata
Retrieves high-level structural information about the entire database base.

### get_row
Fetches all column data for a single row, given its unique ID and table name.

### list_columns
Lists every column header and its type within a specific target table.

### list_rows
Retrieves all records from an entire table, returning the full dataset for inspection.

### list_tables
Lists every table and associated views available in the current database base.

### list_views
Retrieves all defined virtual views for a given table, useful for understanding filtered subsets.

### query_sql
Executes complex data retrieval and aggregation commands using standard SQL syntax.

### update_row
Changes the values of one or more cells in an existing row record.

## Prompt Examples

**Prompt:** 
```
List all rows from the 'Inventory' table in SeaTable.
```

**Response:** 
```
I've retrieved the records. You have 15 items in the 'Inventory' table, including 'Laptop Pro' (Stock: 5) and 'Office Chair' (Stock: 12). Would you like me to filter for low stock?
```

**Prompt:** 
```
Show me all tables in the project database and pull the data from the Tasks table with filters.
```

**Response:** 
```
Project database has 6 tables. "Tasks" (234 rows): 45 open, 123 in progress, 66 completed. "Team Members" (18 rows). "Milestones" (12 rows, 3 overdue). "Budget" (45 rows, total $234K). "Documents" (89 attachments). "Time Logs" (456 entries, 1,234 hours). Tasks filtered by status=open: 45 tasks. Top priority: "API redesign" (due tomorrow, assigned to Sarah). 8 tasks are blocked. Average completion time: 4.2 days. Overdue: 12 tasks.
```

**Prompt:** 
```
Create a new table called Sprint Backlog with columns for story points, assignee, and sprint number.
```

**Response:** 
```
Table "Sprint Backlog" created successfully. Columns configured: "Task Name" (text, primary), "Description" (long text), "Story Points" (number, range 1-13), "Assignee" (collaborator), "Sprint Number" (single select: Sprint 1-10), "Status" (single select: To Do, In Progress, Review, Done), "Priority" (single select: Critical, High, Medium, Low), "Created Date" (date, auto-fill). Default view: grouped by Sprint Number. 3 additional views created: Kanban by Status, Calendar view, and My Tasks filter.
```

## Capabilities

### Querying Data with SQL
Run specific data queries against your tables using standard SQL syntax via the `query_sql` tool.

### Creating New Records
Adds a fully structured row to any specified table using the `create_row` tool.

### Modifying Existing Data
Updates specific field values in an already existing record via the `update_row` tool.

### Retrieving Specific Records
Fetches all data for a single, known row using its unique identifier with the `get_row` tool.

### Listing Database Structure
Determines which tables and columns exist within your entire base using tools like `list_tables` or `list_columns`.

### Deleting Records
Permanently removes a specified row from a table using the `delete_row` tool.

## Use Cases

### Auditing Old Client Records
A compliance officer needs a report on all client records created before 2023 that haven't been updated. They prompt the agent: 'Find all clients in the CRM table where creation date < 2023 AND last modified date = NULL.' The agent executes `query_sql`, returns the list of IDs, and helps them prioritize which accounts need review.

### Onboarding New Departments
The Project Manager needs a new data source for department budgets. Instead of manually building the table, they tell their agent: 'Create a new table called Q4 Budget with columns for Department Name (text) and Allocated Amount (number).' The agent uses `create_table`, defining the structure instantly.

### Correcting Bad Data Entry
A team member realizes they accidentally typed 'Pending' instead of 'Complete' for a key milestone. They don't have to find the row, open it, and edit it. They simply ask: 'Update the status of Milestone ID 45 to Complete.' The agent calls `update_row` with precision.

### Getting an Inventory Snapshot
The Ops team needs a count of all available products and their current stock levels. They ask: 'List all rows from the Inventory table, showing product name and stock.' The agent runs `list_rows` or `query_sql`, providing the immediate snapshot they need to report on.

## Benefits

- Stop switching tabs to query data. Instead of jumping from your chat window to the SQL editor, you just tell your agent what you need. The `query_sql` tool handles the full syntax execution, giving you immediate results without leaving your workflow.
- Maintain a single source of truth for updates. If you find an outdated status in a spreadsheet view, don't manually fix it. Use `update_row` to tell your agent exactly which record needs changing and what its new value is.
- Understand the schema instantly. Before writing any query, use `list_columns` on a table. This ensures you know the exact column names and data types (e.g., is it text or number?) before running `query_sql`, preventing syntax errors.
- Manage structured workflows without GUIs. Need to onboard new project data? Instead of manually filling out forms, use `create_row` to programmatically ingest a whole record with multiple fields at once.
- System overview in seconds. Want to know what databases you're working with? Run `list_tables`. It gives an instant inventory of every table and view available for your agent to query.

## How It Works

The bottom line is: Your AI client handles all the API authentication, routing, and translation between natural language commands and precise database actions.

1. First, subscribe to this server on Vinkius and provide your SeaTable API Token and Server URL in the connection settings.
2. Your AI client sends a natural language request (e.g., 'What are the open tasks for Q3?') to the MCP Server endpoint.
3. The server translates the intent into specific tool calls (like `query_sql` or `list_rows`), executes them against SeaTable, and returns the structured data payload back to your AI client.

## Frequently Asked Questions

**How do I check if a table exists before trying to query it using `query_sql`?**
You should first call `list_tables`. This returns an overview of all available databases and tables, confirming the name you need for your SQL statement.

**Can I create a new field without manually updating the database schema? (using `create_row` or `update_row`)**
No. You must first use `list_columns` to see available fields, and if you need a truly new field, use `create_table` to define it.

**What is the difference between `list_rows` and `query_sql`?**
`list_rows` gets every single row in a table—raw data dump. Use `query_sql` when you need specific filtering, grouping (GROUP BY), or aggregation (COUNT/AVG) that requires proper SQL syntax.

**How do I make sure my AI client remembers the column names for `update_row`?**
Run `list_columns` first. The output gives you a list of every valid column name, which is what your agent needs to write an accurate update command.

**When using `get_base_metadata`, how does it handle API token expiration or permission issues?**
It provides an explicit error code indicating authentication failure. The agent detects these specific errors and prompts you to check your SeaTable credentials or refresh the required access tokens.

**What parameters do I need when calling `create_table` to ensure the new structure is usable?**
You must specify a unique name for the table. It's best practice to also define primary key columns and initial column types (text, number, etc.) during creation.

**If I use `list_tables` first, does it limit my subsequent queries using `query_sql`?**
No, listing tables just provides a list of available databases. You still need to specify the target table name in your SQL query for it to run successfully.

**Before running `delete_row`, is there a way to confirm that I'm actually deleting the correct record?**
The agent requires you to provide unique identifying details, like a row ID or combination of primary keys. This forces confirmation before the deletion command executes.

**Can my AI automatically run SQL queries on my SeaTable data?**
Yes! Use the `query_sql` tool. Provide a standard SQL string (e.g., 'SELECT * FROM Tasks WHERE Status = "Done"'), and your agent will return the aggregate or filtered results instantly.

**How do I find my SeaTable API Token?**
Open your SeaTable base, click the three dots (Advanced) next to the base name, select **API Token**, and create a permanent token for the base.

**Does this integration work with self-hosted SeaTable instances?**
Yes! You can provide your custom `serverUrl` (e.g., https://seatable.mycompany.com) during setup to connect the MCP server to your private instance.