Connectors

Connectors parse raw HTTP requests into structured actions. Each connector knows the API schema for a specific service and maps HTTP method + URL path to an action type like github.pr.merge or stripe.charge.create.


Built-in connectors

GitHub

FieldValue
Domainsapi.github.com
Actions20+ (PRs, issues, branches, releases, files, repos, orgs, teams)
AuthAuthorization: token {PAT}
GitHub EnterpriseSupported - set custom base URL in connector config

Action types

ActionHTTPRisk
github.pr.createPOST /repos/{owner}/{repo}/pullslow
github.pr.mergePUT /repos/{owner}/{repo}/pulls/{number}/mergemedium
github.pr.updatePATCH /repos/{owner}/{repo}/pulls/{number}low
github.pr.closePATCH /repos/{owner}/{repo}/pulls/{number} (state=closed)low
github.pr.reviewPOST /repos/{owner}/{repo}/pulls/{number}/reviewslow
github.issue.createPOST /repos/{owner}/{repo}/issueslow
github.issue.updatePATCH /repos/{owner}/{repo}/issues/{number}low
github.issue.closePATCH /repos/{owner}/{repo}/issues/{number} (state=closed)low
github.branch.createPOST /repos/{owner}/{repo}/git/refslow
github.branch.deleteDELETE /repos/{owner}/{repo}/git/refs/{ref}high
github.release.createPOST /repos/{owner}/{repo}/releasesmedium
github.release.deleteDELETE /repos/{owner}/{repo}/releases/{id}high
github.file.createPUT /repos/{owner}/{repo}/contents/{path} (new)low
github.file.updatePUT /repos/{owner}/{repo}/contents/{path} (existing)low
github.file.deleteDELETE /repos/{owner}/{repo}/contents/{path}medium
github.repo.createPOST /user/repos or POST /orgs/{org}/reposmedium
github.repo.deleteDELETE /repos/{owner}/{repo}high
github.repo.updatePATCH /repos/{owner}/{repo}low
github.org.updatePATCH /orgs/{org}medium
github.team.createPOST /orgs/{org}/teamslow

GitHub Enterprise Server (GHE)

