π Path 1: MCP Federation (Recommended for AI Integration)
Connect your AI agent or LLM to DEFONEOS via the MCP (Model Context Protocol) federation. This is the native integration β your agent discovers and calls DEFONEOS tools the same way it calls any MCP server.
Python β Connect to DEFONEOS MCP Federation
# Install the SDKpip install defoneos-sdk[python]
# Connect to the federationfrom defoneos_sdk import DefoneosClient
client = DefoneosClient(
endpoint="https://your-defoneos.example.com/mcp",
auth_token="your-oauth2-token", # OAuth2 JWT Ed25519
)
# Discover available tools (30 MCPs Γ multiple tools each)
tools = client.discover_tools()
print(f"Available tools: {len(tools)}")
# β Available tools: 142# Call a sensor fusion tool
result = client.call("defoneos-fusion-mcp", "fuse_isr_feed", {
"sources": ["sentinel2", "ais", "rtsp_cam_1"],
"bbox": [-1.5, 53.7, -1.2, 53.9"], # Yorkshire"time_window": "PT1H",
})
print(result.fused_track_count) # β 47 tracks# Subscribe to SIGIL audit eventsfor event in client.stream("sigil.events", filter={"action": "drone_command"}):
print(f"[SIGIL] {event.actor} β {event.action}: {event.digest[:16]}...")
The REST API exposes all DEFONEOS capabilities over standard HTTP/2. Use this for web dashboards, third-party system integration, and non-AI workloads.
Authentication
# Step 1: Get OAuth2 token
curl -X POST https://your-defoneos.example.com/auth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=$CLIENT_ID" \
-d "client_secret=$CLIENT_SECRET" \
-d "scope=fusion:read swarm:command sigil:audit"# Response:# {"access_token":"eyJ...","token_type":"Bearer","expires_in":3600}# Step 2: Use token for API calls
curl https://your-defoneos.example.com/api/v1/fusion/tracks \
-H "Authorization: Bearer eyJ..." \
-H "Accept: application/json"
For multi-organisation deployments (e.g., joint operations, coalition partners), DEFONEOS supports SIGIL chain synchronisation β allowing each party to maintain a verifiable, tamper-evident audit trail.
Python β SIGIL Chain Subscriber
from defoneos_sdk import SigilSync
# Connect to partner's SIGIL chain as read-only auditor
partner_chain = SigilSync(
endpoint="https://partner-defoneos.example.com/api/v1/sigil",
auth_token="coalition-audit-token",
mode="read_only", # We can verify, not write
)
# Verify the entire chain integrity
report = partner_chain.verify_chain()
print(f"Chain entries: {report.entry_count}")
print(f"Hash chain valid: {report.hash_chain_valid}")
print(f"Signatures valid: {report.signatures_valid}")
print(f"Tamper detected: {report.tamper_detected}")
# Subscribe to new SIGIL events (live audit feed)async for entry in partner_chain.stream():
# Verify each new entry's signature independentlyassert entry.verify_signature(), "Invalid signature!"assert entry.verify_hash_link(), "Hash chain broken!"
log_audit(entry)