Skip to content

Resources & Prompts

The CyberEco MCP server provides 22+ resources for reading documentation and schemas, plus 4 prompts that guide AI assistants through common workflows.


Resources

MCP resources are read-only data sources that AI assistants can access via URI. They require no Firestore connection -- all content is served from local files and in-memory schema definitions.

Documentation Resources

Access CyberEco architecture and strategic documents via the cybereco://docs/{name} URI pattern.

URI Source File Description
cybereco://docs/architecture docs/ARCHITECTURE.md Full technical design: StorageAdapter, DataLayerService, cache, permissions
cybereco://docs/vision docs/VISION.md Why CyberEco exists and the long-term roadmap
cybereco://docs/tenets docs/TENETS.md 7 engineering principles in priority order
cybereco://docs/constraints docs/CONSTRAINTS.md Boundaries and limitations
cybereco://docs/goals docs/GOALS.md Measurable success criteria
cybereco://docs/faq docs/FAQ.md Architecture and usage Q&A
cybereco://docs/tokenomics docs/TOKENOMICS.md CYE token economics, incentives, and governance
cybereco://docs/p2p-architecture docs/P2P_ARCHITECTURE.md TransportAdapter, mesh networking, CRDTs, multi-network
cybereco://docs/encrypted-computation docs/ENCRYPTED_COMPUTATION.md FHE, TEE, MPC integration for privacy-preserving computation
cybereco://docs/changelog-policy docs/CHANGELOG_POLICY.md Versioning and releases
cybereco://docs/press-release docs/PRESS_RELEASE.md Working-backwards press release
cybereco://docs/claude-md CLAUDE.md Project steering file with architecture overview and conventions

Total: 12 documentation resources

Example: Reading the architecture doc

URI: cybereco://docs/architecture

Returns the full Markdown contents of docs/ARCHITECTURE.md, which covers:

  • StorageAdapter interface design
  • DataLayerService orchestration pipeline
  • Cache strategy (stale-while-revalidate, TTL tiers)
  • Permission evaluation flow
  • Webhook and sync subsystems

Collection Schema Resources

Access TypeScript-style interface definitions for each collection via the cybereco://schema/{collection} URI pattern.

URI Collection Document Type
cybereco://schema/users users HubUser / SharedUserProfile
cybereco://schema/transactions transactions Transaction
cybereco://schema/groups groups SharedGroup
cybereco://schema/notifications notifications Notification
cybereco://schema/permissions permissions ResourcePermission
cybereco://schema/resourcePermissions resourcePermissions ResourcePermission
cybereco://schema/permissionLogs permissionLogs PermissionChangeLog
cybereco://schema/apps apps App
cybereco://schema/friendships friendships Friendship
cybereco://schema/webhookRegistrations webhookRegistrations WebhookRegistration
cybereco://schema/userPreferences userPreferences UserPreferences
cybereco://schema/dataSyncStatus dataSyncStatus DataSyncStatus

Total: 12 schema resources

Example: Reading the users schema

URI: cybereco://schema/users

Response:

/**
 * Central user records for the CyberEco ecosystem
 * Document type: HubUser / SharedUserProfile
 * Owner: Hub
 */
interface HubUser {
  /** User ID (matches Firebase Auth UID) */
  id: string;
  /** User email address */
  email: string;
  /** User display name */
  displayName: string;
  /** Profile photo URL */
  photoURL: string | null;
  /** List of app IDs user has access to */
  apps: string[];
  /** Per-app permission entries */
  permissions: AppPermission[];
  /** Global admin flag */
  isAdmin: boolean;
  /** Account creation date */
  createdAt: string (ISO 8601);
  /** Last login timestamp */
  lastLoginAt: string (ISO 8601);
}


Collection List Resource

URI Description
cybereco://collections Complete list of all collections with descriptions, field counts, and field names
Example: Reading the collection list

URI: cybereco://collections

Returns a JSON object where each key is a collection name and each value contains:

  • description -- What the collection stores
  • document_type -- The TypeScript interface name
  • owner -- Which part of the ecosystem owns this collection
  • field_count -- Number of top-level fields
  • fields -- Array of field names
{
  "users": {
    "description": "Central user records for the CyberEco ecosystem",
    "document_type": "HubUser / SharedUserProfile",
    "owner": "Hub",
    "field_count": 10,
    "fields": ["id", "email", "displayName", "photoURL", "apps", "permissions", "isAdmin", "preferences", "createdAt", "lastLoginAt"]
  },
  "transactions": {
    "description": "Cross-app financial records",
    "document_type": "Transaction",
    "owner": "Hub",
    "field_count": 10,
    "fields": ["id", "userId", "appId", "type", "amount", "currency", "description", "category", "date", "createdAt"]
  }
}

Prompts

