Skip to main content
Glama
external-ai-ecosystem-gateway

external-ai-ecosystem-gateway

by navadiashrey

External AI Ecosystem Gateway

A security-oriented Python gateway that exposes permission-scoped tools to MCP-compatible assistant clients while mediating access to external systems such as Slack. It demonstrates tenant isolation, delegated authorization, human confirmation for sensitive writes, idempotent execution, signed webhook verification, revocation-ready grant storage, and a hash-chained audit trail.

This is a portfolio/reference implementation, not a production identity provider. The header-based development auth adapter must be replaced by the OIDC validation middleware described in docs/security.md before deployment.

Architecture

Assistant / Slack client
          |
          v
  FastAPI edge + auth adapter
          |
          v
 Policy + tenant boundary ----> confirmation tokens
          |
          v
 Sandboxed tool registry -----> Slack / OpenAI / Claude adapters
          |
          +--------------------> idempotency store
          +--------------------> append-only hash-chained audit log

Related MCP server: mcp-app-server

Quick start

python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
uvicorn ecosystem_gateway.app:app --reload

List tools:

curl localhost:8000/mcp/tools \
  -H 'X-Subject: user-1' -H 'X-Tenant-Id: tenant-a' -H 'X-Roles: operator'

Run the test suite with pytest. When no Slack token is configured, connectors run in a safe sandbox mode and return the request they would issue.

Security properties

  • Every principal and idempotency key is tenant-namespaced.

  • Tool policies combine least-privilege roles with delegated scopes.

  • Sensitive writes require a short-lived token bound to subject, tenant, tool, and arguments.

  • Webhook signatures use constant-time comparison and reject stale requests.

  • Audit records form a SHA-256 chain so deletion or mutation is detectable.

  • OAuth grants support revocation and never expose refresh tokens through tool results.

See docs/security.md for the production hardening checklist and threat model.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to securely call enterprise MCP tools with tenant-scoped RBAC, human approvals, audit logging, and multi-tool workflows across customer, order, document, and ticket data.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables existing apps to expose their users and data to external AI agents via MCP with OAuth 2.1 authentication and scoped tools.
      51 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables production-hardened MCP tool serving with OAuth 2.1 audience-restricted tokens, purpose-bound tools, human-in-the-loop approvals, containment, and audit trails for AI agents.
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables teams to govern agent tool access with function-level allow-lists, credential modes, and audited execution, while exposing permitted MCP tools through a unified endpoint with search and execute functions.
      MIT