gaff-gateway
v1.2.0
Published
GAFF Gateway - Single entry point to all GAFF MCP servers with unified tool access
Maintainers
Readme
GAFF Gateway
⭐ The Recommended Way to Use GAFF
Single Entry Point to All GAFF MCP Servers
The GAFF Gateway provides unified access to all GAFF MCP servers through a single connection, aggregating 17+ tools from 9 different servers. This is the easiest and recommended approach for using the GAFF framework.
Status: ✅ Production-Ready
Version: 1.0.0
Part of: GAFF Framework
Confluence: gaff-gateway Documentation
Why Use the Gateway?
Benefits
- Single Connection: Connect once, access everything - 90% less configuration
- Simplified Setup: One server vs 9 separate configurations (5 lines vs 40+)
- Unified Namespace: All tools with clear prefixes (memory_, graph_, router_, etc.)
- High-Level Workflows: Single tool call for complete orchestration pipelines
- Out-of-the-Box: Includes official Anthropic MCP servers (memory, sandbox, thinking)
- Smart Routing: Automatically forwards calls to appropriate servers
- Production Ready: Built for enterprise reliability and scale
What You Get
9 MCP Servers Unified:
- ✅ agent-orchestration (5 tools) - NL → Orchestration cards
- ✅ safety-protocols (6 tools) - Compliance & guardrails
- ✅ intent-graph-generator (7 tools) - Cards → Intent graphs
- ✅ router (7 tools) - Intent graph execution
- ✅ quality-check (6 tools) - Result validation
- ✅ memory (9 tools) - Knowledge graph (official MCP)
- ✅ sandbox (1 tool) - Code execution (official MCP)
- ✅ sequential-thinking (1 tool) - Reasoning (official MCP)
- ✅ tools (7 tools) - Utilities & HITL
Total: 17+ tools accessible through one connection
Quick Start
Installation
cd gaff/mcp/gaff-gateway
npm install
npm run buildConfiguration
Cursor (C:\Users\YourName\.cursor\mcp.json):
{
"mcpServers": {
"gaff-gateway": {
"command": "node",
"args": ["C:/Users/seanp/projects/gaff/mcp/gaff-gateway/build/index.js"]
}
}
}Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"gaff-gateway": {
"command": "node",
"args": ["C:/Users/seanp/projects/gaff/mcp/gaff-gateway/build/index.js"]
}
}
}Usage
Once connected, you have access to all 17 tools:
// High-level end-to-end workflow
gaff_create_and_execute_workflow({
query: "Process customer orders and send notifications"
})
// Memory operations
memory_create_entities(...)
memory_search_nodes(...)
// Orchestration
orchestration_generate_card(...)
// Intent graph generation
graph_generate(...)
graph_visualize(...)
// Execution
router_execute_graph(...)
// Quality & Safety
quality_validate_result(...)
safety_validate_compliance(...)
// Utilities
tools_human_in_the_loop(...)
tools_format_data(...)
// Code execution
sandbox_execute_code({
language: "python",
code: "print('Hello from GAFF!')"
})
// Reasoning
thinking_sequential({
thought: "Breaking down this complex problem...",
thoughtNumber: 1,
totalThoughts: 5,
nextThoughtNeeded: true
})Available Tools (17+)
🚀 High-Level Workflows
gaff_create_and_execute_workflow- End-to-end: NL → Orchestration → Graph → Execution → Quality Check
🧠 Memory (Knowledge Graph)
memory_create_entities- Create entities and relationsmemory_search_nodes- Search the knowledge graphmemory_read_graph- Read entire graph
🎯 Agent Orchestration
orchestration_generate_card- NL → Orchestration Cardorchestration_list_agents- List available agents
📊 Intent Graph Generation
graph_generate- Orchestration Card → Intent Graphgraph_visualize- Generate Mermaid diagrams
🔀 Router (Execution Engine)
router_execute_graph- Execute intent graphsrouter_get_execution_status- Check async execution
✅ Quality Check
quality_validate_result- Validate execution quality
🛡️ Safety Protocols
safety_validate_compliance- GDPR, CCPA, SOC2 validationsafety_check_guardrails- PII detection, content safety
🛠️ Tools & Utilities
tools_human_in_the_loop- Request human approvaltools_format_data- Data format conversion
🔒 Sandbox (Code Execution)
sandbox_execute_code- Execute Python/JavaScript/Shell safely
🧠 Sequential Thinking (Reasoning)
thinking_sequential- Step-by-step transparent reasoning
Architecture
Server Routing
The gateway uses intelligent routing to forward tool calls to the appropriate server:
Tool Name → Server → Command
─────────────────────────────────────────────────────────────────
memory_* → @modelcontextprotocol/ → npx
server-memory
sandbox_* → @modelcontextprotocol/ → npx
server-sandbox
thinking_* → @modelcontextprotocol/ → npx
server-sequential-thinking
graph_* → intent-graph-mcp-server → npx (published)
orchestration_* → agent-orchestration → node (local)
router_* → router → node (local)
quality_* → quality-check → node (local)
safety_* → safety-protocols → node (local)
tools_* → tools → node (local)
gaff_* → gateway itself (composed) → n/aImplementation Status
✅ Phase 1: Tool Aggregation (COMPLETE)
- All 17 tools from 9 servers exposed
- Clear prefix-based organization
- Comprehensive input schemas
✅ Phase 2A: Server Routing Logic (COMPLETE)
- Prefix → server mapping
- Configuration management
- Routing simulation
⏳ Phase 2B: Server Communication (NEXT)
- Spawn child MCP processes
- JSON-RPC stdio communication
- Response aggregation
End-to-End Workflow Example
The gateway's main feature is the ability to compose an entire GAFF workflow in a single tool call:
await gaff_create_and_execute_workflow({
query: "Analyze customer sentiment from support tickets and generate monthly report",
options: {
validate_safety: true, // Run compliance checks
optimize_graph: true, // Optimize execution plan
quality_check: true, // Validate output quality
store_in_memory: true, // Cache results
execution_mode: "sync" // Wait for completion
}
});This single call orchestrates:
- ✅
orchestration_generate_card- Parse NL to structured card - ✅
safety_validate_compliance- Check compliance - ✅
graph_generate- Create optimized execution graph - ✅
router_execute_graph- Execute workflow - ✅
quality_validate_result- Validate quality - ✅
memory_create_entities- Store results
Development
Build
npm run buildDevelopment Mode
npm run devWatch Mode
npm run watchTest Tools List
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node build/index.jsTest Tool Call
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"memory_search_nodes","arguments":{"query":"test"}}}' | node build/index.jsIncluded Servers
Official Anthropic Servers (via npx)
- @modelcontextprotocol/server-memory - Knowledge graph storage
- @modelcontextprotocol/server-sandbox - Safe code execution
- @modelcontextprotocol/server-sequential-thinking - Step-by-step reasoning
Published GAFF Servers (via npx)
- intent-graph-mcp-server - Intent graph generation
Local GAFF Servers (via node)
- agent-orchestration - Natural language → Orchestration cards
- router - Intent graph execution engine
- quality-check - Quality validation & rerun logic
- safety-protocols - Compliance & guardrails
- tools - Utilities & HITL
Configuration
Environment Variables
GAFF_CONFIG_PATH- Path to gaff.json (default:../../../gaff.json)
gaff.json Integration
The gateway automatically loads gaff.json for:
- Available agents and their capabilities
- MCP server configurations
- Tool mappings
- Compliance requirements
Troubleshooting
Gateway Won't Start
Error: Cannot find gaff.json
# Set custom path
export GAFF_CONFIG_PATH="/path/to/gaff.json"Error: Module not found
# Rebuild
cd gaff/mcp/gaff-gateway
npm install
npm run buildTools Not Showing
Check that all required servers are properly installed:
# Official servers (should work via npx)
npx -y @modelcontextprotocol/server-memory
npx -y @modelcontextprotocol/server-sandbox
npx -y @modelcontextprotocol/server-sequential-thinking
# Published GAFF server
npx -y [email protected]
# Local GAFF servers
cd gaff/mcp/agent-orchestration && npm run build
cd gaff/mcp/router && npm run build
cd gaff/mcp/quality-check && npm run build
cd gaff/mcp/safety-protocols && npm run build
cd gaff/mcp/tools && npm run buildTool Calls Failing
Currently, Phase 2B (actual server communication) returns simulated responses showing the routing logic. Full implementation coming soon.
Comparison: Gateway vs Individual Servers
With Gateway (Recommended)
{
"mcpServers": {
"gaff-gateway": {
"command": "node",
"args": ["C:/path/to/gaff/mcp/gaff-gateway/build/index.js"]
}
}
}- ✅ Single connection
- ✅ 17+ tools available
- ✅ Simplified config
- ✅ High-level workflows
Without Gateway (Manual)
{
"mcpServers": {
"memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] },
"sandbox": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-sandbox"] },
"thinking": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"] },
"intent-graph": { "command": "npx", "args": ["-y", "[email protected]"] },
"orchestration": { "command": "node", "args": ["C:/path/to/gaff/mcp/agent-orchestration/build/index.js"] },
"router": { "command": "node", "args": ["C:/path/to/gaff/mcp/router/build/index.js"] },
"quality": { "command": "node", "args": ["C:/path/to/gaff/mcp/quality-check/build/index.js"] },
"safety": { "command": "node", "args": ["C:/path/to/gaff/mcp/safety-protocols/build/index.js"] },
"tools": { "command": "node", "args": ["C:/path/to/gaff/mcp/tools/build/index.js"] }
}
}- ❌ 9 separate connections
- ❌ Complex configuration
- ❌ Manual workflow composition
- ✅ Direct server access
Roadmap
v1.0 (Current)
- ✅ Tool aggregation from all servers
- ✅ Prefix-based routing logic
- ✅ Simulated server communication
- ✅ Official Anthropic servers included
v1.1 (Next)
- ⏳ Full server-to-server communication
- ⏳ Persistent server connections
- ⏳ Connection pooling
- ⏳ Error recovery & retries
v1.2 (Future)
- ⏳ Caching & optimization
- ⏳ Metrics & monitoring
- ⏳ Load balancing
- ⏳ Hot reload of servers
v2.0 (Vision)
- ⏳ Visual workflow builder
- ⏳ Distributed execution
- ⏳ Plugin system
- ⏳ Cloud deployment
License
MIT - See LICENSE file in repository root
Author
Sean Poyner [email protected]
Repository
https://github.com/seanpoyner/gaff