MCP prompts are pre-built workflow templates that guide AI assistants through multi-step tasks. They generate structured instructions that the assistant follows, calling tools as needed.


integrate_new_app

Generate a step-by-step integration guide for adding a new application to the CyberEco ecosystem.

Parameters:

Name Type Required Description
app_name string Yes The name of the new application to integrate
app_description string No Optional description of what the app does

Workflow (10 steps):

  1. Install packages -- npm install @cyber-eco/types @cyber-eco/firebase @cyber-eco/auth @cyber-eco/services
  2. Configure Firebase -- Set up Firebase config with environment variables
  3. Initialize the data layer -- Create FirebaseStorageAdapter and call createDataLayer()
  4. Set up authentication -- Use @cyber-eco/auth hooks for React or SharedAuthState for SSO
  5. Register the app -- Add entry to the Hub's apps collection
  6. Request permissions -- Grant user access via dataLayer.permissions.grantAppAccess()
  7. Use domain services -- Access shared data, permissions, and notifications
  8. Handle app-specific data -- Choose between shared or isolated data storage
  9. Test with MockStorageAdapter -- Unit test without Firebase emulators
  10. Deploy and verify -- Confirm SSO flow and permission checks
Example usage
Prompt: integrate_new_app
Arguments:
  app_name: "Plantopia"
  app_description: "A community garden management app for tracking plants, harvests, and shared resources"

The AI assistant receives a detailed, customized guide and walks the developer through each step interactively.


explore_data_model

Guide through the CyberEco collection schema and relationships.

Parameters: None.

Workflow:

  1. List all collections using list_collections
  2. Walk through collection categories:
    • Core: users, apps, groups -- the identity and organization layer
    • Financial: transactions -- cross-app financial records
    • Permissions: permissions, resourcePermissions, permissionLogs -- the access control layer
    • Communication: notifications, friendships -- the social layer
    • System: webhookRegistrations, dataSyncStatus, userPreferences -- the infrastructure layer
  3. Deep-dive into individual collections with describe_collection
  4. Explain key concepts:
    • 4-tier role hierarchy: owner > admin > moderator > member
    • AppPermission model: per-app roles + features + conditions
    • StorageAdapter pattern: abstract data access interface
    • DataLayerService orchestration: permission -> cache -> adapter -> sync -> webhook pipeline

debug_data_issue

Interactive debugging workflow for diagnosing CyberEco data layer issues.

Parameters:

Name Type Required Description
user_id string No Optional user ID experiencing the issue
collection string No Optional collection name where the issue occurs
error_message string No Optional error message to investigate

Workflow (6 steps):

  1. Verify User State -- Fetch user record, check existence, admin status, app access
  2. Check Permissions -- Use check_permission to verify access; common issues: missing app access, no AppPermission entry, insufficient role
  3. Inspect Data -- Query the affected collection; check document existence, field types, ownership
  4. Check Data Relationships -- Verify referential integrity: group membership, transaction references, permission linkage
  5. Verify Collection Schema -- Compare actual data against expected schema from describe_collection
  6. Common Fixes -- Suggest remediation: missing permission creation, cache TTL info (users: 5min, permissions: 2min, notifications: 30s), collection name corrections
Example usage
Prompt: debug_data_issue
Arguments:
  user_id: "abc123"
  collection: "transactions"
  error_message: "Permission denied when querying transactions"

The AI assistant systematically checks user state, permissions, and data to diagnose the root cause.


debug_permission_denied

Diagnose why a user is getting permission denied errors for a specific app.

Parameters:

Name Type Required Default Description
user_id string Yes -- The user ID experiencing the denial
app_id string Yes -- The app ID they are trying to access
action string No "access" The specific action being denied

Workflow (6 steps):

  1. Fetch user record -- Check existence, verify app_id is in apps array, find AppPermission entry
  2. Check specific permission -- Use check_permission for the exact denied action
  3. Check role hierarchy -- Verify the user's role level meets the required level
  4. Check conditional access -- Examine conditions in AppPermission: time-based, IP-based, MFA requirements
  5. Check resource-level permissions -- Query resourcePermissions for specific overrides
  6. Common fixes -- Grant app access, upgrade role, fix expired conditions, create resource permissions
Example usage
Prompt: debug_permission_denied
Arguments:
  user_id: "xyz789"
  app_id: "justsplit"
  action: "admin"

The AI assistant performs a targeted diagnosis: fetching the user record, checking the role hierarchy, and suggesting the minimal fix (e.g., "add 'admin' to the user's roles array for the 'justsplit' AppPermission entry").


Resource URI Summary

Pattern Count Description
cybereco://docs/{name} 12 Architecture and strategic documentation
cybereco://schema/{collection} 12 TypeScript interface definitions
cybereco://collections 1 Complete collection index
Total 25