GitHub Enterprise is supported. When adding the GitHub connector in the dashboard gateway wizard, set the custom base URL to your GHE instance (e.g., https://github.yourcompany.com/api/v3). All action types work the same as with api.github.com.


OpenAI / Anthropic

FieldValue
Domainsapi.openai.com, api.anthropic.com
Actions24+ (chat, embeddings, images, audio, files, fine-tuning, models)
AuthAuthorization: Bearer {key} (OpenAI), x-api-key: {key} (Anthropic)
Azure OpenAINot yet supported - use the generic connector with Azure endpoints

Action types (OpenAI)

ActionHTTPRisk
openai.chat.createPOST /v1/chat/completionslow
openai.chat.create_streamPOST /v1/chat/completions (stream=true)low
openai.embedding.createPOST /v1/embeddingslow
openai.image.generatePOST /v1/images/generationsmedium
openai.image.editPOST /v1/images/editsmedium
openai.audio.transcribePOST /v1/audio/transcriptionslow
openai.audio.translatePOST /v1/audio/translationslow
openai.audio.speechPOST /v1/audio/speechlow
openai.file.uploadPOST /v1/filesmedium
openai.file.deleteDELETE /v1/files/{id}medium
openai.file.listGET /v1/fileslow
openai.finetune.createPOST /v1/fine_tuning/jobshigh
openai.finetune.cancelPOST /v1/fine_tuning/jobs/{id}/cancelmedium
openai.model.listGET /v1/modelslow
openai.model.deleteDELETE /v1/models/{id}high

Azure OpenAI workaround

Azure OpenAI uses different endpoints ({resource}.openai.azure.com). Use the generic connector in the dashboard wizard with the domain set to your Azure resource endpoint. Actions will be parsed as generic.post, generic.get, etc. For richer action types, a dedicated Azure OpenAI connector is planned.


Stripe

FieldValue
Domainsapi.stripe.com
Actions40+ (charges, refunds, payments, subscriptions, invoices, customers, transfers)
AuthAuthorization: Bearer {secret_key}

Action types (selection)

ActionHTTPRisk
stripe.charge.createPOST /v1/chargeshigh
stripe.charge.refundPOST /v1/refundshigh
stripe.customer.createPOST /v1/customerslow
stripe.customer.deleteDELETE /v1/customers/{id}medium
stripe.subscription.createPOST /v1/subscriptionsmedium
stripe.subscription.cancelDELETE /v1/subscriptions/{id}medium
stripe.invoice.createPOST /v1/invoicesmedium
stripe.invoice.payPOST /v1/invoices/{id}/payhigh
stripe.transfer.createPOST /v1/transfershigh
stripe.payout.createPOST /v1/payoutshigh
stripe.balance.retrieveGET /v1/balancelow

Slack

FieldValue
Domainsslack.com, api.slack.com
Actions35+ (messages, channels, files, users, admin, reactions)
AuthAuthorization: Bearer {bot_token}

Action types (selection)

ActionHTTPRisk
slack.message.postPOST /api/chat.postMessagelow
slack.message.updatePOST /api/chat.updatelow
slack.message.deletePOST /api/chat.deletemedium
slack.channel.createPOST /api/conversations.createmedium
slack.channel.archivePOST /api/conversations.archivemedium
slack.channel.invitePOST /api/conversations.invitelow
slack.file.uploadPOST /api/files.uploadmedium
slack.file.deletePOST /api/files.deletemedium
slack.user.listGET /api/users.listlow
slack.admin.invitePOST /api/admin.users.invitehigh

Generic HTTP

The generic connector works with any HTTP API. It parses actions based on HTTP method only.

FieldValue
DomainsAny (configured per-connector)
ActionsMethod-based: generic.get, generic.post, generic.put, generic.patch, generic.delete
AuthConfigurable header (default: Authorization: Bearer {token})

Adding a generic connector

Add a generic connector in the dashboard gateway wizard. Specify the target domain(s) and paste your API key. The default auth header is Authorization: Bearer {token}. You can configure a custom auth header (e.g., X-API-Key) in the connector settings.

Action counting

Each HTTP request through the generic connector counts as one action, regardless of the response. This is the same as structured connectors - one request = one action.

Semantic limitations

The generic connector cannot parse domain-specific action types. A POST to any endpoint is generic.post. For richer action types and risk hints, use a structured connector or build a custom one.


Webhook

The webhook connector sends HTTP requests to arbitrary endpoints. It's designed for outbound webhook integrations where your agent triggers external services.

FieldValue
DomainsAny (configured per-connector)
ActionsMethod-based: webhook.post, webhook.get, webhook.put, webhook.patch, webhook.delete
AuthConfigurable header (default: Authorization: Bearer {token})

Adding a webhook connector

Add a webhook connector in the dashboard gateway wizard. Specify the target domain(s) and paste your webhook secret or API key.


MCP (JSON-RPC tool calls)

The MCP connector parses JSON-RPC 2.0 tools/call messages into structured actions, giving you per-tool permissions and risk scoring for MCP (Model Context Protocol) traffic.

FieldValue
DomainsAny MCP server hostname (configured per-connector)
Actionsmcp.tools.<tool_name> for tool calls, mcp.tools.list for discovery, mcp.rpc.<method> for other JSON-RPC methods
AuthConfigurable (default: Authorization: Bearer {token})
TransportStreamable HTTP only (stdio not supported)

Action types

JSON-RPC methodTameFlare actionRisk
tools/call (name: create_issue)mcp.tools.create_issuemedium
tools/call (name: delete_repo)mcp.tools.delete_repohigh
tools/call (name: read_file)mcp.tools.read_filelow
tools/listmcp.tools.listlow
initializemcp.rpc.initializelow

Risk is scored by tool name heuristics: names containing delete/execute/deploy = high, create/write/send = medium, read/get/list = low.

Adding an MCP connector

Add an MCP connector in the dashboard gateway wizard. Specify the MCP server hostname and paste your auth token.

Per-tool permissions

Set permissions in the dashboard gateway wizard access rules step. Use custom patterns to control individual tools:

  • mcp.tools.* - allow all tool calls
  • mcp.tools.read_* - allow read-only tools
  • mcp.tools.delete_* - block destructive tools

For full MCP documentation including risk scoring, permission patterns, and examples, see MCP Connector.


Custom connector development

You can build custom connectors in Go to add domain-specific action parsing for APIs that don't have a built-in connector.

Connector interface

Every connector implements this Go interface:

// internal/connectors/interface.go
type Connector interface {
    // Name returns the connector identifier (e.g., "github", "stripe")
    Name() string
 
    // Domains returns the list of domains this connector handles
    Domains() []string
 
    // ParseAction parses an HTTP request into a structured action
    ParseAction(req *http.Request) (*Action, error)
 
    // InjectCredentials adds authentication to the outbound request
    InjectCredentials(req *http.Request, cred *Credential) error
}
 
type Action struct {
    Type        string            // e.g., "github.pr.merge"
    Resource    Resource
    Parameters  map[string]any
    RiskHints   map[string]any
}

Example: Custom Jira connector

package jira
 
import (
    "net/http"
    "strings"
 
    "github.com/tameflare/tameflare/apps/gateway-v2/internal/connectors"
)
 
type JiraConnector struct{}
 
func (c *JiraConnector) Name() string {
    return "jira"
}
 
func (c *JiraConnector) Domains() []string {
    return []string{"your-org.atlassian.net"}
}
 
func (c *JiraConnector) ParseAction(req *http.Request) (*connectors.Action, error) {
    path := req.URL.Path
    method := req.Method
 
    var actionType string
    switch {
    case method == "POST" && strings.Contains(path, "/rest/api/3/issue"):
        actionType = "jira.issue.create"
    case method == "PUT" && strings.Contains(path, "/rest/api/3/issue"):
        actionType = "jira.issue.update"
    case method == "DELETE" && strings.Contains(path, "/rest/api/3/issue"):
        actionType = "jira.issue.delete"
    case method == "POST" && strings.Contains(path, "/rest/api/3/issue") && strings.Contains(path, "/transitions"):
        actionType = "jira.issue.transition"
    default:
        actionType = "jira." + strings.ToLower(method)
    }
 
    return &connectors.Action{
        Type: actionType,
        Resource: connectors.Resource{
            Provider: "jira",
        },
        RiskHints: map[string]any{
            "irreversible": method == "DELETE",
        },
    }, nil
}
 
func (c *JiraConnector) InjectCredentials(req *http.Request, cred *connectors.Credential) error {
    req.Header.Set("Authorization", "Basic "+cred.Token)
    return nil
}

Registering a custom connector

Add your connector to the registry in internal/connectors/registry.go:

func NewRegistry() *Registry {
    r := &Registry{connectors: make(map[string]Connector)}
    r.Register(&github.GitHubConnector{})
    r.Register(&openai.OpenAIConnector{})
    r.Register(&stripe.StripeConnector{})
    r.Register(&slack.SlackConnector{})
    r.Register(&generic.GenericConnector{})
    r.Register(&jira.JiraConnector{})  // Your custom connector
    return r
}

Rebuild the gateway after adding a connector:

cd apps/gateway-v2 && go build -o gateway ./cmd/gateway

Next steps