cited-cli 0.5.1__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cited_cli-0.5.1 → cited_cli-0.6.0}/CLAUDE.md +44 -12
- cited_cli-0.5.1/README.md → cited_cli-0.6.0/PKG-INFO +114 -6
- cited_cli-0.5.1/PKG-INFO → cited_cli-0.6.0/README.md +92 -28
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/CLAUDE_DESKTOP_SETUP.md +5 -1
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/skills/business-setup/SKILL.md +1 -1
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/skills/explore/SKILL.md +12 -12
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/skills/geo-audit/SKILL.md +6 -4
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/pyproject.toml +1 -1
- cited_cli-0.6.0/packages/core/src/cited_core/__init__.py +1 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/api/client.py +86 -7
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/api/endpoints.py +22 -3
- cited_cli-0.6.0/packages/core/src/cited_core/auth/credentials.py +29 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/auth/store.py +37 -0
- cited_cli-0.6.0/packages/core/src/cited_core/docs.py +264 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/errors.py +20 -1
- cited_cli-0.6.0/packages/core/src/cited_core/free_audit.py +39 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/README.md +94 -23
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/SKILL.md +28 -10
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/pyproject.toml +3 -3
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/auth_provider.py +22 -1
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/server.py +8 -2
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tool_changelog.yaml +107 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/_helpers.py +122 -86
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/agent.py +17 -17
- cited_cli-0.6.0/packages/mcp/src/cited_mcp/tools/agent_keys.py +194 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/analytics.py +9 -9
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/audit.py +91 -2
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/auth.py +60 -6
- cited_cli-0.6.0/packages/mcp/src/cited_mcp/tools/billing.py +348 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/business.py +13 -13
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/changelog.py +2 -5
- cited_cli-0.6.0/packages/mcp/src/cited_mcp/tools/docs.py +69 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/hq.py +6 -6
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/job.py +1 -1
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/tests/test_surface_invariants.py +20 -46
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/tests/test_tools.py +16 -406
- {cited_cli-0.5.1 → cited_cli-0.6.0}/pyproject.toml +4 -4
- {cited_cli-0.5.1 → cited_cli-0.6.0}/scripts/mcp_test_harness.py +22 -30
- cited_cli-0.6.0/server.json +60 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/app.py +4 -0
- cited_cli-0.6.0/src/cited_cli/commands/agent.py +291 -0
- cited_cli-0.6.0/src/cited_cli/commands/agent_setup.py +493 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/analytics.py +5 -18
- cited_cli-0.6.0/src/cited_cli/commands/audit.py +363 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/auth.py +70 -14
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/business.py +2 -16
- cited_cli-0.6.0/src/cited_cli/commands/credits.py +323 -0
- cited_cli-0.6.0/src/cited_cli/commands/docs.py +77 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/hq.py +3 -16
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/job.py +3 -16
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/named_audit.py +3 -16
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/recommend.py +3 -16
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/solution.py +4 -18
- cited_cli-0.6.0/src/cited_cli/utils/client.py +55 -0
- cited_cli-0.6.0/src/cited_cli/utils/errors.py +63 -0
- cited_cli-0.6.0/tests/test_agent_identity.py +244 -0
- cited_cli-0.6.0/tests/test_agent_setup.py +322 -0
- cited_cli-0.6.0/tests/test_api_client.py +220 -0
- cited_cli-0.6.0/tests/test_audit_models.py +152 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_auth.py +2 -7
- cited_cli-0.6.0/tests/test_credits.py +436 -0
- cited_cli-0.6.0/tests/test_docs.py +250 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_feature_parity.py +21 -2
- cited_cli-0.6.0/tests/test_free_audit.py +173 -0
- cited_cli-0.6.0/tests/test_mcp_credits.py +617 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_mcp_server.py +20 -3
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_mcp_tools.py +6 -10
- cited_cli-0.6.0/tests/test_server_json.py +59 -0
- cited_cli-0.5.1/packages/core/src/cited_core/__init__.py +0 -1
- cited_cli-0.5.1/packages/mcp/src/cited_mcp/plan_gating.py +0 -218
- cited_cli-0.5.1/packages/mcp/src/cited_mcp/tools/billing.py +0 -210
- cited_cli-0.5.1/packages/mcp/tests/test_plan_gating.py +0 -219
- cited_cli-0.5.1/src/cited_cli/commands/agent.py +0 -129
- cited_cli-0.5.1/src/cited_cli/commands/audit.py +0 -177
- cited_cli-0.5.1/src/cited_cli/utils/errors.py +0 -31
- cited_cli-0.5.1/tests/test_api_client.py +0 -79
- {cited_cli-0.5.1 → cited_cli-0.6.0}/.github/workflows/changelog-guard.yml +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/.github/workflows/ci.yml +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/.github/workflows/release.yml +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/.gitignore +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/DEMO.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/FUTURE.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/LICENSE +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/TEST_RUNBOOK.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/.claude-plugin/marketplace.json +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/.claude-plugin/plugin.json +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/.mcp.json +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/agents/geo-analyst.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/commands/audit.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/commands/recommend.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/commands/status.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/settings.json +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/cited-plugins/skills/geo-recommend/SKILL.md +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/api/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/auth/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/auth/oauth_server.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/config/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/config/constants.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/core/src/cited_core/config/manager.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/__main__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/context.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/remote.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tool_manager.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/action_plan.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/recommend.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/src/cited_mcp/tools/solution.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/tests/conftest.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/packages/mcp/tests/test_auth_provider.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/scripts/dev-install.sh +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/__main__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/api/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/api/client.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/api/endpoints.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/auth/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/auth/oauth_server.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/auth/store.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/config_cmd.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/commands/mcp_cmd.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/config/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/config/constants.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/config/manager.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/context.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/server.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/_helpers.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/audit.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/auth.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/business.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/job.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/recommend.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/mcp/tools/solution.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/output/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/output/formatter.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/output/progress.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/output/tables.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/utils/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/src/cited_cli/utils/interactive.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/__init__.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/conftest.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_config.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_live_pipeline.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_output.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_pipeline.py +0 -0
- {cited_cli-0.5.1 → cited_cli-0.6.0}/tests/test_version.py +0 -0
|
@@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
7
7
|
Monorepo for the [Cited](https://youcited.com) GEO platform tooling. Contains three Python packages:
|
|
8
8
|
|
|
9
9
|
- **`cited-core`** (`packages/core/`) — Shared library: API client, auth, config, endpoints, errors. No CLI or MCP dependencies.
|
|
10
|
-
- **`cited-mcp`** (`packages/mcp/`) — Standalone MCP server with
|
|
10
|
+
- **`cited-mcp`** (`packages/mcp/`) — Standalone MCP server with 88 tools. Depends on `cited-core` + `mcp` SDK. Installable via `pip install cited-mcp` or `uvx cited-mcp`.
|
|
11
11
|
- **`cited-cli`** (root `src/cited_cli/`) — Typer + Rich CLI. Depends on `cited-core` + `typer` + `rich`. Optional dep on `cited-mcp` for `cited mcp serve`.
|
|
12
12
|
|
|
13
13
|
Also contains `cited-plugins/` — a Claude Code plugin (skills, commands, agents) that references the MCP server via `uvx cited-mcp`.
|
|
@@ -48,18 +48,21 @@ cited mcp serve # Via CLI (requires cited-cli[mcp])
|
|
|
48
48
|
**`cited-core`** (`packages/core/src/cited_core/`) — Zero CLI/MCP dependencies:
|
|
49
49
|
- `api/client.py` — `CitedClient` (httpx sync)
|
|
50
50
|
- `api/endpoints.py` — API endpoint path constants
|
|
51
|
-
- `auth/store.py` — `TokenStore` (keyring + file fallback)
|
|
51
|
+
- `auth/store.py` — `TokenStore` (keyring + file fallback); also stores per-env agent keys (`agent_key:<env>`)
|
|
52
|
+
- `auth/credentials.py` — `resolve_agent_api_key()` (env var → config → saved key)
|
|
52
53
|
- `auth/oauth_server.py` — Temporary localhost OAuth callback server
|
|
53
54
|
- `config/manager.py` — `ConfigManager` (TOML config)
|
|
54
55
|
- `config/constants.py` — `ENVIRONMENTS`, `CONFIG_DIR`, `VALID_INDUSTRIES`, etc.
|
|
55
56
|
- `errors.py` — `CitedAPIError`, `ExitCode`, `exit_code_for_status()`
|
|
56
57
|
|
|
57
|
-
**`cited-mcp`** (`packages/mcp/src/cited_mcp/`) — MCP server +
|
|
58
|
+
**`cited-mcp`** (`packages/mcp/src/cited_mcp/`) — MCP server + 88 tools:
|
|
58
59
|
- `server.py` — `FastMCP` instance, lifespan, `run_server()`
|
|
59
|
-
- `tools/` — auth, business, audit, recommend, solution, job tool modules
|
|
60
|
-
-
|
|
60
|
+
- `tools/` — auth, business, audit, recommend, solution, job, docs (public docs search), billing (credits), agent_keys (agent signup + per-user keys) tool modules
|
|
61
|
+
- No plans or tiers: every tool is available to every account. Paid work is charged in credits by the backend, which returns HTTP 402 (`insufficient_credits` / `purchase_required`) or 403 `claim_required`; `tools/_helpers.py::_api_error_response` flattens the `detail` object (`error_type`, `credits_needed`, `balance`, `buy_url`, `claim_url`, `payment_required`) and adds a hint
|
|
62
|
+
- `log_tool_call` copies the API's `X-Cited-Notice` response header into every tool result as a top-level `notice` (via a ContextVar in `cited_core.api.client`)
|
|
61
63
|
- `auth_provider.py` — OAuth provider with stateless JWT tokens and user JWT expiry detection
|
|
62
|
-
- Supports `CITED_TOKEN` and `CITED_AGENT_API_KEY` env vars
|
|
64
|
+
- Supports `CITED_TOKEN` and `CITED_AGENT_API_KEY` env vars; the agent key can also come from the `agent_api_key` config value or the key `agent_signup` saved (`TokenStore.get_agent_key(env)`), resolved by `cited_core.auth.credentials.resolve_agent_api_key`
|
|
65
|
+
- The remote server also accepts an agent key (`cak_...`) as the Bearer token and forwards it as `X-Agent-API-Key`
|
|
63
66
|
- Includes browser OAuth `login` tool for Claude Desktop users
|
|
64
67
|
- Remote server (`remote.py`) runs stateless HTTP with Fargate Spot auto-scaling
|
|
65
68
|
|
|
@@ -98,11 +101,11 @@ print_result(data, out, human_formatter=lambda d, c: render_kv("Title", d, c))
|
|
|
98
101
|
- **Token storage:** Per-environment via OS keychain (`keyring`) with a file fallback (`~/.cited/credentials.json`). The token is sent back to the API as a cookie, not a Bearer header.
|
|
99
102
|
- **TTY detection:** `commands/auth.py` uses `_is_interactive()` (wrapping `sys.stdin.isatty()`) for all TTY checks — tests monkeypatch this helper.
|
|
100
103
|
|
|
101
|
-
**Agent
|
|
104
|
+
**Agent keys:** per-user agent keys (`cak_...`) authenticate every request via the `X-Agent-API-Key` header. Sources, in order: `CITED_AGENT_API_KEY`, `cited config set agent_api_key`, then the key saved by `cited agent signup` / the `agent_signup` tool. A login session token takes precedence: `CitedClient` only sends the key when it has no token. CLI commands build their client with `utils/client.py::get_authed_client()`, which uses the token or falls back to the agent key.
|
|
102
105
|
|
|
103
106
|
**Adding a new command group:**
|
|
104
107
|
1. Create `src/cited_cli/commands/<name>.py` with a `typer.Typer()` instance
|
|
105
|
-
2. Add endpoint paths to `src/
|
|
108
|
+
2. Add endpoint paths to `packages/core/src/cited_core/api/endpoints.py`
|
|
106
109
|
3. Register in `app.py` with `app.add_typer(..., name="<name>")`
|
|
107
110
|
|
|
108
111
|
**Adding a nested command group (sub-subcommands):**
|
|
@@ -123,13 +126,13 @@ This gives `cited audit template list|get|create|update|delete` while `cited aud
|
|
|
123
126
|
When adding a new feature:
|
|
124
127
|
1. Add the CLI command in `src/cited_cli/commands/`
|
|
125
128
|
2. Add the MCP tool in `packages/mcp/src/cited_mcp/tools/`
|
|
126
|
-
3.
|
|
127
|
-
4.
|
|
128
|
-
5.
|
|
129
|
+
3. Update the `_CLI_TO_MCP` mapping in `tests/test_feature_parity.py`
|
|
130
|
+
4. If the feature is intentionally one-interface-only, add it to `CLI_ONLY` or `MCP_ONLY` with a comment explaining why
|
|
131
|
+
5. Add the tool to `EXPECTED_TOOLS` in `tests/test_mcp_server.py` and `packages/mcp/tests/test_surface_invariants.py`, and to the top entry of `tool_changelog.yaml`
|
|
129
132
|
|
|
130
133
|
## Key Conventions
|
|
131
134
|
|
|
132
|
-
- **Exit codes:** 0=success, 1=error, 2=auth, 3=not found, 4=validation, 5=rate limited (defined in `utils/errors.py`)
|
|
135
|
+
- **Exit codes:** 0=success, 1=error, 2=auth, 3=not found, 4=validation, 5=rate limited, 6=payment required (HTTP 402) (defined in `cited_core/errors.py`, re-exported by `utils/errors.py`)
|
|
133
136
|
- **Line length:** 100 chars (ruff enforced)
|
|
134
137
|
- **All files** start with `from __future__ import annotations`
|
|
135
138
|
- **Type hints** use `X | None` syntax, not `Optional[X]`
|
|
@@ -160,6 +163,35 @@ Release, deploy, and infrastructure scripts live in the **private** repo `~/repo
|
|
|
160
163
|
| dev | `https://dev.youcited.com` | |
|
|
161
164
|
| local | `http://localhost:8000` | |
|
|
162
165
|
|
|
166
|
+
## Credits Billing and Agent Identity
|
|
167
|
+
|
|
168
|
+
Monthly plans (Growth/Scale/Pro), tiers and plan gating were removed entirely. Billing is
|
|
169
|
+
pay-as-you-go credits (1 credit = $1; a standard audit is 10 credits; a one-off audit is $15).
|
|
170
|
+
|
|
171
|
+
| CLI | MCP tool | Endpoint |
|
|
172
|
+
|-----|----------|----------|
|
|
173
|
+
| `cited credits prices` (no login) | `get_prices` | `GET /billing/prices` |
|
|
174
|
+
| `cited credits balance` | `get_credits` | `GET /billing/credits` |
|
|
175
|
+
| `cited credits history [--limit]` | `credit_history` | `GET /billing/credits/transactions` |
|
|
176
|
+
| `cited credits buy PACK_ID [--no-save-card]` | `buy_credits` | `POST /billing/credits/checkout` |
|
|
177
|
+
| `cited credits buy-audit` | `buy_audit` | `POST /billing/audit-checkout` |
|
|
178
|
+
| `cited credits refund [--yes]` | `request_refund(confirm)` | `POST /billing/credits/refund` |
|
|
179
|
+
| `cited credits redeem CODE` | `redeem_voucher` | `POST /billing/credits/redeem` |
|
|
180
|
+
| `cited credits auto-refill --on/--off [--pack] [--cap]` | `set_auto_refill` | `PUT /billing/credits/auto-refill` |
|
|
181
|
+
| `cited audit quote TEMPLATE_ID [--model]` | `quote_audit` | `POST /billing/audit-quote` |
|
|
182
|
+
| `cited agent signup [--name] [--email]` (no login) | `agent_signup` | `POST /agent/signup` |
|
|
183
|
+
| `cited agent key-status` | `key_status` | `GET /agent/key-status` |
|
|
184
|
+
| `cited agent keys` | `list_api_keys` | `GET /agent-keys` |
|
|
185
|
+
| `cited agent revoke KEY_ID` | `revoke_api_key` | `DELETE /agent-keys/{id}` |
|
|
186
|
+
|
|
187
|
+
Purchase commands/tools only return a Stripe `checkout_url` for a person to open; they never
|
|
188
|
+
claim a payment happened. Refunds need confirmation (`--yes` in the CLI, `confirm=True` in MCP).
|
|
189
|
+
Vouchers add free credits (once per account per code, claimed accounts only; 404
|
|
190
|
+
`voucher_not_found`, 400 `voucher_expired` / `voucher_used_up`, 409 `voucher_already_redeemed`).
|
|
191
|
+
Signup stores the returned `api_key` with `TokenStore.save_agent_key(env, key)` and never prints
|
|
192
|
+
it; the claim URL and 6-digit code are shown for the human. `cited logout` / the `logout` tool
|
|
193
|
+
forget a saved agent key when there is no session token.
|
|
194
|
+
|
|
163
195
|
## Real API Response Field Names (Critical)
|
|
164
196
|
|
|
165
197
|
These field names were confirmed against the live dev API on 2026-03-18. Using the wrong names produces silently empty output (no error, just blank table cells). Always check the live response shape before adding new field access.
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: cited-cli
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: CLI for the Cited GEO platform
|
|
5
|
+
Author-email: Cited <support@youcited.com>
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Requires-Dist: cited-core>=0.6.0
|
|
10
|
+
Requires-Dist: rich>=13.0.0
|
|
11
|
+
Requires-Dist: typer>=0.15.0
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: cited-mcp>=0.6.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
15
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
16
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
17
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
18
|
+
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
|
|
19
|
+
Provides-Extra: mcp
|
|
20
|
+
Requires-Dist: cited-mcp>=0.6.0; extra == 'mcp'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
1
23
|
# Cited CLI
|
|
2
24
|
|
|
3
25
|
Command-line interface for the [Cited](https://youcited.com) GEO (Generative Engine Optimization) platform. Audit how often your business is cited by AI assistants, generate recommendations, and produce AI-ready content solutions — all from the terminal or a Python script.
|
|
4
26
|
|
|
27
|
+
## For AI agents
|
|
28
|
+
|
|
29
|
+
- **Free audit, no login:** call the `free_audit` MCP tool (or run `cited audit free example.com`) to see how often ChatGPT, Perplexity and Google AI cite a site, and who they cite instead.
|
|
30
|
+
- **MCP server:** `https://mcp.youcited.com/mcp` (streamable HTTP, OAuth login on first use). Also on PyPI as [`cited-mcp`](https://pypi.org/project/cited-mcp/) for local stdio.
|
|
31
|
+
- **One-command setup:** `cited agent setup` connects Claude Code, Cursor and Codex (and prints the Claude Desktop connector steps). Add `--dry-run` to preview.
|
|
32
|
+
- **Docs:** `search_docs` / `get_doc` tools, or `cited docs search "<question>"`, search the public [Cited docs](https://youcited.com/docs) without a login.
|
|
33
|
+
|
|
5
34
|
## Installation
|
|
6
35
|
|
|
7
36
|
### Homebrew (recommended)
|
|
@@ -73,7 +102,30 @@ cited register --email you@example.com --name "Your Name" --password "Secret123!
|
|
|
73
102
|
|
|
74
103
|
## MCP Server
|
|
75
104
|
|
|
76
|
-
This repo also includes `cited-mcp`, a [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes
|
|
105
|
+
This repo also includes `cited-mcp`, a [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes 88 tools for AI assistants like Claude. It lets Claude manage businesses, run GEO audits, generate recommendations, work a prioritized action plan, verify fixes via the Validation Engine, and create solutions on your behalf.
|
|
106
|
+
|
|
107
|
+
### Quick setup
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cited agent setup # configure every AI client found on this machine
|
|
111
|
+
cited agent setup --dry-run # preview the changes first
|
|
112
|
+
cited agent setup --client cursor --yes
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`cited agent setup` merges into your existing config (it never replaces an existing `cited` entry), backs up any file it changes, and supports `--client claude-code|claude-desktop|cursor|codex|all`, `--dry-run`, `--yes` and `--json`. The manual steps for each client follow.
|
|
116
|
+
|
|
117
|
+
### Claude Code
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
claude mcp add --transport http --scope user cited https://mcp.youcited.com/mcp
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Then run `/mcp` in Claude Code and choose **Authenticate**. For Cited slash commands, skills and the `geo-analyst` agent, also install the plugin:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
/plugin marketplace add YouCited/cited-plugins
|
|
127
|
+
/plugin install cited@youcited-cited-plugins
|
|
128
|
+
```
|
|
77
129
|
|
|
78
130
|
### Claude Desktop (Custom Connector — recommended)
|
|
79
131
|
|
|
@@ -127,7 +179,21 @@ Get your token with `cited login` then `cited auth token`.
|
|
|
127
179
|
|
|
128
180
|
### Cursor
|
|
129
181
|
|
|
130
|
-
Add
|
|
182
|
+
Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in your project root — or run `cited agent setup --client cursor`:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"mcpServers": {
|
|
187
|
+
"cited": {
|
|
188
|
+
"url": "https://mcp.youcited.com/mcp"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Open Settings (`Cmd+,`) → **MCP**, click **Login** next to `cited`, and verify it shows a green status. Use tools in Agent mode.
|
|
195
|
+
|
|
196
|
+
**Fallback** (older Cursor versions without remote-server support) — proxy through [`mcp-remote`](https://www.npmjs.com/package/mcp-remote), which needs Node.js:
|
|
131
197
|
|
|
132
198
|
```json
|
|
133
199
|
{
|
|
@@ -140,9 +206,14 @@ Add a `.cursor/mcp.json` file to your project root (or `~/.cursor/mcp.json` for
|
|
|
140
206
|
}
|
|
141
207
|
```
|
|
142
208
|
|
|
143
|
-
|
|
209
|
+
### Codex
|
|
144
210
|
|
|
145
|
-
|
|
211
|
+
```bash
|
|
212
|
+
codex mcp add cited --url https://mcp.youcited.com/mcp
|
|
213
|
+
codex mcp login cited
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Or add `[mcp_servers.cited]` with `url = "https://mcp.youcited.com/mcp"` to `~/.codex/config.toml` (`cited agent setup --client codex` does this for you).
|
|
146
217
|
|
|
147
218
|
### Updating to new Cited features
|
|
148
219
|
|
|
@@ -161,6 +232,9 @@ Claude will chain the tools automatically — `list_businesses` → `start_audit
|
|
|
161
232
|
| Category | Tools |
|
|
162
233
|
|----------|-------|
|
|
163
234
|
| **Auth** | `check_auth_status`, `login`, `logout` |
|
|
235
|
+
| **Credits** | `get_prices`, `get_credits`, `credit_history`, `buy_credits`, `buy_audit`, `request_refund`, `redeem_voucher`, `set_auto_refill`, `quote_audit` |
|
|
236
|
+
| **Agent signup & keys** | `agent_signup`, `key_status`, `list_api_keys`, `revoke_api_key` |
|
|
237
|
+
| **No login needed** | `free_audit`, `search_docs`, `get_doc`, `get_prices`, `agent_signup` |
|
|
164
238
|
| **Businesses** | `list_businesses`, `get_business`, `create_business`, `update_business`, `delete_business`, `crawl_business`, `get_health_scores`, `get_usage_stats` |
|
|
165
239
|
| **Audit Templates** | `list_audit_templates`, `get_audit_template`, `create_audit_template`, `update_audit_template`, `delete_audit_template` |
|
|
166
240
|
| **Audits** | `start_audit`, `get_audit_status`, `get_audit_result`, `list_audits`, `export_audit` |
|
|
@@ -174,6 +248,16 @@ Claude will chain the tools automatically — `list_businesses` → `start_audit
|
|
|
174
248
|
|
|
175
249
|
See [`packages/mcp/README.md`](packages/mcp/README.md) for full details, environment variables, and development instructions.
|
|
176
250
|
|
|
251
|
+
### Pricing: pay-as-you-go credits
|
|
252
|
+
|
|
253
|
+
No plans or tiers: every command and tool works on every account, and work is paid with
|
|
254
|
+
credits (1 credit = $1). A standard audit is 10 credits (`cited audit quote` shows the exact
|
|
255
|
+
cost); a one-off audit is $15 (`cited credits buy-audit`); packs (`cited credits buy pack_20`)
|
|
256
|
+
need a claimed account. Purchases print a Stripe checkout link for a person to open.
|
|
257
|
+
|
|
258
|
+
An AI agent with no account can run `cited agent signup` (or call the `agent_signup` tool) to
|
|
259
|
+
get its own API key on an unclaimed account, then give its human the claim link and code.
|
|
260
|
+
|
|
177
261
|
---
|
|
178
262
|
|
|
179
263
|
## Global Flags
|
|
@@ -350,6 +434,13 @@ TEMPLATE_ID=$(cited --json audit template create \
|
|
|
350
434
|
AUDIT_JOB=$(cited --json audit start $TEMPLATE_ID | jq -r '.job_id')
|
|
351
435
|
cited job watch $AUDIT_JOB
|
|
352
436
|
|
|
437
|
+
# Optional: compare specific models side by side (see `cited audit models`)
|
|
438
|
+
CMP_JOB=$(cited --json audit start $TEMPLATE_ID \
|
|
439
|
+
--model anthropic:claude-sonnet-5-5 --model anthropic:claude-opus-5-5 \
|
|
440
|
+
--model openai:gpt-5.2 | jq -r '.job_id')
|
|
441
|
+
cited job watch $CMP_JOB
|
|
442
|
+
cited audit models $CMP_JOB
|
|
443
|
+
|
|
353
444
|
RECO_JOB=$(cited --json recommend start $AUDIT_JOB | jq -r '.job_id')
|
|
354
445
|
cited job watch $RECO_JOB
|
|
355
446
|
|
|
@@ -489,7 +580,9 @@ cited config set|get|show|environments
|
|
|
489
580
|
cited business list|get|create|update|delete|health|crawl
|
|
490
581
|
|
|
491
582
|
cited audit template list|get|create|update|delete ← Manage audit templates
|
|
583
|
+
cited audit quote TEMPLATE_ID [--model ...] ← Credits an audit will cost
|
|
492
584
|
cited audit start|status|result|list|export ← Run and inspect audits
|
|
585
|
+
cited audit models [JOB_ID] ← Compare AI models (or list choices)
|
|
493
586
|
|
|
494
587
|
cited recommend start|status|result|list ← Generate recommendations
|
|
495
588
|
cited recommend insights ← View actionable source table
|
|
@@ -500,8 +593,21 @@ cited hq <business_id> [--full] [--personas] [--products] [--intents] [--actions
|
|
|
500
593
|
|
|
501
594
|
cited analytics compare|trends|summary
|
|
502
595
|
|
|
596
|
+
cited agent setup ← Connect Claude Code / Cursor / Codex / Claude Desktop
|
|
597
|
+
cited agent signup [--name] [--email] ← Account + API key for an AI agent (no login)
|
|
598
|
+
cited agent key-status|keys|revoke KEY_ID ← Inspect and revoke agent keys
|
|
503
599
|
cited agent facts|claims|comparison|semantic-health|buyer-fit
|
|
504
600
|
|
|
601
|
+
cited credits prices ← Prices and packs (no login; 1 credit = $1)
|
|
602
|
+
cited credits balance|history [--limit N]
|
|
603
|
+
cited credits buy PACK_ID [--no-save-card] ← Checkout link for a pack
|
|
604
|
+
cited credits buy-audit ← $15 checkout link for one audit
|
|
605
|
+
cited credits refund [--yes] ← Refund unused credits (last 30 days)
|
|
606
|
+
cited credits redeem CODE ← Redeem a voucher code for free credits
|
|
607
|
+
cited credits auto-refill --on|--off [--pack PACK_ID] [--cap USD]
|
|
608
|
+
|
|
609
|
+
cited docs search|get ← Search and read the public docs (no login)
|
|
610
|
+
|
|
505
611
|
cited job watch|cancel
|
|
506
612
|
```
|
|
507
613
|
|
|
@@ -521,7 +627,8 @@ cited config set output json # or "text" (default)
|
|
|
521
627
|
# Set a default business (used by commands that accept --business)
|
|
522
628
|
cited config set default_business_id <uuid>
|
|
523
629
|
|
|
524
|
-
#
|
|
630
|
+
# Use an agent API key instead of `cited login` (sent as X-Agent-API-Key on every
|
|
631
|
+
# request; `cited agent signup` saves one for you). A login session takes precedence.
|
|
525
632
|
cited config set agent_api_key <key>
|
|
526
633
|
|
|
527
634
|
# Inspect current config
|
|
@@ -565,6 +672,7 @@ Errors always go to **stderr** as `{"error": true, "message": "..."}` so they ne
|
|
|
565
672
|
| 3 | Not found |
|
|
566
673
|
| 4 | Validation error |
|
|
567
674
|
| 5 | Rate limited |
|
|
675
|
+
| 6 | Payment required (not enough credits, or no purchase yet) |
|
|
568
676
|
|
|
569
677
|
---
|
|
570
678
|
|
|
@@ -580,7 +688,7 @@ mypy src/cited_cli/ --ignore-missing-imports
|
|
|
580
688
|
|
|
581
689
|
### MCP test harness
|
|
582
690
|
|
|
583
|
-
`scripts/mcp_test_harness.py` runs an end-to-end test suite against the deployed MCP server (dev or prod). Exercises the four-PR-plan test cases — `tools_fingerprint` on `ping`, `whats_new` lookups, `
|
|
691
|
+
`scripts/mcp_test_harness.py` runs an end-to-end test suite against the deployed MCP server (dev or prod). Exercises the four-PR-plan test cases — `tools_fingerprint` on `ping`, `whats_new` lookups, read-only credits tools (`get_prices`, `get_credits`), `tool_unavailable` error shape — plus auth/host-header/rate-limit/cross-env/`robots.txt` regression checks.
|
|
584
692
|
|
|
585
693
|
```bash
|
|
586
694
|
./scripts/mcp_test_harness.py --env dev # mcpdev.youcited.com
|
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cited-cli
|
|
3
|
-
Version: 0.5.1
|
|
4
|
-
Summary: CLI for the Cited GEO platform
|
|
5
|
-
Author-email: Cited <support@youcited.com>
|
|
6
|
-
License-Expression: LicenseRef-Proprietary
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Python: >=3.11
|
|
9
|
-
Requires-Dist: cited-core>=0.5.1
|
|
10
|
-
Requires-Dist: rich>=13.0.0
|
|
11
|
-
Requires-Dist: typer>=0.15.0
|
|
12
|
-
Provides-Extra: dev
|
|
13
|
-
Requires-Dist: cited-mcp>=0.5.1; extra == 'dev'
|
|
14
|
-
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
15
|
-
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
16
|
-
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
17
|
-
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
18
|
-
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
|
|
19
|
-
Provides-Extra: mcp
|
|
20
|
-
Requires-Dist: cited-mcp>=0.5.1; extra == 'mcp'
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
1
|
# Cited CLI
|
|
24
2
|
|
|
25
3
|
Command-line interface for the [Cited](https://youcited.com) GEO (Generative Engine Optimization) platform. Audit how often your business is cited by AI assistants, generate recommendations, and produce AI-ready content solutions — all from the terminal or a Python script.
|
|
26
4
|
|
|
5
|
+
## For AI agents
|
|
6
|
+
|
|
7
|
+
- **Free audit, no login:** call the `free_audit` MCP tool (or run `cited audit free example.com`) to see how often ChatGPT, Perplexity and Google AI cite a site, and who they cite instead.
|
|
8
|
+
- **MCP server:** `https://mcp.youcited.com/mcp` (streamable HTTP, OAuth login on first use). Also on PyPI as [`cited-mcp`](https://pypi.org/project/cited-mcp/) for local stdio.
|
|
9
|
+
- **One-command setup:** `cited agent setup` connects Claude Code, Cursor and Codex (and prints the Claude Desktop connector steps). Add `--dry-run` to preview.
|
|
10
|
+
- **Docs:** `search_docs` / `get_doc` tools, or `cited docs search "<question>"`, search the public [Cited docs](https://youcited.com/docs) without a login.
|
|
11
|
+
|
|
27
12
|
## Installation
|
|
28
13
|
|
|
29
14
|
### Homebrew (recommended)
|
|
@@ -95,7 +80,30 @@ cited register --email you@example.com --name "Your Name" --password "Secret123!
|
|
|
95
80
|
|
|
96
81
|
## MCP Server
|
|
97
82
|
|
|
98
|
-
This repo also includes `cited-mcp`, a [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes
|
|
83
|
+
This repo also includes `cited-mcp`, a [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes 88 tools for AI assistants like Claude. It lets Claude manage businesses, run GEO audits, generate recommendations, work a prioritized action plan, verify fixes via the Validation Engine, and create solutions on your behalf.
|
|
84
|
+
|
|
85
|
+
### Quick setup
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
cited agent setup # configure every AI client found on this machine
|
|
89
|
+
cited agent setup --dry-run # preview the changes first
|
|
90
|
+
cited agent setup --client cursor --yes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`cited agent setup` merges into your existing config (it never replaces an existing `cited` entry), backs up any file it changes, and supports `--client claude-code|claude-desktop|cursor|codex|all`, `--dry-run`, `--yes` and `--json`. The manual steps for each client follow.
|
|
94
|
+
|
|
95
|
+
### Claude Code
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
claude mcp add --transport http --scope user cited https://mcp.youcited.com/mcp
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Then run `/mcp` in Claude Code and choose **Authenticate**. For Cited slash commands, skills and the `geo-analyst` agent, also install the plugin:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/plugin marketplace add YouCited/cited-plugins
|
|
105
|
+
/plugin install cited@youcited-cited-plugins
|
|
106
|
+
```
|
|
99
107
|
|
|
100
108
|
### Claude Desktop (Custom Connector — recommended)
|
|
101
109
|
|
|
@@ -149,7 +157,21 @@ Get your token with `cited login` then `cited auth token`.
|
|
|
149
157
|
|
|
150
158
|
### Cursor
|
|
151
159
|
|
|
152
|
-
Add
|
|
160
|
+
Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in your project root — or run `cited agent setup --client cursor`:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"mcpServers": {
|
|
165
|
+
"cited": {
|
|
166
|
+
"url": "https://mcp.youcited.com/mcp"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Open Settings (`Cmd+,`) → **MCP**, click **Login** next to `cited`, and verify it shows a green status. Use tools in Agent mode.
|
|
173
|
+
|
|
174
|
+
**Fallback** (older Cursor versions without remote-server support) — proxy through [`mcp-remote`](https://www.npmjs.com/package/mcp-remote), which needs Node.js:
|
|
153
175
|
|
|
154
176
|
```json
|
|
155
177
|
{
|
|
@@ -162,9 +184,14 @@ Add a `.cursor/mcp.json` file to your project root (or `~/.cursor/mcp.json` for
|
|
|
162
184
|
}
|
|
163
185
|
```
|
|
164
186
|
|
|
165
|
-
|
|
187
|
+
### Codex
|
|
166
188
|
|
|
167
|
-
|
|
189
|
+
```bash
|
|
190
|
+
codex mcp add cited --url https://mcp.youcited.com/mcp
|
|
191
|
+
codex mcp login cited
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Or add `[mcp_servers.cited]` with `url = "https://mcp.youcited.com/mcp"` to `~/.codex/config.toml` (`cited agent setup --client codex` does this for you).
|
|
168
195
|
|
|
169
196
|
### Updating to new Cited features
|
|
170
197
|
|
|
@@ -183,6 +210,9 @@ Claude will chain the tools automatically — `list_businesses` → `start_audit
|
|
|
183
210
|
| Category | Tools |
|
|
184
211
|
|----------|-------|
|
|
185
212
|
| **Auth** | `check_auth_status`, `login`, `logout` |
|
|
213
|
+
| **Credits** | `get_prices`, `get_credits`, `credit_history`, `buy_credits`, `buy_audit`, `request_refund`, `redeem_voucher`, `set_auto_refill`, `quote_audit` |
|
|
214
|
+
| **Agent signup & keys** | `agent_signup`, `key_status`, `list_api_keys`, `revoke_api_key` |
|
|
215
|
+
| **No login needed** | `free_audit`, `search_docs`, `get_doc`, `get_prices`, `agent_signup` |
|
|
186
216
|
| **Businesses** | `list_businesses`, `get_business`, `create_business`, `update_business`, `delete_business`, `crawl_business`, `get_health_scores`, `get_usage_stats` |
|
|
187
217
|
| **Audit Templates** | `list_audit_templates`, `get_audit_template`, `create_audit_template`, `update_audit_template`, `delete_audit_template` |
|
|
188
218
|
| **Audits** | `start_audit`, `get_audit_status`, `get_audit_result`, `list_audits`, `export_audit` |
|
|
@@ -196,6 +226,16 @@ Claude will chain the tools automatically — `list_businesses` → `start_audit
|
|
|
196
226
|
|
|
197
227
|
See [`packages/mcp/README.md`](packages/mcp/README.md) for full details, environment variables, and development instructions.
|
|
198
228
|
|
|
229
|
+
### Pricing: pay-as-you-go credits
|
|
230
|
+
|
|
231
|
+
No plans or tiers: every command and tool works on every account, and work is paid with
|
|
232
|
+
credits (1 credit = $1). A standard audit is 10 credits (`cited audit quote` shows the exact
|
|
233
|
+
cost); a one-off audit is $15 (`cited credits buy-audit`); packs (`cited credits buy pack_20`)
|
|
234
|
+
need a claimed account. Purchases print a Stripe checkout link for a person to open.
|
|
235
|
+
|
|
236
|
+
An AI agent with no account can run `cited agent signup` (or call the `agent_signup` tool) to
|
|
237
|
+
get its own API key on an unclaimed account, then give its human the claim link and code.
|
|
238
|
+
|
|
199
239
|
---
|
|
200
240
|
|
|
201
241
|
## Global Flags
|
|
@@ -372,6 +412,13 @@ TEMPLATE_ID=$(cited --json audit template create \
|
|
|
372
412
|
AUDIT_JOB=$(cited --json audit start $TEMPLATE_ID | jq -r '.job_id')
|
|
373
413
|
cited job watch $AUDIT_JOB
|
|
374
414
|
|
|
415
|
+
# Optional: compare specific models side by side (see `cited audit models`)
|
|
416
|
+
CMP_JOB=$(cited --json audit start $TEMPLATE_ID \
|
|
417
|
+
--model anthropic:claude-sonnet-5-5 --model anthropic:claude-opus-5-5 \
|
|
418
|
+
--model openai:gpt-5.2 | jq -r '.job_id')
|
|
419
|
+
cited job watch $CMP_JOB
|
|
420
|
+
cited audit models $CMP_JOB
|
|
421
|
+
|
|
375
422
|
RECO_JOB=$(cited --json recommend start $AUDIT_JOB | jq -r '.job_id')
|
|
376
423
|
cited job watch $RECO_JOB
|
|
377
424
|
|
|
@@ -511,7 +558,9 @@ cited config set|get|show|environments
|
|
|
511
558
|
cited business list|get|create|update|delete|health|crawl
|
|
512
559
|
|
|
513
560
|
cited audit template list|get|create|update|delete ← Manage audit templates
|
|
561
|
+
cited audit quote TEMPLATE_ID [--model ...] ← Credits an audit will cost
|
|
514
562
|
cited audit start|status|result|list|export ← Run and inspect audits
|
|
563
|
+
cited audit models [JOB_ID] ← Compare AI models (or list choices)
|
|
515
564
|
|
|
516
565
|
cited recommend start|status|result|list ← Generate recommendations
|
|
517
566
|
cited recommend insights ← View actionable source table
|
|
@@ -522,8 +571,21 @@ cited hq <business_id> [--full] [--personas] [--products] [--intents] [--actions
|
|
|
522
571
|
|
|
523
572
|
cited analytics compare|trends|summary
|
|
524
573
|
|
|
574
|
+
cited agent setup ← Connect Claude Code / Cursor / Codex / Claude Desktop
|
|
575
|
+
cited agent signup [--name] [--email] ← Account + API key for an AI agent (no login)
|
|
576
|
+
cited agent key-status|keys|revoke KEY_ID ← Inspect and revoke agent keys
|
|
525
577
|
cited agent facts|claims|comparison|semantic-health|buyer-fit
|
|
526
578
|
|
|
579
|
+
cited credits prices ← Prices and packs (no login; 1 credit = $1)
|
|
580
|
+
cited credits balance|history [--limit N]
|
|
581
|
+
cited credits buy PACK_ID [--no-save-card] ← Checkout link for a pack
|
|
582
|
+
cited credits buy-audit ← $15 checkout link for one audit
|
|
583
|
+
cited credits refund [--yes] ← Refund unused credits (last 30 days)
|
|
584
|
+
cited credits redeem CODE ← Redeem a voucher code for free credits
|
|
585
|
+
cited credits auto-refill --on|--off [--pack PACK_ID] [--cap USD]
|
|
586
|
+
|
|
587
|
+
cited docs search|get ← Search and read the public docs (no login)
|
|
588
|
+
|
|
527
589
|
cited job watch|cancel
|
|
528
590
|
```
|
|
529
591
|
|
|
@@ -543,7 +605,8 @@ cited config set output json # or "text" (default)
|
|
|
543
605
|
# Set a default business (used by commands that accept --business)
|
|
544
606
|
cited config set default_business_id <uuid>
|
|
545
607
|
|
|
546
|
-
#
|
|
608
|
+
# Use an agent API key instead of `cited login` (sent as X-Agent-API-Key on every
|
|
609
|
+
# request; `cited agent signup` saves one for you). A login session takes precedence.
|
|
547
610
|
cited config set agent_api_key <key>
|
|
548
611
|
|
|
549
612
|
# Inspect current config
|
|
@@ -587,6 +650,7 @@ Errors always go to **stderr** as `{"error": true, "message": "..."}` so they ne
|
|
|
587
650
|
| 3 | Not found |
|
|
588
651
|
| 4 | Validation error |
|
|
589
652
|
| 5 | Rate limited |
|
|
653
|
+
| 6 | Payment required (not enough credits, or no purchase yet) |
|
|
590
654
|
|
|
591
655
|
---
|
|
592
656
|
|
|
@@ -602,7 +666,7 @@ mypy src/cited_cli/ --ignore-missing-imports
|
|
|
602
666
|
|
|
603
667
|
### MCP test harness
|
|
604
668
|
|
|
605
|
-
`scripts/mcp_test_harness.py` runs an end-to-end test suite against the deployed MCP server (dev or prod). Exercises the four-PR-plan test cases — `tools_fingerprint` on `ping`, `whats_new` lookups, `
|
|
669
|
+
`scripts/mcp_test_harness.py` runs an end-to-end test suite against the deployed MCP server (dev or prod). Exercises the four-PR-plan test cases — `tools_fingerprint` on `ping`, `whats_new` lookups, read-only credits tools (`get_prices`, `get_credits`), `tool_unavailable` error shape — plus auth/host-header/rate-limit/cross-env/`robots.txt` regression checks.
|
|
606
670
|
|
|
607
671
|
```bash
|
|
608
672
|
./scripts/mcp_test_harness.py --env dev # mcpdev.youcited.com
|
|
@@ -49,10 +49,14 @@ This opens `claude_desktop_config.json`. Add the `mcpServers` section:
|
|
|
49
49
|
|
|
50
50
|
Save the file, then quit and reopen Claude Desktop (Cmd+Q on Mac, or close fully on Windows).
|
|
51
51
|
|
|
52
|
+
> **Shortcut:** if you have the [Cited CLI](https://github.com/YouCited/cited-cli) installed, `cited agent setup --client claude-desktop --desktop-config` adds this entry for you (it merges into your existing config and backs the file up first). Use either the connector (Option A) or this config, not both — otherwise Cited's tools appear twice.
|
|
53
|
+
|
|
52
54
|
## Try It Out
|
|
53
55
|
|
|
54
56
|
Start a new conversation in Claude Desktop and try any of these:
|
|
55
57
|
|
|
58
|
+
- **"Run a free Cited audit of example.com"** — works before you log in
|
|
59
|
+
|
|
56
60
|
- **"List my businesses"** — shows all your businesses on Cited
|
|
57
61
|
- **"Run a GEO audit on [business name]"** — audits your AI search presence
|
|
58
62
|
- **"Check my Cited account status"** — verifies you're connected
|
|
@@ -83,6 +87,6 @@ Once connected, Claude can:
|
|
|
83
87
|
- **Generate recommendations** — get actionable insights to improve your AI search visibility
|
|
84
88
|
- **Create solutions** — detailed implementation steps for each recommendation
|
|
85
89
|
- **Check health scores** — see your overall GEO health at a glance
|
|
86
|
-
- **Monitor usage** — check
|
|
90
|
+
- **Monitor usage** — check your credit balance and account statistics
|
|
87
91
|
|
|
88
92
|
Just ask Claude in plain English — no commands to memorize.
|
|
@@ -9,7 +9,7 @@ Use the Cited MCP tools to create a new business and prepare it for GEO auditing
|
|
|
9
9
|
|
|
10
10
|
## Steps
|
|
11
11
|
|
|
12
|
-
1. **Verify auth**: Call `check_auth_status` to confirm the user is logged in.
|
|
12
|
+
1. **Verify auth**: Call `check_auth_status` to confirm the user is logged in. If there are no credentials and the user has no account, `agent_signup` creates one for the agent (1 business until a person claims it); show the user the claim link and code it returns.
|
|
13
13
|
|
|
14
14
|
2. **Create business**: Call `create_business` with:
|
|
15
15
|
- `name`: Business name
|
|
@@ -7,7 +7,7 @@ description: Ad-hoc tool exploration beyond the standard audit flow — diagnost
|
|
|
7
7
|
|
|
8
8
|
The standard pipeline is `cited:business-setup` → `cited:geo-audit` → `cited:geo-recommend`. This skill covers the fourteen tools that DON'T fit that pipeline — diagnostics, deltas, intel surfaces, ad-hoc probes, and Validation Engine fix-verification — so you can answer "what changed since last week," "what does Cited know about this business," "would AI recommend us for X," and "did my fix actually land" without burning a fresh audit.
|
|
9
9
|
|
|
10
|
-
If a tool returns `payment_required: true`
|
|
10
|
+
If a tool returns `payment_required: true` (HTTP 402: `insufficient_credits` or `purchase_required`), tell the user, show them the `buy_url` (or a checkout link from `buy_audit` / `buy_credits`), and retry after they pay. Don't pretend the result was empty.
|
|
11
11
|
|
|
12
12
|
## Per-tool reference
|
|
13
13
|
|
|
@@ -23,14 +23,14 @@ What to do with the response: `questions_comparison` is a per-question delta map
|
|
|
23
23
|
|
|
24
24
|
### cancel_job — recovery for hung or wrong-target jobs
|
|
25
25
|
|
|
26
|
-
When to use it: A `get_*_status` call shows a job has been "running" far longer than expected (audits typically 2-4 min, recommendations 1-2 min, solutions 30-60s) OR the user realizes the job was started against the wrong template/business. Cancelling
|
|
26
|
+
When to use it: A `get_*_status` call shows a job has been "running" far longer than expected (audits typically 2-4 min, recommendations 1-2 min, solutions 30-60s) OR the user realizes the job was started against the wrong template/business. Cancelling a failed or unwanted audit returns its credits.
|
|
27
27
|
|
|
28
28
|
Recipe:
|
|
29
29
|
1. `cancel_job(job_id=<id>)` — `job_type` auto-probes if omitted.
|
|
30
30
|
|
|
31
31
|
What to do with the response: `{success, job_type, message}` on success, or a not-found error. Confirm the cancellation by job_type ("audit cancelled," not just "cancelled") and tell the user they can start a fresh job.
|
|
32
32
|
|
|
33
|
-
### get_analytics_dashboard — combined analytics page
|
|
33
|
+
### get_analytics_dashboard — combined analytics page
|
|
34
34
|
|
|
35
35
|
When to use it: The user asks for an overview of AI search performance — KPIs, trends, top/declining questions, citation patterns, benchmarks. One call covers what the web Analytics page shows.
|
|
36
36
|
|
|
@@ -39,7 +39,7 @@ Recipe:
|
|
|
39
39
|
|
|
40
40
|
What to do with the response: Top-level fields are `kpi_trends` (time-series per KPI), `question_performance` (top + declining), `citation_trends` (match rates, domain diversity), `benchmarks` (vs. historical average), `domain_benchmarks` (per-domain severity). Lead the summary with `benchmarks` deltas; then the worst-trending KPI from `kpi_trends`; then the top declining questions.
|
|
41
41
|
|
|
42
|
-
### get_analytics_trends — KPI time series only
|
|
42
|
+
### get_analytics_trends — KPI time series only
|
|
43
43
|
|
|
44
44
|
When to use it: You only need the KPI time-series — e.g., for a chart, or to compute a custom trend. Cheaper than the dashboard if you don't need the rest.
|
|
45
45
|
|
|
@@ -48,16 +48,16 @@ Recipe:
|
|
|
48
48
|
|
|
49
49
|
What to do with the response: `periods` is the x-axis (ordered date labels). `kpi_trends` maps KPI name → list of values aligned with `periods`. `summary` has aggregate stats. Plot or summarize the largest delta first.
|
|
50
50
|
|
|
51
|
-
### get_business_facts — structured intel from the fact graph
|
|
51
|
+
### get_business_facts — structured intel from the fact graph
|
|
52
52
|
|
|
53
|
-
When to use it: The user asks "what does Cited know about [business]" or you need structured intel (locations, products, summary) without running an audit. Cheap, no
|
|
53
|
+
When to use it: The user asks "what does Cited know about [business]" or you need structured intel (locations, products, summary) without running an audit. Cheap, uses no credits. Pair with crawl_business if the data looks stale.
|
|
54
54
|
|
|
55
55
|
Recipe:
|
|
56
56
|
1. `get_business_facts(business_id=<biz_id>)`.
|
|
57
57
|
|
|
58
58
|
What to do with the response: `name`, `summary`, `locations`, `products`, `facts`. Surface `summary` as the headline. If `summary` is null AND `facts` is empty, the fact graph is thin — recommend running `crawl_business` to populate (see "Cold-start business intel" below).
|
|
59
59
|
|
|
60
|
-
### get_business_claims — verifiable claims with evidence
|
|
60
|
+
### get_business_claims — verifiable claims with evidence
|
|
61
61
|
|
|
62
62
|
When to use it: Auditing brand truth-in-advertising, or surfacing claims that need stronger evidence before they appear in AI summaries. Useful when prepping a product page or a press kit.
|
|
63
63
|
|
|
@@ -66,7 +66,7 @@ Recipe:
|
|
|
66
66
|
|
|
67
67
|
What to do with the response: `claims` is a list of statements with evidence references. Highlight claims with weak/absent evidence first — those are the ones to either substantiate or remove.
|
|
68
68
|
|
|
69
|
-
### get_business_hq — comprehensive dashboard
|
|
69
|
+
### get_business_hq — comprehensive dashboard
|
|
70
70
|
|
|
71
71
|
When to use it: The user wants a one-shot snapshot of an account — health scores, recent audits, recommendations, competitive position, top action items. Reach for this when summarizing an account holistically rather than answering a narrow question.
|
|
72
72
|
|
|
@@ -76,7 +76,7 @@ Recipe:
|
|
|
76
76
|
|
|
77
77
|
What to do with the response: Lead with `health_scores` (5 core scores: brand_confidence, crawl_coverage, ai_readiness, buyer_clarity, trust_score) and `priority_actions` — those tell the user what's wrong and what to fix. `recent_audits` and `recommendations` for activity context. `top_competitors` and `displacement` for competitive context. `agentic_readiness` if the user is asking specifically about AI-agent visibility.
|
|
78
78
|
|
|
79
|
-
### get_competitive_comparison — strengths/weaknesses vs competitors
|
|
79
|
+
### get_competitive_comparison — strengths/weaknesses vs competitors
|
|
80
80
|
|
|
81
81
|
When to use it: Mid-conversation, the user asks "how do we stack up against X." Pulls existing competitive analysis without running new prompts.
|
|
82
82
|
|
|
@@ -85,7 +85,7 @@ Recipe:
|
|
|
85
85
|
|
|
86
86
|
What to do with the response: `competitors` (named competitor entities), `strengths` (top 5-10 wins), `weaknesses` (top 5-10 gaps), `market_intelligence` (supporting observations). Lead with weaknesses if the user is looking for what to fix; lead with strengths if they're pitching/positioning.
|
|
87
87
|
|
|
88
|
-
### get_semantic_health — AI-readability diagnostics
|
|
88
|
+
### get_semantic_health — AI-readability diagnostics
|
|
89
89
|
|
|
90
90
|
When to use it: The user wants to know what to fix to be more discoverable to AI engines. Returns structured diagnostics rather than free-text recommendations.
|
|
91
91
|
|
|
@@ -94,7 +94,7 @@ Recipe:
|
|
|
94
94
|
|
|
95
95
|
What to do with the response: `entity_grounding`, `schema_coverage`, `faq_coverage`, `claim_evidence_coverage` are coverage diagnostics — surface the lowest-coverage area first as the priority fix. `trust_signals` is a list of finding+confidence entries.
|
|
96
96
|
|
|
97
|
-
### buyer_fit_query — ad-hoc fit simulation
|
|
97
|
+
### buyer_fit_query — ad-hoc fit simulation
|
|
98
98
|
|
|
99
99
|
When to use it: "Would AI recommend us for X" probes — testing positioning before committing to a full audit, or evaluating a new buyer profile. Faster and cheaper than a full audit; doesn't update the business record.
|
|
100
100
|
|
|
@@ -116,7 +116,7 @@ What to do with the response:
|
|
|
116
116
|
- `get_recommendation_validation_latest`: `status` is the headline — `valid` (fix landed), `invalid` (still missing), `inconclusive` (couldn't verify, often crawler-blocked). `evidence.message` has detail.
|
|
117
117
|
- `get_recommendation_check_status`: lead with `counts` (X valid / Y invalid / Z inconclusive), then surface the invalid checks first — those are the unfixed gaps. Inconclusive results often mean the site blocked the crawler; mention that as a possibility before assuming the fix is broken.
|
|
118
118
|
|
|
119
|
-
### export_audit — share the report outside MCP
|
|
119
|
+
### export_audit — share the report outside MCP
|
|
120
120
|
|
|
121
121
|
When to use it: The user wants to forward, attach, or archive the audit as a PDF.
|
|
122
122
|
|