Skip to main content

Overview

Agentflare is a hosted proxy service - there’s no software to install. Instead, you’ll:
  1. Create an Agentflare account
  2. Add your tool servers via the dashboard
  3. Get proxy URLs for each server
  4. Configure your AI agents to use the proxy

Prerequisites

Before getting started, ensure you have:

Tool Server

An MCP-compatible tool server to observe

AI Agent

An AI agent or MCP client

Network Access

Outbound HTTPS access (port 443)

Modern Browser

For accessing the Agentflare dashboard

Step 1: Create Your Account

1

Sign Up

Navigate to app.agentflare.com and create an account
2

Verify Email

Check your email and verify your account
3

Create Workspace

Set up your first workspace (e.g., “Production”, “Development”)
4

Choose Plan

Select a plan that fits your needs (Free tier available)

Step 2: Get Your API Key

1

Navigate to API Keys

Go to Dashboard → Settings → API Keys
2

Create New Key

Click “Create API Key” and give it a descriptive name
3

Copy the Key

Save the API key securely - you won’t be able to see it again
4

Set Environment Variable

Add the key to your environment:
export AGENTFLARE_API_KEY="your_api_key_here"
Never commit API keys to version control. Always use environment variables or secure secret management.

Step 3: Add Your Tool Server

Navigate to Dashboard → Tool Servers → Add Server and configure your tool server:
  • HTTP/HTTPS Server
  • WebSocket Server
  • Stdio Server
For HTTP/HTTPS based MCP servers:
{
  "name": "search-server",
  "description": "Search and retrieval tools",
  "type": "http",
  "endpoint": "https://your-server.com/mcp",
  "authentication": {
    "type": "bearer",
    "token": "your-server-token"
  },
  "timeout": 30000
}
  • Bearer Token: {"type": "bearer", "token": "..."}
  • API Key: {"type": "api_key", "key": "...", "header": "X-API-Key"}
  • Basic Auth: {"type": "basic", "username": "...", "password": "..."}
  • OAuth2: {"type": "oauth2", "client_id": "...", "client_secret": "..."}

Step 4: Get Your Proxy URL

After adding your tool server, Agentflare generates a unique proxy URL:
https://proxy.agentflare.com/<workspace-slug>/<server-slug>
Example:
https://proxy.agentflare.com/acme-corp/search-server
Copy this URL - you’ll use it to configure your AI agents.

Step 5: Configure Your Agent

Update your AI agent or MCP client to use the Agentflare proxy:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { HTTPTransport } from "@modelcontextprotocol/sdk/client/http.js";

const client = new Client({
  transport: new HTTPTransport({
    baseUrl: process.env.AGENTFLARE_PROXY_URL,
    headers: {
      "Authorization": `Bearer ${process.env.AGENTFLARE_API_KEY}`
    }
  })
});

await client.connect();

Environment Configuration

Development Environment

Create a .env file in your project root:
.env
# Agentflare Configuration
AGENTFLARE_API_KEY=your_api_key_here
AGENTFLARE_PROXY_URL=https://proxy.agentflare.com/your-workspace/your-server

# Optional: Enable debug logging
AGENTFLARE_DEBUG=true

Production Environment

For production, use your environment’s secret management:
  • Docker
  • Kubernetes
  • AWS Lambda
FROM node:18-alpine

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm ci --only=production

# Copy application
COPY . .

# Environment variables passed at runtime
ENV NODE_ENV=production

CMD ["node", "index.js"]
docker run \
  -e AGENTFLARE_API_KEY="your_key" \
  -e AGENTFLARE_PROXY_URL="your_proxy_url" \
  your-agent-image

Verification

Verify your setup is working:
1

Check Connection

Make a test tool call from your agent
2

View Dashboard

Navigate to app.agentflare.com and check the live feed
3

Verify Data

Confirm you see your tool call with timing and metadata

Test Script

Use this script to verify your setup:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { HTTPTransport } from "@modelcontextprotocol/sdk/client/http.js";

async function testConnection() {
  const client = new Client({
    transport: new HTTPTransport({
      baseUrl: process.env.AGENTFLARE_PROXY_URL,
      headers: {
        "Authorization": `Bearer ${process.env.AGENTFLARE_API_KEY}`
      }
    })
  });

  try {
    await client.connect();
    console.log("✅ Connected to Agentflare proxy");

    const tools = await client.listTools();
    console.log("✅ Available tools:", tools);

    console.log("\nCheck your Agentflare dashboard to see this connection!");
  } catch (error) {
    console.error("❌ Connection failed:", error);
  }
}

testConnection();

Troubleshooting

Symptoms: Getting “Unauthorized” errorsSolutions:
  • Verify API key is correct and not expired
  • Check the Authorization header format: Bearer YOUR_KEY
  • Ensure environment variables are properly loaded
  • Confirm API key has necessary permissions
Symptoms: Requests timing out or failing to connectSolutions:
  • Check network connectivity and firewall rules
  • Verify proxy URL is correct
  • Ensure tool server is running and accessible
  • Check Agentflare status page for outages
Symptoms: “Server not found” errorsSolutions:
  • Verify the server-slug in your proxy URL
  • Check server is enabled in dashboard
  • Confirm workspace-slug is correct
  • Ensure server configuration is complete
Symptoms: Tool calls work but don’t show in dashboardSolutions:
  • Verify proxy URL is being used (not direct connection)
  • Check API key is included in requests
  • Look for errors in application logs
  • Wait a few seconds for data to appear (buffering)

Platform-Specific Notes

  • Node.js
  • Python
  • Go
Minimum Version: Node.js 18+Package Manager: Use npm, yarn, or pnpmEnvironment Variables: Use dotenv for local development
npm install dotenv
require('dotenv').config();

Security Best Practices

Rotate API Keys

Rotate keys regularly (every 90 days recommended)

Use Environment Variables

Never hardcode keys in source code

Least Privilege

Use keys with minimum required permissions

Monitor Usage

Track API key usage for suspicious activity

Next Steps

Getting Help

Need assistance with setup?
I