Model Context Protocol
Connect AI tools directly to your backend
1. Overview
ZendBX MCP enables AI coding tools, IDEs, and AI agents to connect with a ZendBX backend and work with backend context directly.
Instead of manually providing database schemas, tables, relationships, APIs, and configuration to an AI tool, MCP allows the AI tool to access the relevant ZendBX backend context through an MCP connection.
Architecture
Developer
↓
IDE / AI Coding Agent
↓
MCP Client
↓
ZendBX MCP
↓
ZendBX Backend
├── PostgreSQL Database
├── Tables
├── Relationships
├── APIs
├── Authentication
├── Permissions
└── Backend Resources2. What ZendBX MCP Provides
ZendBX MCP is designed to provide AI tools with backend context so they can:
3. Connection Flow
AI Tool ↓ MCP Client ↓ ZendBX MCP Server ↓ Authenticate ↓ Select ZendBX Project ↓ Access Backend Context ↓ Execute Allowed MCP Operation ↓ Return Result to AI Tool
4. MCP Connection Configuration
{
"mcpServers": {
"zendbx": {
"url": "<ZENDBX_MCP_URL>"
}
}
}Replace: <ZENDBX_MCP_URL> with the MCP endpoint provided by ZendBX.
5. Authentication
The MCP connection authenticates the requesting AI tool before allowing access to a ZendBX project.
Client ↓ Authentication ↓ Authorization ↓ ZendBX Project ↓ MCP Tools / Resources
Security Warning: Never place secret keys directly inside public documentation or source code.
6. Project Context
After connecting, the MCP server provides the AI agent with the appropriate ZendBX project context.
Example Project Structure
Project ├── Database │ ├── Tables │ ├── Columns │ ├── Relationships │ └── Indexes │ ├── APIs │ ├── Endpoints │ └── Methods │ ├── Authentication ├── Permissions └── Resources
7. Example AI Requests
Once connected, developers can ask AI coding agents questions such as:
Show me the database tables in my ZendBX project.
Explain the relationship between users and orders.
Create a SQL query using the existing customer table.
Why is this API returning a 403 error?
Create an API for student attendance using the existing database schema.
Find the tables related to transactions.
8. MCP Tools
Document every MCP tool using this format:
Tool Template
Tool:
<tool_name>Purpose:
<what the tool does>
Input:
{
"project_id": "PROJECT_ID"
}Output:
{
"success": true,
"data": {}
}Permissions:
Required permission: <permission>
9. Security
ZendBX MCP follows least-privilege access principles.
Important Requirements
10. Error Handling
| Error | Meaning | Action |
|---|---|---|
| Authentication Failed | Invalid credentials | Re-authenticate |
| Unauthorized | Insufficient permissions | Check project permissions |
| Project Not Found | Invalid project | Verify project ID |
| Tool Not Found | MCP tool unavailable | Check MCP server |
| Invalid Input | Incorrect parameters | Check tool schema |
| Server Error | ZendBX MCP failure | Check server logs |
11. Testing
Connection Test
Connect AI Tool
↓
ZendBX MCP
↓
Authenticate
↓
Load Project
↓
List Available Resources
↓
Execute Test Tool
↓
Verify ResponseTest Questions
1. What tables exist in this project?
2. What columns does the users table contain?
3. What relationships exist between the tables?
4. What APIs are available?
5. What permissions are configured?
12. Example Use Case
×Before MCP
✓With ZendBX MCP
13. Troubleshooting
MCP Connection Not Working
Check:
- MCP URL
- Authentication
- Project access
- Network connection
- MCP server status
- Client configuration
AI Cannot See Database
Check:
- Project ID
- Database permissions
- MCP tool permission
- MCP server connection
- Available resources
AI Cannot Execute an Operation
Check:
- Tool availability
- User permissions
- Project permissions
- Tool input parameters
- Authentication status
14. Version
15. Documentation Principle
ZendBX MCP should make the backend understandable to AI agents.
The goal is:
AI does not just generate code. AI understands the backend, uses its context, and helps developers build on top of it.

