Model Context Protocol server for SpiceDB permission and relationship management
The SpiceDB MCP server provides 5 tools with generally good descriptions and clear use cases. However, there are significant structural issues: input schemas lack proper type definitions and are missing optional field markers in several cases; parameter descriptions are present but vary in completeness; error handling is basic (try-catch with error text returned as string); and the tool outputs are unstructured strings rather than typed JSON objects. The server demonstrates functional domain knowledge (authorization, permission checking) but falls short of production-grade composition patterns. Naming is clear and action-oriented (GetSchema, LookupResources, LookupSubjects, ReadRelationships, CheckPermissions), but output formatting and error guidance are weak.
Check multiple permissions at once in SpiceDB. Accepts a semicolon-separated list of permission checks in the format 'resourceType:resourceId:permission:subjectType:subjectId'. IMPORTANT: Favor this over multiple calls.
Get the SpiceDB schema in use. When in doubt, use this first to get an overview over the existing model to make other calls.
Look up resources with permission on a resource in SpiceDB. Answers questions like 'On what <resourcetype> does <subject:id> have specific <permission>? e.g. On what projects does user:CTO have admin permissions?'
Look up subjects with permission on a resource in SpiceDB. Answers questions like 'Who has permission on resource <x>?' e.g. 'What users can read document a?'
Read relationships in SpiceDB. All parameters are optional except resourceType. <IMPORTANT> You must use LookupSubjects or LookupResources instead of ReadRelationships to compute access permissions. Do NOT use this to compute access permissions, as it does not return the computed permissions. It returns only direct relations. ReadRelationships should only be used for exploring questions like 'what users are there?' or 'What documents are there?'. Answer example: 'Relationships for <type>:id>: <type>:<id> has <relation> relationship with <type>:<id>, e.g. Relationships for project:bigproject: project:bigproject has administrator relationship with user:CTO </IMPORTANT>
Unstructured output: All 5 tools return plain strings rather than typed JSON objects. This forces LLMs to parse free-text responses, which is error-prone and wastes tokens. GetSchema returns raw schema text; LookupResources/LookupSubjects return line-delimited strings without field structure; ReadRelationships returns narrative text; CheckPermissions description states it accepts 'semicolon-separated' input but returns format is undocumented.
Missing output schema documentation: None of the 5 tools have documented return types in their definitions. LLMs cannot plan downstream tool calls or extract the right data when output structure is unknown.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Incomplete input schemas: Input schemas present parameter descriptions (good) but lack proper JSON Schema type declarations. GetSchema has empty schema {}; CheckPermissions has single string param but no nested type info; ReadRelationships marks optional params in description text rather than JSON Schema optional/required fields.
Error handling returns narrative text, not structured errors: RpcExceptions and generic exceptions are caught and returned as plain strings (e.g., 'Error looking up Schema: {ex.Message}'). This gives LLMs no classification (retryable vs fatal) and no guidance on what to try next.
No pagination or result limiting: LookupResources and LookupSubjects stream all results into memory without caps. If a subject has permissions on thousands of resources, the response could be enormous, exhausting context and token budgets.
CheckPermissions description is vague about output: The tool 'accepts a semicolon-separated list' of checks and should be favored 'over multiple calls', but there is no specification of what the response contains, one result per check? A summary? The calling LLM must guess how to parse the output.
ReadRelationships has conflicting guidance embedded in description: The description is a 400+ character wall of text with embedded <IMPORTANT> tags telling the LLM NOT to use this tool for permissions, to use LookupSubjects/LookupResources instead, and includes an example answer. This is domain guidance that should be in a separate retrieval-augmented prompt, not in the tool definition. It also violates the rubric against example values in descriptions (LLMs latch onto 'project:bigproject' and 'user:CTO').