# VertexCRM — AI tools (Cursor, Claude Code, Codex, ChatGPT)

Use these blocks as-is. Replace `vcr_YOUR_KEY` with a key from **Setup → API Keys**. Never commit the key.

Human UI: https://www.vertexcrm.in/developers  
Markdown: https://www.vertexcrm.in/developers.md  
LLM index: https://www.vertexcrm.in/llms.txt  
OpenAPI: https://www.vertexcrm.in/openapi.json  
MCP (public docs): https://www.vertexcrm.in/mcp

---

## 1. Copy markdown (any chat)

In Cursor / Claude / ChatGPT / Codex, paste:

```
Read https://www.vertexcrm.in/llms.txt and https://www.vertexcrm.in/developers.md then https://www.vertexcrm.in/openapi.json.
Integrate VertexCRM using Authorization: Bearer vcr_YOUR_KEY against https://www.vertexcrm.in/api/v1.
Follow picklists and pagination (per_page=20) exactly. Do not invent Inbox or WhatsApp routes.
```

Or paste the full prompt: https://www.vertexcrm.in/developers/prompt.md

---

## 2. Cursor

### 2.1 @-mention docs (no MCP)

1. Settings → Indexing / Docs → add `https://www.vertexcrm.in/developers.md` and `https://www.vertexcrm.in/llms.txt`.
2. In chat: `@VertexCRM` or paste the prompt above.

### 2.2 Project rule

Save as `.cursor/rules/vertexcrm.mdc` (or paste into Cursor Rules):

```markdown
---
description: VertexCRM public API
alwaysApply: false
---

When integrating VertexCRM, fetch https://www.vertexcrm.in/developers.md and https://www.vertexcrm.in/openapi.json first.
Auth: Bearer vcr_… Base: /api/v1. Objects: accounts, contacts, leads, opportunities, cases only.
Lists: page, per_page=20. Lead statuses use the long Salesforce-style strings.
```

### 2.3 MCP — live CRM (stdio)

Install the binary from this repo (`go install ./cmd/vertexcrm-mcp`) or `go run`.

`~/.cursor/mcp.json` or project `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "vertexcrm": {
      "command": "vertexcrm-mcp",
      "args": [],
      "env": {
        "VERTEXCRM_BASE_URL": "https://www.vertexcrm.in",
        "VERTEXCRM_API_KEY": "vcr_YOUR_KEY"
      }
    }
  }
}
```

### 2.4 MCP — docs only (HTTP, no key)

```json
{
  "mcpServers": {
    "vertexcrm-docs": {
      "url": "https://www.vertexcrm.in/mcp"
    }
  }
}
```

---

## 3. Claude Code

```bash
# Docs MCP (no secret)
claude mcp add --transport http vertexcrm-docs https://www.vertexcrm.in/mcp

# Live CRM (needs a key; run from a machine that has the binary on PATH)
claude mcp add vertexcrm --env VERTEXCRM_API_KEY=vcr_YOUR_KEY --env VERTEXCRM_BASE_URL=https://www.vertexcrm.in -- vertexcrm-mcp
```

Project `CLAUDE.md` snippet:

```markdown
## VertexCRM
Read https://www.vertexcrm.in/llms.txt and https://www.vertexcrm.in/developers.md before writing API clients.
Skill: https://www.vertexcrm.in/developers/skill.md
```

Optional: save `docs/developers/SKILL.md` into `.claude/skills/vertexcrm/SKILL.md`.

---

## 4. OpenAI Codex / ChatGPT

`AGENTS.md` or custom instructions:

```markdown
VertexCRM API: https://www.vertexcrm.in/developers.md
LLM index: https://www.vertexcrm.in/llms.txt
OpenAPI: https://www.vertexcrm.in/openapi.json
Auth header: Authorization: Bearer vcr_…
```

ChatGPT: upload `developers.md` or say “fetch https://www.vertexcrm.in/llms-full.txt”.

---

## 5. Other agents (Windsurf, Cline, Continue, Aider)

Point the tool’s docs / context URL at:

- https://www.vertexcrm.in/llms-full.txt
- https://www.vertexcrm.in/openapi.json

Or run `vertexcrm-mcp` as a stdio MCP server (same env vars as Cursor).

---

## 6. Hosted MCP tools (https://www.vertexcrm.in/mcp)

Public, no API key. Tools:

| Tool | Purpose |
|------|---------|
| `get_docs` | `public-api` \| `ai-tools` \| `prompt` \| `skill` \| `llms` \| `openapi` |
| `search_docs` | keyword search over the integrator docs |

Live tenant reads/writes are **not** on the hosted MCP. Use `vertexcrm-mcp` + `VERTEXCRM_API_KEY`.

---

## 7. `vertexcrm-mcp` live tools

When `VERTEXCRM_API_KEY` is set:

- `list_accounts`, `get_account`, `create_account`
- `list_contacts`, `get_contact`, `create_contact`
- `list_leads`, `get_lead`, `create_lead`
- `list_opportunities`, `get_opportunity`, `create_opportunity`
- `list_cases`, `get_case`, `create_case`
- plus the same `get_docs` / `search_docs` as hosted MCP

```bash
export VERTEXCRM_BASE_URL=https://www.vertexcrm.in
export VERTEXCRM_API_KEY=vcr_YOUR_KEY
go run ./cmd/vertexcrm-mcp
```
