DEV Community

Ozor
Ozor

Posted on

How to Give Your AI Agent Access to Real-World Data with MCP

If you're building AI agents with Claude, GPT, or any LLM, you've hit the same wall: your agent can't interact with the real world.

It can't check Bitcoin's current price. It can't look up where an IP address is located. It can't take a screenshot of a website. It can't run code.

MCP (Model Context Protocol) fixes this by giving your AI agent tools it can call. In this tutorial, I'll show you how to connect an MCP server that gives your agent 13 real-world tools — in under 5 minutes.

What You'll Build

An AI agent that can:

  • Fetch live crypto prices (BTC, ETH, 1000+ tokens)
  • Geolocate any IP address
  • Look up DNS records
  • Take website screenshots
  • Execute Python/JavaScript code
  • And more

Step 1: Get an API Key

curl -X POST https://agent-gateway-kappa.vercel.app/api/keys/create
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "key": "fb_abc123...",
  "credits": 200,
  "message": "API key created. 200 free credits included."
}
Enter fullscreen mode Exit fullscreen mode

Save that key — you'll need it.

Step 2: Configure the MCP Server

Add this to your Claude Desktop claude_desktop_config.json (or any MCP-compatible client):

{
  "mcpServers": {
    "frostbyte": {
      "command": "npx",
      "args": ["-y", "frostbyte-mcp"],
      "env": {
        "FROSTBYTE_API_KEY": "fb_abc123..."
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

That's it. Restart your client and your agent now has 13 tools.

Step 3: Try It

Ask your AI agent:

"What's the current price of Bitcoin and Ethereum?"

The agent will call the get_crypto_prices tool and return live data:

Bitcoin: $67,432.15
Ethereum: $3,891.22
Enter fullscreen mode Exit fullscreen mode

Try these prompts:

"Where is the IP address 8.8.8.8 located?"

IP: 8.8.8.8
Country: United States
City: Mountain View, CA
ISP: Google LLC
Coordinates: 37.386, -122.084
Enter fullscreen mode Exit fullscreen mode

"Take a screenshot of news.ycombinator.com"

The agent captures a real screenshot and returns it.

"Run this Python code: print(sum(range(1, 101)))"

Output: 5050
Exit code: 0
Enter fullscreen mode Exit fullscreen mode

What Tools Are Available?

Tool Description
get_crypto_prices Live prices for 1000+ tokens
get_crypto_price Detailed price for a single token
get_ip_geolocation Geolocate any IP address
get_my_ip Get the agent's own IP
dns_lookup Look up DNS records (A, MX, CNAME, etc.)
take_screenshot Capture a website screenshot
execute_code Run Python, JavaScript, TypeScript, or Bash
get_wallet_balance Check crypto wallet balances (9 chains)
get_defi_prices DeFi token prices and market data
whois_lookup Domain WHOIS information
check_ssl SSL certificate details
port_scan Check if ports are open on a host
web_scrape Extract content from web pages

Using It Without MCP (Direct API)

Don't want MCP? Call the API directly:

# Crypto prices
curl https://agent-gateway-kappa.vercel.app/prices

# IP geolocation
curl "https://agent-gateway-kappa.vercel.app/api/geo/1.1.1.1" \
  -H "X-API-Key: fb_abc123..."

# DNS lookup
curl "https://agent-gateway-kappa.vercel.app/api/resolve/github.com" \
  -H "X-API-Key: fb_abc123..."

# Take a screenshot
curl "https://agent-gateway-kappa.vercel.app/api/screenshot?url=https://example.com" \
  -H "X-API-Key: fb_abc123..."

# Run code
curl -X POST "https://agent-gateway-kappa.vercel.app/api/execute" \
  -H "X-API-Key: fb_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"language": "python", "code": "print(2**100)"}'
Enter fullscreen mode Exit fullscreen mode

Why This Matters

Most AI agents today are blind — they can only work with data in their context window. By connecting real-world tools via MCP, you turn a chatbot into an agent that can:

  • Monitor crypto portfolios with live data
  • Investigate suspicious IP addresses
  • Automate website monitoring with screenshots
  • Debug code by actually running it
  • Resolve DNS issues in real time

The MCP protocol is an open standard, so these tools work with Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.

Getting Started

  1. Create a free API key (200 credits, no signup)
  2. Add the MCP server config to your client
  3. Start asking your agent to do real things
curl -X POST https://agent-gateway-kappa.vercel.app/api/keys/create
Enter fullscreen mode Exit fullscreen mode

The full API docs are at agent-gateway-kappa.vercel.app.


Built with Node.js, Fastify, and a lot of caffeine. The MCP server source is on GitHub.

Top comments (0)