You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/mcp/authzed/authzed-mcp-server.mdx
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
# AuthZed MCP Server
2
2
3
-
Connect your AI tools to AuthZed and SpiceDB documentation using the Model Context Protocol (MCP). Access comprehensive documentation, API references, and authorization pattern examples directly from your AI assistant.
3
+
Connect your AI tools to AuthZed and SpiceDB documentation using the Model Context Protocol (MCP).
4
+
Access comprehensive documentation, API references, and authorization pattern examples directly from your AI assistant.
4
5
5
6
## Overview
6
7
7
-
AuthZed MCP Server is a remote MCP server available at `https://mcp.authzed.com`. It provides tools with searchable access to SpiceDB and AuthZed resources, enabling you to learn about authorization systems, explore APIs, and find implementation examples without leaving your LLM chat or development environment.
8
+
AuthZed MCP Server is a remote MCP server available at `https://mcp.authzed.com`.
9
+
It provides tools with searchable access to SpiceDB and AuthZed resources, enabling you to learn about authorization systems, explore APIs, and find implementation examples without leaving your LLM chat or development environment.
8
10
9
11
### What You Can Do
10
12
@@ -33,6 +35,7 @@ Available on Pro and Plus accounts.
33
35
34
36
1. Enable **Developer mode** in Settings
35
37
2. Create connector:
38
+
36
39
-**Name**: AuthZed
37
40
-**MCP server URL**: `https://mcp.authzed.com`
38
41
-**Authentication**: None
@@ -53,6 +56,7 @@ Available on Pro, Max, Team, and Enterprise plans.
53
56
1. Open **Settings** → **Connectors**
54
57
2. Select **Add custom connector**
55
58
3. Configure:
59
+
56
60
-**Name**: AuthZed
57
61
-**URL**: `https://mcp.authzed.com`
58
62
@@ -75,6 +79,7 @@ Add to `.cursor/mcp.json`:
75
79
1. Command Palette → **MCP: Add Server**
76
80
2. Select **HTTP**
77
81
3. Configure:
82
+
78
83
-**URL**: `https://mcp.authzed.com`
79
84
-**Name**: AuthZed
80
85
@@ -164,9 +169,11 @@ The assistant uses `send_feedback` to guide you through submitting structured fe
164
169
165
170
**`system_instructions`** - View the system instructions for the AuthZed MCP server, including how it works and how to use it effectively.
166
171
167
-
**`explain_concept`** - Ask questions about SpiceDB concepts, AuthZed features, schema design, API usage, best practices, or troubleshooting. Returns authoritative answers with documentation references and examples.
172
+
**`explain_concept`** - Ask questions about SpiceDB concepts, AuthZed features, schema design, API usage, best practices, or troubleshooting.
173
+
Returns authoritative answers with documentation references and examples.
168
174
169
-
**`send_feedback`** - Provide feedback about the AuthZed MCP server, documentation, tools, or your general experience. The prompt guides you through submitting structured feedback.
175
+
**`send_feedback`** - Provide feedback about the AuthZed MCP server, documentation, tools, or your general experience.
176
+
The prompt guides you through submitting structured feedback.
170
177
171
178
## Available Resources
172
179
@@ -180,11 +187,13 @@ The assistant uses `send_feedback` to guide you through submitting structured fe
180
187
### Public Information Only
181
188
182
189
The server provides access to:
190
+
183
191
- Public SpiceDB and AuthZed documentation
184
192
- Publicly available API specifications
185
193
- Open source schema examples
186
194
187
195
The server does **not** access:
196
+
188
197
- Your AuthZed or SpiceDB instances
189
198
- Your authorization data
190
199
- Your application schemas
@@ -193,6 +202,7 @@ The server does **not** access:
Copy file name to clipboardExpand all lines: pages/mcp/authzed/spicedb-dev-mcp-server.mdx
+36-20Lines changed: 36 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,16 @@ import { Callout } from 'nextra/components'
6
6
The SpiceDB Dev MCP server is available as a Tech Preview. Tech Preview features provide the earliest access to upcoming product innovations, enabling you to test functionality and provide feedback during the development process.
7
7
</Callout>
8
8
9
-
Run a local SpiceDB development environment directly in your AI coding assistant. Build, test, and debug permissions systems interactively with an in-memory SpiceDB instance.
9
+
Run a local SpiceDB development environment directly in your AI coding assistant.
10
+
Build, test, and debug permissions systems interactively with an in-memory SpiceDB instance.
10
11
11
12
## Overview
12
13
13
-
SpiceDB Dev MCP Server is a local development tool that runs an in-memory SpiceDB instance accessible through MCP. It's designed for developers actively building permissions systems who want to iterate quickly on schemas and test permission logic with AI assistance.
14
+
SpiceDB Dev MCP Server is a local development tool that runs an in-memory SpiceDB instance accessible through MCP.
15
+
It's designed for developers actively building permissions systems who want to iterate quickly on schemas and test permission logic with AI assistance.
14
16
15
17
**Key characteristics**:
18
+
16
19
- Runs locally on your machine
17
20
- In-memory only (no persistence)
18
21
- No external dependencies
@@ -37,7 +40,8 @@ zed mcp run
37
40
38
41
The server starts on `http://localhost:9999/mcp` with an empty in-memory SpiceDB instance.
39
42
40
-
**Important**: The server runs in-memory only. All schemas and relationships are lost when you stop the server.
43
+
**Important**: The server runs in-memory only.
44
+
All schemas and relationships are lost when you stop the server.
41
45
42
46
## Connecting Clients
43
47
@@ -58,6 +62,7 @@ claude
58
62
### Other Clients
59
63
60
64
For MCP clients supporting HTTP transport, configure:
65
+
61
66
```
62
67
Transport: HTTP
63
68
URL: http://localhost:9999/mcp
@@ -69,7 +74,9 @@ URL: http://localhost:9999/mcp
69
74
70
75
Start by defining your authorization model:
71
76
72
-
> You: "Create a schema for a document sharing system. Documents have owners, editors, and viewers. Owners can share documents, editors can edit, and viewers can only read."
77
+
> You: "Create a schema for a document sharing system.
78
+
> Documents have owners, editors, and viewers.
79
+
> Owners can share documents, editors can edit, and viewers can only read."
73
80
74
81
The assistant uses `write_schema` to create the schema in your development instance.
75
82
@@ -150,6 +157,7 @@ The assistant updates the schema with `write_schema` and you can immediately tes
150
157
### Testing Edge Cases
151
158
152
159
Use the development server to test:
160
+
153
161
- Indirect permissions through [subject relations](/spicedb/concepts/schema#subject-relations)
154
162
- Complex permission unions and intersections
155
163
- Caveat evaluation with different contexts
@@ -158,6 +166,7 @@ Use the development server to test:
158
166
### Validation Files
159
167
160
168
Use validation files to:
169
+
161
170
- Define expected permission outcomes
162
171
- Test your schema systematically
163
172
- Document authorization requirements
@@ -169,32 +178,32 @@ Access with `validation://current` resource.
169
178
170
179
The MCP server works with your AI assistant to help you save schemas and validation files to disk.
171
180
172
-
**Exporting Schemas**
181
+
#### Exporting Schemas
173
182
174
183
Ask your assistant to save the current schema to a file:
175
184
176
185
> You: "Save my schema to schema.zed"
177
-
186
+
>
178
187
> You: "Write the current schema to permissions/document-sharing.zed"
179
188
180
189
The assistant reads from `schema://current` and writes the schema to your specified file path.
181
190
182
-
**Exporting Validation Files**
191
+
#### Exporting Validation Files
183
192
184
193
Save validation test cases to preserve your permission tests:
185
194
186
195
> You: "Save the validation file to tests/permissions.yaml"
187
-
196
+
>
188
197
> You: "Export validation to document-tests.yaml"
189
198
190
199
The assistant reads from `validation://current` and writes the validation YAML to your specified file.
191
200
192
-
**Loading Existing Files**
201
+
#### Loading Existing Files
193
202
194
203
You can also load schemas from existing files:
195
204
196
205
> You: "Load the schema from schema.zed and apply it to the dev server"
197
-
206
+
>
198
207
> You: "Read permissions/document-sharing.zed and write it to the MCP server"
199
208
200
209
The assistant reads your file and uses `write_schema` to apply it to the development instance.
@@ -204,6 +213,7 @@ The assistant reads your file and uses `write_schema` to apply it to the develop
204
213
### Local Development Only
205
214
206
215
**Never use in production**:
216
+
207
217
- No authentication or authorization on the server itself
208
218
- In-memory only, no data persistence
209
219
- Designed for localhost access only
@@ -233,11 +243,13 @@ The assistant reads your file and uses `write_schema` to apply it to the develop
233
243
### Server Won't Start
234
244
235
245
**Check Zed CLI installation**:
246
+
236
247
```bash
237
248
zed version
238
249
```
239
250
240
251
**Port 9999 in use**:
252
+
241
253
```bash
242
254
# macOS/Linux
243
255
lsof -i :9999
@@ -257,7 +269,7 @@ netstat -an | findstr 9999
257
269
258
270
### Schema Errors
259
271
260
-
**Syntax errors**: Review against [SpiceDB schema documentation](#)
272
+
**Syntax errors**: Review against [SpiceDB schema documentation](/spicedb/modeling/developing-a-schema)
261
273
262
274
**Undefined types**: Ensure all referenced types are defined in the schema
263
275
@@ -266,6 +278,7 @@ netstat -an | findstr 9999
266
278
### Unexpected Permission Results
267
279
268
280
**Debug process**:
281
+
269
282
1. View current schema: `schema://current`
270
283
2. List all relationships: `relationships://all`
271
284
3. Check indirect permission paths
@@ -274,9 +287,11 @@ netstat -an | findstr 9999
274
287
275
288
### Data Loss
276
289
277
-
**Remember**: The server is in-memory only. All data is lost when stopped.
290
+
**Remember**: The server is in-memory only.
291
+
All data is lost when stopped.
278
292
279
293
**To preserve work**:
294
+
280
295
- Save schemas to files regularly
281
296
-Exportrelationshipsfortestcases
282
297
- Use validation files to document expected behavior
@@ -290,17 +305,18 @@ When ready to move beyond development:
290
305
- Ask your assistant: "Save my schema to schema.zed"
Copy file name to clipboardExpand all lines: pages/mcp/index.mdx
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
3
3
## Overview
4
4
5
-
Model Context Protocol (MCP) is an open standard that enables large language models (LLMs) to communicate with external tools and data sources. Often referred to as "USB-C for AI", MCP provides a universal interface that allows AI applications to integrate once and interoperate with any MCP-compatible system.
5
+
Model Context Protocol (MCP) is an open standard that enables large language models (LLMs) to communicate with external tools and data sources.
6
+
Often referred to as "USB-C for AI", MCP provides a universal interface that allows AI applications to integrate once and interoperate with any MCP-compatible system.
6
7
7
8
By standardizing how AI tools access external data and functionality, MCP eliminates the need for custom integrations between every AI application and every external service.
8
9
@@ -22,35 +23,41 @@ LLMs face fundamental limitations when providing contextually relevant responses
22
23
23
24
### How MCP Works
24
25
25
-
The MCP specification standardizes how AI tools interact with data sources and functionality. Instead of building separate integrations for each AI application and external service, developers implement MCP once and gain compatibility across the entire ecosystem.
26
+
The MCP specification standardizes how AI tools interact with data sources and functionality.
27
+
Instead of building separate integrations for each AI application and external service, developers implement MCP once and gain compatibility across the entire ecosystem.
26
28
27
29
MCP uses a client-server architecture:
28
30
29
31
-**MCP Host**: The AI application that users interact with (IDEs like Cursor or Windsurf, chat applications like ChatGPT or Claude, AI agents)
30
32
-**MCP Client**: The connection component within the host that communicates with external services
31
33
-**MCP Server**: The external service being accessed (databases, APIs, cloud services)
32
34
33
-
Each MCP host must create and manage separate MCP client connections for each MCP server it communicates with. This architecture enables AI applications to access multiple data sources and tools simultaneously while maintaining clear separation between services.
35
+
Each MCP host must create and manage separate MCP client connections for each MCP server it communicates with.
36
+
This architecture enables AI applications to access multiple data sources and tools simultaneously while maintaining clear separation between services.
34
37
35
38
## Core Capabilities
36
39
37
40
MCP provides three primitives for extending LLM functionality:
38
41
39
42
### Resources
40
43
41
-
Resources inject information into the AI's context. This includes configuration data, documentation, company policies, product catalogs, or customer information. Resources enable AI models to work with accurate, current data without manual intervention.
44
+
Resources inject information into the AI's context.
45
+
This includes configuration data, documentation, company policies, product catalogs, or customer information.
46
+
Resources enable AI models to work with accurate, current data without manual intervention.
42
47
43
48
**Example use case**: When drafting a customer email, automatically provide the customer's order history, support ticket details, and account preferences so the AI can write personalized, contextually accurate responses.
44
49
45
50
### Tools
46
51
47
-
Tools enable AI models to trigger actions on behalf of users based on goals and information in the context. They allow AI to interact with external systems, automating tasks that would otherwise require manual execution across multiple applications.
52
+
Tools enable AI models to trigger actions on behalf of users based on goals and information in the context.
53
+
They allow AI to interact with external systems, automating tasks that would otherwise require manual execution across multiple applications.
48
54
49
55
**Example use case**: Create a new project in your task management system, assign team members, set deadlines, and generate initial task lists—all from a single conversation with the AI, without switching between applications.
50
56
51
57
### Prompts
52
58
53
-
Prompts provide tested, reusable instructions that guide AI behavior consistently. Instead of users needing to craft precise instructions each time, MCP servers can supply pre-configured prompts that have been refined for specific tasks or contexts.
59
+
Prompts provide tested, reusable instructions that guide AI behavior consistently.
60
+
Instead of users needing to craft precise instructions each time, MCP servers can supply pre-configured prompts that have been refined for specific tasks or contexts.
54
61
55
62
**Example use case**: When analyzing customer feedback, use a standardized prompt that ensures the AI always considers sentiment, key themes, and actionable insights in a consistent format across your team.
56
63
@@ -64,19 +71,25 @@ The MCP specification has evolved rapidly since its introduction, with three maj
The most recent versions have focused heavily on security and enterprise readiness, introducing mechanisms to authenticate users and clients while providing recommendations for authorizing resource access. The ability to implement granular access controls for resources is especially critical for enterprises integrating sensitive company and user data with MCP servers.
74
+
The most recent versions have focused heavily on security and enterprise readiness, introducing mechanisms to authenticate users and clients while providing recommendations for authorizing resource access.
75
+
The ability to implement granular access controls for resources is especially critical for enterprises integrating sensitive company and user data with MCP servers.
68
76
69
77
### Deployment Considerations
70
78
71
79
MCP servers can be deployed in two primary configurations, each with distinct authorization requirements:
72
80
73
81
#### Local MCP Servers
74
82
75
-
Local servers run as single instances on individual machines. These servers are assumed to be under the custodian of the user running them. Most MCP clients provide functionality that prompts users to approve tool invocations and resource access before execution. While this provides a basic security layer, it relies on user vigilance and awareness.
83
+
Local servers run as single instances on individual machines.
84
+
These servers are assumed to be under the custodian of the user running them.
85
+
Most MCP clients provide functionality that prompts users to approve tool invocations and resource access before execution.
86
+
While this provides a basic security layer, it relies on user vigilance and awareness.
76
87
77
88
#### Remote MCP Servers
78
89
79
-
Remote servers are hosted and accessed in multi-tenant environments, serving multiple users and organizations. These deployments require robust authentication and access control mechanisms for MCP resources. The MCP specification provides high-level guidance for authorization, but implementation details—including specific permission models and accurate enforcement—are the responsibility of MCP server developers.
90
+
Remote servers are hosted and accessed in multi-tenant environments, serving multiple users and organizations.
91
+
These deployments require robust authentication and access control mechanisms for MCP resources.
92
+
The MCP specification provides high-level guidance for authorization, but implementation details—including specific permission models and accurate enforcement—are the responsibility of MCP server developers.
80
93
81
94
### Security Risks: The Lethal Trifecta
82
95
@@ -86,7 +99,9 @@ Security researcher Simon Willison identified a [dangerous combination of capabi
86
99
2.**Exposure to untrusted content**: Any mechanism by which text or images controlled by a malicious attacker could become available to your LLM
87
100
3.**The ability to externally communicate**: Methods that could be used to exfiltrate your data
88
101
89
-
Implementing robust authorization in your MCP server can mitigate these risks within your service. However, once data from your MCP server is sent to the MCP host application and becomes part of the context, you lose control over access to that data. AI applications often have multiple MCP servers enabled simultaneously, and you cannot enforce permissions for actions taken on your data within other servers or the host application itself.
102
+
Implementing robust authorization in your MCP server can mitigate these risks within your service.
103
+
However, once data from your MCP server is sent to the MCP host application and becomes part of the context, you lose control over access to that data.
104
+
AI applications often have multiple MCP servers enabled simultaneously, and you cannot enforce permissions for actions taken on your data within other servers or the host application itself.
0 commit comments