What Are Restrictions?
Restrictions are security rules that limit what an MCP server can access. Think of them as a firewall for your AI assistant - they define:- Which platforms (connectors) the AI can use
- Which actions the AI can perform on each platform
- Which users can access the server
How Restrictions Work
When you create an MCP server with restrictions, the system filters responses at multiple levels: The restriction system works in layers:- Connector Discovery - When the AI lists available connectors, it only sees the ones you allowed
- Action Discovery - When exploring a connector’s capabilities, it only sees permitted actions
- Action Execution - Attempts to use blocked actions are rejected with an error
- Credential Management - Can only create/view credentials for allowed connectors
Why Use Restrictions?
Security & Compliance
- Data Protection: Ensure AI only accesses approved systems
- Compliance: Meet regulatory requirements by limiting data access
Business Logic
- Department Isolation: Sales team only sees CRM tools, Marketing only sees email tools
- Read-Only Access: Allow viewing data but prevent modifications
- Staged Rollouts: Test AI with limited access before full deployment
Error Prevention
- No Accidents: Can’t accidentally delete data if delete actions are blocked
- Clear Boundaries: AI knows exactly what it can and cannot do
- User Safety: Prevent costly mistakes before they happen
Visualizing the Impact
Without Restrictions - AI Sees Everything:
With Restrictions - AI Sees Only What You Allow:
Quick Examples
Example 1: Slack Read-Only
“Only allow reading user information from Slack”Example 2: Multi-Platform with Specific Actions
“Different permissions for each platform”How Restrictions Work
Understanding the Restrictions Structure
The JSON Structure
Key Components Explained
permissions
Array
Contains rules for each connector you want to allow. If a connector isn’t listed here, the AI cannot access it at all.
connector
Field
The ID of the platform (e.g., “slack”, “notion”, “hubspot”). Get these IDs from the list connectors endpoint.
mode
Field
Always set to "allow"
. This explicitly grants access to the specified connector and actions.
actions
Array
Lists the specific actions allowed for this connector:
- Specific actions:
["users_list", "users_info"]
- Only these actions allowed - All actions:
["*"]
- All actions for this connector allowed - Empty array:
[]
- No actions allowed (connector visible but unusable)
How the Filtering Works
When restrictions are applied, the system:- Hides unlisted connectors - If not in permissions, connector doesn’t exist for the AI
- Filters action lists - Only shows actions you specified in the actions array
- Blocks unauthorized attempts - Returns errors if AI tries blocked actions
- Restricts credential creation - Can only create credentials for allowed connectors
2. User Restrictions
Control who can access the server. You can manage your users with these endpoints. Allowlist specific users:Common Slack Actions Reference
When restricting Slack, here are the available actions:chat_postMessage
- Send messagesconversations_create
- Create channelsconversations_invite
- Invite users to channelsconversations_list
- List channelsusers_conversations
- List user’s channelsusers_info
- Get user informationusers_list
- List all users
Implementation Examples
Creating a Restricted Server with Fine-Grained Permissions
Read-Only Server Example
Updating Restrictions
How Restrictions Work
Multi-Level Filtering
The restriction system now applies filters at multiple points:- list_connectors_alloy - Returns only allowed connectors
- get_connector_resources_alloy - Returns only allowed actions per connector
- get_action_details_alloy - Blocks access to restricted action details
- execute_action_alloy - Prevents execution of restricted actions
- create_credential_alloy - Blocks credential creation for restricted connectors
Best Practices
1. Start Restrictive
Begin with maximum restrictions and loosen as needed:2. Test Before Production
Always test restrictions in a development environment:3. Document Your Restrictions
Keep a record of why each restriction exists in your internal documentation.Troubleshooting
”Access Denied” Errors
Error:Access denied: connector 'hubspot' is restricted
Solution: Check your restrictions: