npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

gaff-gateway

v1.2.0

Published

GAFF Gateway - Single entry point to all GAFF MCP servers with unified tool access

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

  1. Single Connection: Connect once, access everything - 90% less configuration
  2. Simplified Setup: One server vs 9 separate configurations (5 lines vs 40+)
  3. Unified Namespace: All tools with clear prefixes (memory_, graph_, router_, etc.)
  4. High-Level Workflows: Single tool call for complete orchestration pipelines
  5. Out-of-the-Box: Includes official Anthropic MCP servers (memory, sandbox, thinking)
  6. Smart Routing: Automatically forwards calls to appropriate servers
  7. 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 build

Configuration

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 relations
  • memory_search_nodes - Search the knowledge graph
  • memory_read_graph - Read entire graph

🎯 Agent Orchestration

  • orchestration_generate_card - NL → Orchestration Card
  • orchestration_list_agents - List available agents

📊 Intent Graph Generation

  • graph_generate - Orchestration Card → Intent Graph
  • graph_visualize - Generate Mermaid diagrams

🔀 Router (Execution Engine)

  • router_execute_graph - Execute intent graphs
  • router_get_execution_status - Check async execution

✅ Quality Check

  • quality_validate_result - Validate execution quality

🛡️ Safety Protocols

  • safety_validate_compliance - GDPR, CCPA, SOC2 validation
  • safety_check_guardrails - PII detection, content safety

🛠️ Tools & Utilities

  • tools_human_in_the_loop - Request human approval
  • tools_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/a

Implementation 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:

  1. orchestration_generate_card - Parse NL to structured card
  2. safety_validate_compliance - Check compliance
  3. graph_generate - Create optimized execution graph
  4. router_execute_graph - Execute workflow
  5. quality_validate_result - Validate quality
  6. memory_create_entities - Store results

Development

Build

npm run build

Development Mode

npm run dev

Watch Mode

npm run watch

Test Tools List

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node build/index.js

Test Tool Call

echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"memory_search_nodes","arguments":{"query":"test"}}}' | node build/index.js

Included Servers

Official Anthropic Servers (via npx)

  1. @modelcontextprotocol/server-memory - Knowledge graph storage
  2. @modelcontextprotocol/server-sandbox - Safe code execution
  3. @modelcontextprotocol/server-sequential-thinking - Step-by-step reasoning

Published GAFF Servers (via npx)

  1. intent-graph-mcp-server - Intent graph generation

Local GAFF Servers (via node)

  1. agent-orchestration - Natural language → Orchestration cards
  2. router - Intent graph execution engine
  3. quality-check - Quality validation & rerun logic
  4. safety-protocols - Compliance & guardrails
  5. 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 build

Tools 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 build

Tool 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

Related Documentation