TL;DR: Use Hierarchical Router for AI agents like Claude Desktop or Cursor. Use Direct MCP Endpoint for custom applications or when your agent needs to connect to just one specific server.
The Two Connection Methods
Method 1: Hierarchical Router (Token-Saving)
What it is: A smart connection that saves your AI’s “thinking space” (context window) by exposing only 2 tools instead of hundreds. URL Format:- Use OAuth2 login (browser-based)
- AI sees 2 simple tools: “discover” and “execute”
- AI can search through ALL your MCP servers
- Saves up to 98% of context window space
Method 2: Direct MCP Endpoint (Per-Server)
What it is: A direct connection to ONE specific MCP server, showing all its tools immediately. URL Format:- Use a simple token (copy-paste from dashboard)
- AI sees ALL tools from that one server right away
- No search needed - everything is visible
- Works with standard MCP clients
Which One Should I Use?
Use Hierarchical Router
For AI Agents with Many Servers✅ Claude Desktop✅ Cursor IDE✅ VS Code with MCP✅ You have 5+ MCP servers✅ AI needs access to multiple servers✅ You want to save context window space
Use Direct MCP Endpoint
For Single-Server Connections✅ Custom automation scripts✅ CLI tools you’re building✅ Workflow automation (n8n, Zapier, Make.com)✅ No-code/low-code platforms✅ AI only needs ONE server✅ You want simple token auth✅ No OAuth complexity needed✅ Standard MCP client compatibility
The Context Window Problem (Why This Matters)
What is a Context Window?
Think of your AI agent’s “context window” as its working memory - like RAM in a computer. It’s limited space where the AI keeps:- Your conversation history
- Instructions you gave it
- Tool definitions (what tools can do)
- Everything it needs to help you
How Hierarchical Router Solves This
Instead of loading 200 tool definitions (huge!), the AI only sees 2 tools:- discover_mcp_tools - Search for tools
- execute_mcp_tool - Run a tool
When Direct Endpoint Makes Sense
If your AI only connects to ONE server (not 20), there’s no context window problem:- 1 server with 10 tools = only 5% of context used
- No need for the search pattern
- Direct access is simpler and faster
Real-World Examples
Example 1: Claude Desktop User with Multiple Servers
Scenario: You have these MCP servers installed:- GitHub (create issues, read repos)
- PostgreSQL (query databases)
- Figma (fetch designs)
- Slack (send messages)
- Sequential Thinking (reasoning)
Example 2: n8n Workflow Automation
Scenario: You’re building an n8n workflow that:- Monitors GitHub webhooks
- Creates Slack notifications
- Queries PostgreSQL database
- Needs access to 3 separate MCP servers
-
HTTP Request Node (GitHub MCP)
-
HTTP Request Node (Slack MCP)
-
HTTP Request Node (PostgreSQL MCP)
- n8n/Zapier/Make.com work with HTTP webhooks, not OAuth flows
- Each workflow step is independent (no shared context)
- Direct endpoints are simpler to configure in visual workflow builders
- No context window concerns (workflows don’t use AI agents)
Example 3: Custom Automation Script for GitHub
Scenario: You’re building a Node.js script that:- Monitors GitHub repositories
- Creates issues automatically
- Only needs GitHub MCP server
Example 4: Cursor IDE Developer
Scenario: Using Cursor IDE for coding with:- Sequential Thinking MCP
- Filesystem MCP
- Context7 documentation MCP
- PostgreSQL MCP
- Cursor can ask: “search for database tools”
- Gets back: postgres:run_query
- Executes it without loading 50+ other tools
Feature Comparison
| Feature | Hierarchical Router | Direct MCP Endpoint |
|---|---|---|
| Authentication | OAuth2 (browser login) | Simple token (copy-paste) |
| Access Scope | All your MCP servers | One specific server |
| Tools Visible | 2 meta-tools (discover + execute) | All tools from that server |
| Context Usage | < 1% (saves tokens!) | 5-10% per server |
| Best For | AI agents with many servers | Custom apps, single server |
| Search Needed | Yes (discover first, then execute) | No (tools listed immediately) |
| Setup Complexity | Medium (OAuth setup) | Low (just paste token) |
How to Get Started
Setting Up Hierarchical Router
Configure OAuth2
Set up OAuth2 authentication in your AI agent’s settings with your DeployStack credentials.
Setting Up Direct MCP Endpoint
Find Your Instance
Go to DeployStack dashboard → Your MCP ServersFind the specific server you want to connect to.
Copy Instance URL and Token
Click on the server to see its details:
- Instance Path:
bold-penguin-42a3 - Instance Token:
ds_inst_abc123...(copy this!)
Common Questions
Can I use both methods at the same time?
Yes! You can use:- Hierarchical router for Claude Desktop (access to all servers)
- Direct endpoint for a custom script (access to one server)
Which one is faster?
Direct endpoint is slightly faster for single-server scenarios (no search step). Hierarchical router is faster overall when you need multiple servers (no need to connect to each one separately).Do I need different tokens?
Yes:- Hierarchical Router: Uses your DeployStack user OAuth2 token (automatic login)
- Direct Endpoint: Uses instance-specific token (shown in dashboard, copy once)
What if I’m not sure which to use?
Rule of thumb:- AI agent with multiple servers? → Use Hierarchical Router
- Workflow automation (n8n, Zapier, Make)? → Use Direct MCP Endpoint
- Claude Desktop or Cursor? → Use Hierarchical Router
- Custom script or app? → Use Direct MCP Endpoint
- No-code platform integration? → Use Direct MCP Endpoint
Security Notes
Token Security:- Hierarchical router: OAuth2 tokens are short-lived and auto-refreshed
- Direct endpoint: Instance tokens are long-lived (manual rotation)
Summary: Quick Decision Guide
Need Help?
- 📚 Technical Docs: See Hierarchical Router or Instance Router for developer details
- 💬 Discord: Join our community for help
- 🐛 Issues: Report bugs on GitHub
Related Documentation
- MCP Server Installation - How to install MCP servers
- Team Management - Managing team access
- Quick Start Guide - Getting started with DeployStack
- Architecture Overview - How DeployStack works

