SalvSith/linqlo-mcp-server
If you are the rightful owner of linqlo-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Supabase Read-Only MCP Server provides secure, read-only access to a Supabase database, allowing AI agents to query data without risk of modification.
query_database
Execute raw SQL queries (SELECT only) against the database.
query_table
Query a specific table with structured filters and options.
get_schema
Get database schema information.
list_tables
List all available tables in the database.
Supabase Read-Only MCP Server
A Model Context Protocol (MCP) server that provides read-only access to your Supabase database. This server allows AI agents to safely query your database without any risk of data modification.
Features
- Read-Only Access: Only SELECT and WITH queries are allowed
- Safe Query Validation: Prevents any destructive operations
- Multiple Query Methods: Direct SQL queries or table-based queries with filters
- Schema Inspection: Get table and column information
- Configurable Limits: Control the maximum number of rows returned
- Type Safety: Built with TypeScript and Zod validation
Available Tools
1. query_database
Execute raw SQL queries (SELECT only) against the database.
Parameters:
query
(string, required): The SQL query to executelimit
(number, optional): Maximum rows to return (default: 100, max: 1000)
Example:
SELECT title, url, created_at FROM articles WHERE user_id = 'some-uuid' ORDER BY created_at DESC
2. query_table
Query a specific table with structured filters and options.
Parameters:
table
(string, required): Table name from available tablescolumns
(array, optional): Specific columns to selectfilters
(object, optional): Key-value filters to applylimit
(number, optional): Maximum rows to return (default: 100, max: 1000)orderBy
(string, optional): Column to order byascending
(boolean, optional): Order direction (default: true)
Example:
{
"table": "articles",
"columns": ["title", "url", "created_at"],
"filters": {
"user_id": "some-uuid",
"is_grouped": false
},
"orderBy": "created_at",
"ascending": false,
"limit": 50
}
3. get_schema
Get database schema information.
Parameters:
table
(string, optional): Specific table name for detailed schema
Examples:
// Get all tables
{}
// Get specific table schema
{"table": "articles"}
4. list_tables
List all available tables in the database.
Available Tables
articles
- Main articles/items with metadatagroups
- Article groupingsprojects
- User projectsdashboards
- Project dashboardscolumns
- Kanban board columnsnotes
- Article comments/notesprofiles
- User profilessections
- Custom sectionsitems
- Generic itemsteams
- Team information- And more...
Installation
-
Navigate to the MCP server directory:
cd mcp-server
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Edit
.env
with your Supabase credentials:SUPABASE_URL=https://your-project.supabase.co SUPABASE_ANON_KEY=your-anon-key-here
-
Build the server:
npm run build
Usage
Development
npm run dev
Production
npm start
Configuration with MCP Clients
Claude Desktop
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"supabase-readonly": {
"command": "node",
"args": ["/path/to/your/mcp-server/dist/index.js"],
"env": {
"SUPABASE_URL": "https://your-project.supabase.co",
"SUPABASE_ANON_KEY": "your-anon-key-here"
}
}
}
}
Other MCP Clients
The server communicates via stdio, so it should work with any MCP-compatible client. Refer to your client's documentation for configuration details.
Security
This server implements several security measures:
- Query Validation: Only SELECT and WITH statements are allowed
- Operation Blocking: Blocks INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, etc.
- Row Limits: Configurable maximum row limits to prevent large data dumps
- Environment Variables: Sensitive credentials are stored in environment variables
- Anon Key Usage: Uses Supabase anonymous key by default (respects RLS policies)
Database Schema
The server has access to your complete database schema. Key tables include:
- articles: Main content items with URLs, titles, descriptions
- groups: Organizational groupings for articles
- projects: User workspaces/projects
- dashboards: Kanban-style dashboards
- columns: Dashboard columns for organization
- notes: Comments and annotations on articles
Use the get_schema
tool to explore the full schema and column details.
Error Handling
The server provides detailed error messages for:
- Invalid queries or forbidden operations
- Database connection issues
- Invalid parameters or missing required fields
- Supabase-specific errors
Limitations
- Read-Only: No data modification operations allowed
- Row Limits: Maximum 1000 rows per query
- Anonymous Access: Uses anon key, respects Row Level Security policies
- SQL Features: Some advanced SQL features may not be available through Supabase
Troubleshooting
- Connection Issues: Verify SUPABASE_URL and SUPABASE_ANON_KEY are correct
- Permission Errors: Check that your anon key has read access to required tables
- Query Failures: Ensure queries use only SELECT statements and valid table/column names
- Schema Issues: Use
list_tables
andget_schema
to verify available tables and columns
Development
- TypeScript: Full type safety with TypeScript
- Zod Validation: Input validation for all parameters
- ESModules: Modern JavaScript module system
- Error Handling: Comprehensive error catching and reporting
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the MIT License.