ZenStack MCP Auth Server
Provides auto-generated MCP tools for CRUD operations on database models defined in ZenStack schema, enabling GitHub Copilot to manage data through the MCP protocol.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ZenStack MCP Auth Serverlist all posts in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ZenStack Remote MCP Server with Authorization
A Model Context Protocol (MCP) Streamable HTTP server supporting auto-generated CRUD tools of database with Authorization and credential Authentication.
Features
MCP Streamable HTTP Protocol: Multiple simultaneous MCP server connections with credential Authentication support.
ZenStack Integration: Automatically generates MCP tools for the CRUD operations of the models defined in the ZenStack schema. This demo will use a simple blog application with
UserandPostmodels.
Related MCP server: Express REST API and MCP Server Framework
Auto-generated Tools
The server automatically generates MCP tools for each model defined in the ZenStack schema. Here are the supported tools:
findUnique
findFirst
findMany
create
createMany
delete
deleteMany
update
updateMany
upsert
aggregate
groupBy
count
You can opt-in available tools for functionNames variable in mcp-server.ts
Quick Start
Install dependencies:
npm installSet up the database:
npx zenstack generate npx prisma db pushSeed the database (optional):
npx prisma db seedIt create 3 users with posts. The passwords for all users are
password123.Start the server:
npm run dev
Testing the MCP Server
MCP Inspector
The easiest way to test the MCP server is to run
npx @modelcontextprotocol/inspectorMCP Client
If your chosen MCP client supports remote OAuth2 MCP server, you can directly connect. Otherwise, you can use mcp-remote to do it
All the most popular MCP clients (Claude Desktop, Cursor, Github Copilot) use the following config format:
{
"servers": {
"my-mcp-server": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3001/mcp"]
}
}
}Troubleshooting
Clear your ~/.mcp-auth directory
If you encounter an invalid client error when connecting to the MCP server, it may be due to that mcp-remote only register oauth client for the first time.you can fix it by removing the cached client state:
rm -rf ~/.mcp-authDelete old versions of Node in NVM for Claude Desktop
When using Claude Desktop, if you didn't see any OAuth window open in your browser, it may be due to the fact that Claude Desktop is using an old version of Node.js even if you have a newer version installed. You can fix it by deleting old versions of Node.js in NVM.
This server cannot be deployed
Maintenance
Related MCP Connectors
Build multi-tenant apps over MCP. Schemas, CRUD, deploys — access control enforced server-side.
- TypeshipOAuthdev.typeship
Generate a typed SDK, CLI, and MCP server from any OpenAPI or GraphQL spec, and keep them current.
Deploy full-stack web apps with database, file storage, auth, and RBAC via a single API call.
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables LLMs to discover and invoke CRUD operations and read-only data resources for generated services through the Model Context Protocol, alongside traditional REST endpoints.-
- AlicenseNot gradedqualityAmaintenanceEnables LLMs to discover and invoke CRUD tools and read-only resources for generated services, allowing direct interaction with the same data exposed by the REST API.MIT
- AlicenseNot gradedqualityAmaintenanceExposes generated CRUD services to LLM clients over the Model Context Protocol, providing tools for create, update, and delete actions plus read-only resources for listing and fetching records by id. It lets assistants like Claude, ChatGPT, and Cursor discover and manipulate the same data served by the project's REST endpoints without any extra glue code.MIT
- AlicenseNot gradedqualityAmaintenanceEnables LLMs and AI assistants to discover and use tools and resources for CRUD operations on generated services, providing direct interaction with the same data exposed by REST endpoints.MIT