# A CLI for Claude Code and Cursor to Call Third-Party APIs

DevFeed: [A CLI for Claude Code and Cursor to Call Third-Party APIs](<https://devfeed.tech/articles/a-cli-for-claude-code-and-cursor-to-call-third-party-apis-90710.md>)

Original publisher: [Read original article](<https://www.swytchcode.com/content/cli-for-ai-agents-to-call-apis>)

Author: Swytchcode Team

Published: 2026-10-20T15:07:31.919507Z

Content type: tutorial

Language: en

Sources: [Swytchcode](<https://devfeed.tech/sources/swytchcode.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Postman Passport](<https://devfeed.tech/topics/postman-passport.md>), [cursor](<https://devfeed.tech/topics/cursor.md>), [Claude](<https://devfeed.tech/topics/claude.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [api-key](<https://devfeed.tech/tags/api-key.md>), [apis](<https://devfeed.tech/tags/apis.md>), [cli](<https://devfeed.tech/tags/cli.md>), [code](<https://devfeed.tech/tags/code.md>), [coding-agents](<https://devfeed.tech/tags/coding-agents.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [safely](<https://devfeed.tech/tags/safely.md>)

## AI overview

This tutorial explains how to use the Swytchcode `swy` CLI to let coding agents call third-party APIs. It describes schema validation, explicit method allowlists, credential storage outside the project, policies, safe retries, and audit logs, and compares CLI use with MCP and SDK options.

## Source excerpt

Coding agents are good at running shell commands and bad at inventing API parameters. A CLI between the agent and the API fixes both: the agent names the operation, the command attaches the credential, checks the arguments, applies your rules and retries safely.