---
title: "Set Up the COUNT CLI · COUNT Partner API"
description: "Watch the COUNT CLI set up end to end: install, store partner credentials, log in through the browser, then serve the same tools to an agent over stdio."
canonical: "https://developers.getcount.com/tutorials/cli"
source: "https://developers.getcount.com/tutorials/cli"
---
Tutorials

# Set up the COUNT CLI

Install the CLI, hand it your partner credentials, log in through the browser once, and it will hold the tokens and sign requests for you — including as a local MCP server for an agent.

4 steps · about 33 seconds · from npm install to an agent wired up

## What you just saw

1. 1 count init stores credentials locally The clientId and clientSecret go into ~/.count/credentials.json on your own machine. The CLI signs requests locally, so the secret is never transmitted.
2. 2 count login needs its callback registered The CLI listens on a fixed loopback URI and COUNT redirects back to it. That exact URI has to be in your app’s redirect URLs, or the login fails on a redirect mismatch that looks like a CLI bug.
3. 3 Consent is the same screen a partner app uses You authorize the CLI per workspace, exactly as an end user would authorize your product, and the token is stored against that workspace.
4. 4 count mcp serves the same tools over stdio print-config emits the JSON your MCP client wants. The agent then talks to COUNT through a process you control, with the token staying on your disk.

## Where to go next

[COUNT CLI reference](https://developers.getcount.com/tools/count-cli) [MCP Server](https://developers.getcount.com/tools/mcp) [API access credentials](https://developers.getcount.com/getting-started/credentials)
