Guide

Call SmartAPIs.net through MCP

Discover tools, call them, and keep the integration agent-native from day one.

1. Initialize MCP

Start with initialization so the runtime can negotiate the protocol version.

curl

curl -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","clientInfo":{"name":"example-agent","version":"0.1.0"}}}' \
  https://smartapis.net/mcp

2. List tools

Discovery tools are public, so agents can inspect SmartAPIs.net before auth.

curl

curl -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
  https://smartapis.net/mcp

3. Call a public discovery tool

Public context is the easiest way to verify MCP connectivity.

curl

curl -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"smartagent_context_get","arguments":{"location_id":"chicago"}}}' \
  https://smartapis.net/mcp

4. Call an authenticated tool

Once an agent has a client key, it can use product tools directly.

curl

curl -X POST -H "Content-Type: application/json" \
  -H "X-API-Key: $SMARTAPIS_API_KEY" \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"smartagent_places_search","arguments":{"region_id":"new-york-city","q":"pizza","limit":3}}}' \
  https://smartapis.net/mcp