Skip to main content

5-Minute Setup Overview

Prerequisites

Before you begin, make sure you have:
  • An MCP-compatible tool server (or use one of our examples)
  • An AI agent or client that can connect to MCP servers
  • An Agentflare account (sign up here)

Quick Setup

Step 1: Create Your Account

  1. Go to app.agentflare.com
  2. Sign up for a free account
  3. Verify your email address

Step 2: Add Your Tool Server

Navigate to Dashboard → Tool Servers → Add Server You can add a tool server in several ways:
  • HTTP/HTTPS Server
  • WebSocket Server
  • Stdio Server
{
  "name": "my-search-server",
  "type": "http",
  "endpoint": "https://your-server.com/mcp",
  "authentication": {
    "type": "bearer",
    "token": "your-server-token"
  }
}

Step 3: Get Your Proxy URL

After adding your tool server, Agentflare will generate a unique proxy URL:
https://proxy.agentflare.com/<your-workspace>/<your-server-slug>
Copy this URL - you’ll use it to configure your AI agent.

Step 4: Configure Your Agent

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

const client = new Client({
  transport: new HTTPTransport({
    baseUrl: "https://proxy.agentflare.com/<workspace>/<server-slug>",
    headers: {
      "Authorization": `Bearer ${process.env.AGENTFLARE_API_KEY}`
    }
  })
});

await client.connect();

// Make tool calls as usual - they'll be automatically tracked
const result = await client.callTool({
  name: "search",
  arguments: { query: "documentation" }
});

Step 5: View Your Data

Once configured, navigate to your Agentflare dashboard to see:

Live Tool Calls

Real-time feed of all tool invocations

Tool Reasoning

See why agents selected specific tools

Performance Metrics

Latency, throughput, and error rates

Cost Tracking

Track API costs per tool and session

What Gets Tracked?

Agentflare automatically captures:
  • Tool calls - Every tool invocation with arguments and results
  • Reasoning - Why the agent selected each tool (when provided)
  • Performance - Latency, throughput, error rates
  • Cost - API costs per call, session, and model
  • Metadata - Confidence scores, alternatives considered, context

Enhanced Observability (Optional)

For even richer insights, add reasoning metadata to your tool calls:
const result = await client.callTool({
  name: "search",
  arguments: { query: "customer support tickets" },
  // Add reasoning context for better observability
  metadata: {
    reasoning: "User asked about recent support issues, searching database",
    confidence: 0.95,
    alternatives: ["search_knowledge_base", "ask_human_agent"],
    context: "Customer service manager weekly report"
  }
});
Reasoning metadata is optional but highly recommended. It enables Agentflare’s advanced features like reasoning analysis, decision trees, and pattern detection.

Example: Complete Setup

Here’s a complete example showing the full integration:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { HTTPTransport } from "@modelcontextprotocol/sdk/client/http.js";

// Configure client with Agentflare proxy
const client = new Client({
  transport: new HTTPTransport({
    baseUrl: "https://proxy.agentflare.com/my-workspace/search-server",
    headers: {
      "Authorization": `Bearer ${process.env.AGENTFLARE_API_KEY}`
    }
  })
});

// Connect to server
await client.connect();

// List available tools (automatically tracked)
const tools = await client.listTools();
console.log("Available tools:", tools);

// Call a tool with reasoning (tracked in dashboard)
const result = await client.callTool({
  name: "search_database",
  arguments: {
    query: "recent customer tickets",
    limit: 10
  },
  metadata: {
    reasoning: "Generating weekly customer support report",
    confidence: 0.92,
    alternatives: ["manual_query", "cached_report"]
  }
});

console.log("Result:", result);
// Check your Agentflare dashboard to see this call tracked in real-time!

Next Steps

Troubleshooting

If you’re having trouble connecting:
  1. Verify your proxy URL is correct
  2. Check your API key is valid and not expired
  3. Ensure your network allows outbound HTTPS
  4. Check the Agentflare status page
If tool calls aren’t appearing in the dashboard:
  1. Verify the proxy URL is being used
  2. Check API key is included in headers
  3. Look for errors in your application logs
  4. Ensure your tool server is responding correctly
Agentflare is designed for minimal overhead:
  • Asynchronous data collection
  • Batched exports
  • < 1ms latency impact
  • No blocking operations
Need help? Contact support at support@agentflare.com or visit our Discord.
I