blink-mcp
v2.2.0
Published
Model Context Protocol server for Blink project management APIs
Maintainers
Readme
Blink MCP
Model Context Protocol server for Blink project management APIs. This server enables AI assistants to interact with Blink projects, databases, and edge functions.
Features
- SQL Database Operations: Execute SQL queries with automatic database creation
- Edge Function Management: List and deploy edge functions to projects
- Authentication: Secure access using Personal Access Tokens (PAT)
- Input Validation: Comprehensive validation using Zod schemas
- Error Handling: Detailed error messages and proper error codes
Installation
npx blink-mcp@latestConfiguration
Claude Desktop
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"blink-management": {
"command": "npx",
"args": ["blink-mcp@latest"],
"env": {
"BLINK_ACCESS_TOKEN": "your-personal-access-token-here"
}
}
}
}Other MCP Clients
For other MCP clients, run:
BLINK_ACCESS_TOKEN=your-token npx blink-mcp@latestGetting Your Access Token
- Go to Blink Dashboard
- Navigate to your project settings
- Generate a Personal Access Token (PAT)
- Copy the token and use it in your configuration
Available Tools
1. list_projects
List all projects for the authenticated user.
Parameters: None
Example:
{
"name": "list_projects"
}2. get_project_details
Get detailed information about a specific project.
Parameters:
project_id(string): The project identifier
Example:
{
"name": "get_project_details",
"arguments": {
"project_id": "your-project-id"
}
}3. execute_sql
Execute SQL queries on project databases. Automatically creates database if it doesn't exist.
Parameters:
project_id(string): The project identifiersql(string): SQL query to execute
Example:
{
"name": "execute_sql",
"arguments": {
"project_id": "your-project-id",
"sql": "CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT);"
}
}4. get_database_info
Get database information for a project.
Parameters:
project_id(string): The project identifier
Example:
{
"name": "get_database_info",
"arguments": {
"project_id": "your-project-id"
}
}5. create_database
Create a new database for a project.
Parameters:
project_id(string): The project identifier
Example:
{
"name": "create_database",
"arguments": {
"project_id": "your-project-id"
}
}6. delete_database
Delete the database for a project.
Parameters:
project_id(string): The project identifier
Example:
{
"name": "delete_database",
"arguments": {
"project_id": "your-project-id"
}
}7. list_edge_functions
List all edge functions deployed to a project.
Parameters:
project_id(string): The project identifier
Example:
{
"name": "list_edge_functions",
"arguments": {
"project_id": "your-project-id"
}
}8. deploy_edge_function 🆕 Supabase Compatible
Deploy an edge function to a project. 100% compatible with Supabase edge function format.
Parameters:
project_id(string): The project identifiername(string): Function display name (will be converted to kebab-case for slug)files(array): Array of files to deploy, each withnameandcontententrypoint_path(string, optional): Entry point file path (default: "index.ts")import_map_path(string, optional): Import map file path (will automatically enable import map if provided)
Example:
{
"name": "deploy_edge_function",
"arguments": {
"project_id": "your-project-id",
"name": "Hello World",
"entrypoint_path": "index.ts",
"import_map_path": "import_map.json",
"files": [
{
"name": "index.ts",
"content": "import \"jsr:@supabase/functions-js/edge-runtime.d.ts\";\n\nDeno.serve(async (req: Request) => {\n const data = {\n message: \"Hello there!\"\n };\n \n return new Response(JSON.stringify(data), {\n headers: {\n 'Content-Type': 'application/json',\n 'Connection': 'keep-alive'\n }\n });\n});"
}
]
}
}Notes:
- JWT verification is always disabled for deployed functions
- Import map is automatically enabled when
import_map_pathis provided - Function names are automatically converted to kebab-case for URL slugs
9. get_function_logs
Retrieve logs for a specific function.
Note: This feature may not be available through the management API and is provided as a placeholder.
Parameters:
project_id(string): The project identifierfunction_slug(string): Function name/slughours_back(number, optional): Hours to look back (1-168, default: 24)log_level(string, optional): Log level filter ("all", "errors", "warnings", "info")limit(number, optional): Maximum number of logs (1-1000, default: 50)
Error Handling
The server provides detailed error messages for common issues:
- Authentication errors: Invalid or missing access token
- Project access: User doesn't have access to the specified project
- Validation errors: Invalid parameters or missing required fields
- API errors: Issues with the underlying Blink API
Development
To run from source:
git clone <repository>
cd blink-mcp
npm install
npm run build
npm startLicense
MIT
Support
For issues and questions:
- GitHub Issues: Repository Issues
- Documentation: Blink API Documentation
Changelog
1.0.0
- Initial release
- Support for SQL database operations
- Support for edge function management
- Personal Access Token authentication
- Comprehensive input validation and error handling
