Show details and operations for one provider
anythink integrations connections list [--provider ] List your active connections
anythink integrations connect Create an API-key connection (Claude, OpenAI, etc.)
anythink integrations oauth status Show OAuth client setup status
anythink integrations oauth configure Set the OAuth client ID + secret
anythink integrations oauth connect Connect via the browser OAuth flow
anythink integrations test Test a connection
anythink integrations enable Enable a connection
anythink integrations disable Disable a connection
anythink integrations disconnect Delete a connection
anythink integrations execute Run an operation on a connected provider
```
**API-key providers — `integrations connect`**
| Flag | Description |
| -------------------- | ---------------------------------------------------------------------------------------- |
| `--api-key ` | API key for the provider. If omitted, you'll be prompted (input is hidden). |
| `--name ` | Friendly name for this connection (default: ` connection`) |
| `--user-connection` | Make this a user-scoped connection (only the current user sees it). Default: tenant-wide. |
**OAuth providers — `integrations oauth connect`**
The CLI starts a local HTTP listener on `http://localhost:8745/callback`, opens your browser to the provider's authorisation URL, and exchanges the returned code for a connection — no copy/paste of auth codes required.
| Flag | Description |
| -------------------- | ------------------------------------------------------------------------ |
| `--name ` | Friendly name for this connection |
| `--user-connection` | Make this a user-scoped connection |
| `--port ` | Local callback port (default: `8745`) |
| `--no-open` | Don't try to open the browser — just print the URL |
| `--timeout ` | How long to wait for the callback (default: `300`) |
OAuth credentials need to be set up once per provider before you can connect:
```bash
anythink integrations oauth configure slack # prompts for client_id + secret (hidden)
anythink integrations oauth connect slack --name main
```
**Running operations — `integrations execute`**
| Flag | Description |
| ------------------- | ----------------------------------------------------------------------------------- |
| `--input ` | Input parameter as `key=value`. Repeatable. |
| `--inputs ` | All inputs as a JSON object. |
| `--json` | Print the full JSON response (default: just the `content` field if present). |
**Examples**
```bash
# Browse what's available
anythink integrations list
anythink integrations get claude
# API-key flow (Claude, OpenAI)
anythink integrations connect claude --name "main"
anythink integrations execute claude generate-text --input "prompt=Tell me a haiku"
# OAuth flow (Slack, Google, GitHub)
anythink integrations oauth configure slack
anythink integrations oauth connect slack --name main
# Manage connections
anythink integrations connections list
anythink integrations test
anythink integrations disable
anythink integrations disconnect --yes
```
---
### pay
Manage **AnythinkPay** — Stripe Connect, Apple in-app purchases, payments, subscription plans, and live subscriptions.
```
anythink pay status Show Stripe Connect account status
anythink pay connect Set up a Stripe Connect account and start onboarding
anythink pay setup Guided setup: Stripe Connect, Apple IAP, and a first plan
anythink pay payments List recent payments
anythink pay methods List saved payment methods
anythink pay entitlement Show the current user's access / trial entitlement
anythink pay payment-options Show available payment providers for a platform/storefront
anythink pay trial status|enable|disable Manage the app engagement trial
anythink pay apple credentials set Set Apple IAP credentials (.p8 from a file)
anythink pay apple credentials show Show Apple IAP credentials (identifiers masked)
anythink pay apple credentials notification-url Print the URL to register in App Store Connect
anythink pay apple verify Verify an Apple transaction (testing)
anythink pay plans list|get|create|update|delete Manage subscription plans
anythink pay subscriptions list|get|events Inspect subscriptions and history
anythink pay subscriptions cancel|resume Standard lifecycle actions
anythink pay subscriptions delete|force-expire|relink|resync Admin recovery (project admin)
anythink pay offers list|get|create|update Manage promo and referral offers
anythink pay offers pause|activate Change an offer's status
anythink pay offers delete Permanently delete an offer, its codes and redemption records
anythink pay offers codes|add-code|redemptions Inspect and extend an offer
anythink pay offers user-code Look up a user's personal referral code
```
Commands that cancel, delete, expire, relink or pause (`pay plans delete`, `pay subscriptions cancel|delete|force-expire|relink`, `pay offers pause|delete`) ask for confirmation. Pass `-y`/`--yes` to skip the prompt; in a non-interactive shell they refuse to run without it.
`pay plans update` only changes the fields you pass: omitted flags keep the plan's current currency, interval, type and active state. Use `--active` or `--inactive` to change availability.
**Options — `pay payments`**
| Flag | Description |
| ------------- | ------------------------------- |
| `--page ` | Page number |
| `--limit ` | Payments per page (default: 25) |
`pay connect` is interactive — it prompts for business type, country, and contact email, creates a Stripe Connect account, then opens the Stripe onboarding URL in your browser. `pay setup` chains Stripe Connect, Apple IAP credentials, and a first plan; each step is optional.
Subscription plans can carry an `--apple-product-id` (and optional `--apple-subscription-group-id`) so one plan covers both Stripe and Apple. `pay apple credentials set` reads the App Store Connect `.p8` private key from a file and stores it encrypted — it is never printed or logged.
**Required permissions**
| Command surface | Permission |
| --- | --- |
| Plan / subscription reads, entitlement, payment-options | `anythink_subscription_plans:read` |
| Plan writes | `anythink_subscription_plans:create` / `:update` / `:delete` |
| Payment reads/writes | `anythink_payments:read` / `:create` |
| Apple credentials, admin recovery (`delete`/`force-expire`/`relink`/`resync`) | project administrator |
**Examples**
```bash
anythink pay setup
anythink pay plans create --plan-name monthly --name Monthly --amount 9.99 --currency gbp --interval month --apple-product-id example_monthly
anythink pay apple credentials set --issuer-id --key-id --bundle-id com.example.app --private-key-file ./AuthKey.p8
anythink pay apple verify --signed-transaction
anythink pay subscriptions events
anythink pay entitlement
```
---
### oauth
Configure OAuth social sign-in providers for the active project.
```
anythink oauth google status Show Google OAuth configuration status
anythink oauth google configure Set Google OAuth client ID and secret
```
Google OAuth lets your project's users sign in with their Google account. You'll need a Google Cloud project with the OAuth 2.0 credentials created — see the [Google Cloud Console](https://console.cloud.google.com/apis/credentials).
Set the authorised redirect URI in your Google Cloud credentials to:
```
https://api.my.anythink.cloud/org//auth/v1/google/callback
```
**Examples**
```bash
anythink oauth google status
anythink oauth google configure
```
---
### api
List all API endpoints available for the active project — both platform routes and the dynamically generated REST routes for your entities.
```
anythink api List all endpoints
anythink api --json Output as JSON (useful for AI tooling)
```
---
### docs
Print the full CLI reference.
```
anythink docs Print reference as markdown
anythink docs --json Print reference as JSON (for AI/tooling consumption)
```
---
### migrate
Copy the entity schema (entities + fields) from one project profile to another. Useful for promoting a schema from staging to production.
```
anythink migrate --from --to
```
**Options**
| Flag | Description |
| ------------------ | -------------------------------------------------- |
| `--from ` | Source profile name (required) |
| `--to ` | Destination profile name (required) |
| `--dry-run` | Show what would be migrated without making changes |
**Examples**
```bash
anythink migrate --from my-app-staging --to my-app-prod
anythink migrate --from my-app-staging --to my-app-prod --dry-run
```
---
### plans
List available Anythink plans.
```
anythink plans List plans
anythink plans --json Output as JSON
```
---
## MCP server
The Anythink MCP server exposes the platform to AI assistants (Claude, Cursor, etc.) via the [Model Context Protocol](https://modelcontextprotocol.io).
### Install
No install needed — the recommended way is to run it on demand with `npx`:
```bash
npx -y @anythink-cloud/mcp
```
Prefer a native binary on your `PATH`? Any of:
```bash
# Homebrew (bundled with the CLI — see Installation above)
brew install anythink-cloud/tap/anythink
# .NET global tool (requires the .NET 8 SDK)
dotnet tool install -g anythink-mcp
# Or download the anythink-mcp- binary from the Releases page
```
### Configure
[](https://cursor.com/en/install-mcp?name=anythink&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBhbnl0aGluay1jbG91ZC9tY3AiXX0%3D)
[](https://insiders.vscode.dev/redirect/mcp/install?name=anythink&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40anythink-cloud%2Fmcp%22%5D%7D)
For **Claude Code**, register it in one command:
```bash
claude mcp add anythink -- npx -y @anythink-cloud/mcp
```
Or add it to your MCP client config manually (e.g. `.mcp.json`):
```json
{
"mcpServers": {
"anythink": {
"command": "npx",
"args": ["-y", "@anythink-cloud/mcp"]
}
}
}
```
To pin a profile, add it to `args`: `["-y", "@anythink-cloud/mcp", "--profile", "my-project"]`
Works in any MCP client. Most use the same `mcpServers` JSON shown above — just add it to the client's config file:
| Client | Config file |
| --- | --- |
| Claude Code | `claude mcp add anythink -- npx -y @anythink-cloud/mcp` (or `.mcp.json`) |
| Claude Desktop | `claude_desktop_config.json` (Settings → Developer → Edit Config) |
| Cursor | `~/.cursor/mcp.json` (or the **Add to Cursor** button above) |
| VS Code | `.vscode/mcp.json` (or the **Install in VS Code** button above) |
| Cline | `cline_mcp_settings.json` (MCP Servers → Configure) |
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
A couple of clients use a different config shape:
Continue (YAML — mcpServers is a list)
```yaml
mcpServers:
- name: anythink
command: npx
args:
- -y
- "@anythink-cloud/mcp"
```
Zed (uses context_servers, not mcpServers)
```json
{
"context_servers": {
"anythink": {
"source": "custom",
"command": "npx",
"args": ["-y", "@anythink-cloud/mcp"]
}
}
}
```
(Using a native binary instead of `npx`? Use `"command": "anythink-mcp"` with no `args`.)
Once connected, run the `login` tool, then `accounts_use` / `projects_use` to pick your working context.
### Available tools
The MCP server provides dedicated tools for authentication, account/project management, and configuration — plus a generic `cli` tool that can run any CLI command:
| Tool | Description |
| --- | --- |
| `signup` | Create a new Anythink account |
| `login` | Log in with email and password |
| `login_direct` | Store credentials directly (org ID + API key or JWT) |
| `logout` | Remove a saved profile |
| `config_show` | List all profiles |
| `config_use` | Switch active profile |
| `config_remove` | Remove a profile |
| `accounts_list` | List billing accounts |
| `accounts_create` | Create a billing account |
| `accounts_use` | Set the active billing account |
| `projects_list` | List projects |
| `projects_create` | Create a project |
| `projects_use` | Connect to a project |
| `projects_delete` | Delete a project |
| `cli` | Run any CLI command (entities, data, workflows, roles, etc.) |
The hosted MCP server (`anythink-mcp --hosted`) has no sign-in or profile tools. Its `accounts_list`, `accounts_create`, `plans`, `projects_create` and `projects_delete` tools run as the signed-in user and appear only when the user grants account access; see the [MCP server docs](mcp/README.md#account-tools).
---
## Contributing
### Prerequisites
- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8)
- An Anythink account (free tier works)
### Setup
```bash
git clone https://github.com/anythink-cloud/anythink-cli
cd anythink-cli
dotnet build
```
### Running locally
```bash
dotnet run --project src/AnythinkCli.csproj -- --help
dotnet run --project src/AnythinkCli.csproj -- projects list
dotnet run --project src/AnythinkCli.csproj -- entities list
```
### Releases
Releases are automated via GitHub Actions. Push a version tag to trigger a build:
```bash
git tag v1.2.0
git push origin v1.2.0
```
The workflow builds self-contained binaries for macOS (arm64, x64) and Linux (x64, arm64), computes SHA256 checksums, and publishes them as a GitHub release.
### Project structure
```
anythink-cli/
├── src/ # CLI source
│ ├── Commands/ # Command implementations (signup, login, etc)
│ ├── Config/ # CliConfig.cs, Profile, ConfigService
│ ├── Models/ # ApiModels.cs, BillingModels.cs
│ ├── Client/ # HttpApiClient.cs, AnythinkClient.cs, BillingClient.cs
│ ├── Output/ # Renderer.cs (Spectre.Console helpers)
│ └── Program.cs # Application entry point & .env loader
├── mcp/ # MCP server source
│ ├── Tools/ # MCP tool implementations
│ ├── McpClientFactory.cs # Auth + client resolution
│ └── Program.cs # MCP server entry point
├── tests/ # CLI unit tests
├── mcp-tests/ # MCP unit tests
├── AnythinkCli.sln # Solution file
└── .gitignore
```
---
## License
MIT — see [LICENSE](LICENSE). This covers the Anythink CLI and MCP server source in this repository; it does not grant rights to the Anythink platform, APIs, or services, which are governed by separate terms at [anythink.cloud](https://anythink.cloud).
---
Built with [Spectre.Console](https://spectreconsole.net) · Powered by [Anythink](https://anythink.cloud)