> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# praisonai connect

> One command installs PraisonAI's MCP server into 22 editors and coding agents — with backup, handshake check, and scoped tools

Connect your PraisonAI agents and tools to Cursor, VS Code, Claude Code, Claude Desktop, Codex, Gemini CLI, Windsurf, Zed, Antigravity, and 13 more MCP clients in one command — without hand-editing JSON or TOML configs.

> [!NOTE]
>
> Looking for the **reverse direction** — connecting external SaaS services like GitHub, Linear, Notion, or Stripe *into* your PraisonAI agents? Use [`praisonai connectors`](https://praison.ai/docs/features/connectors) instead.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(name="Assistant", instructions="Help answer questions from any connected editor.")
agent.start("Verify my project setup")
```

Run `praisonai connect <client>` and this agent is wired into your editor as an MCP server, verified with a real `initialize` + `tools/list` handshake.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "praisonai connect"
        Cmd[⌨️ praisonai connect cursor] --> Plan[📝 Diff + .praisonai.bak]
        Plan --> Write[⚙️ Atomic Config Update]
        Write --> Check[🔍 MCP Handshake]
        Check --> Ready[✅ N tools ready]
    end

    classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef check fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef ok fill:#10B981,stroke:#7C90A0,color:#fff

    class Cmd input
    class Plan,Write process
    class Check check
    class Ready ok
```

## Quick Start

**1. Install praisonai-mcp**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "praisonai[mcp]"
# or standalone:
pip install praisonai-mcp
```

**2. Check detected clients**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai connect
```

Shows a status table across all 22 supported clients: `installed`, `connected`, or `not installed`, plus **last active** from the local `connections.json` ledger (nothing leaves your machine).

**3. Connect one or all editors**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai connect cursor                                        # writes ~/.cursor/mcp.json + verifies tools
praisonai connect --all                                         # every installed client
praisonai connect codex --agents agents.yaml --tools 'ask_*'    # scope to specific agents/tools
praisonai connect cursor --print                                # print deep link, CLI command, and JSON (no write)
praisonai connect --remove                                      # remove the praisonai entry everywhere
```

***

## How It Works

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant CLI as praisonai connect
    participant Config as Editor Config
    participant Server as praisonai-mcp

    User->>CLI: praisonai connect cursor
    CLI->>Config: Backup (.praisonai.bak) + atomic write of praisonai entry
    CLI->>Server: MCP initialize + paginated tools/list
    Server-->>CLI: N tools ready
    CLI-->>User: Connected (N tools ready)
```

| Capability | Behaviour |
| - | - |
| **Idempotent & safe writes** | Keeps a `.praisonai.bak` backup, writes atomically, and edits only the `praisonai` entry (preserving TOML comments and other MCP servers). |
| **Zero secrets written** | API keys stay out of client configs; set keys are referenced in each client's native env syntax (`${env:OPENAI_API_KEY}`, `${OPENAI_API_KEY}`, Codex `env_vars`). |
| **Live handshake check** | After writing, runs a real MCP `initialize` + `tools/list` against the exact configured command and reports `"N tools ready"`. |
| **Consistent scoping** | `--tools 'ask_*,list_agents'` and `--agents agents.yaml` are baked into server arguments, so scoping holds across every client including one-click deep links. |
| **Remote servers** | Pass `--url https://agents.example.com/mcp` to connect to a remote HTTP-stream server (warns when a cloud-hosted client cannot reach `localhost`). |
| **UI catalog** | `praisonai_mcp.connect.export_catalog(spec)` exports the same client catalog as JSON for the **Connect** sidebar page in `praisonai dashboard` / `praisonai ui`. |

***

## Supported Clients (22 + Generic)

| Group | Clients |
| - | - |
| **Editors (12)** | `cursor`, `vscode`, `vscode-insiders`, `windsurf`, `claude-desktop`, `zed`, `kiro`, `antigravity`, `trae`, `junie`, `cline`, `continue` |
| **Terminal agents (6)** | `claude-code`, `codex`, `gemini-cli`, `copilot-cli`, `opencode`, `amp` |
| **Other (4)** | `goose`, `raycast`, `chatgpt`, `lm-studio` |
| **Generic** | `any` — prints a paste-ready snippet for any MCP-compatible client |

***

## Best Practices

> [accordion] Preview with --print before editing shared configs
>
> Run `praisonai connect <client> --print` to inspect the one-click deep link, vendor CLI command, and JSON/TOML snippet without modifying files on disk.

> [accordion] Scope exposed tools in team environments
>
> Pass `--agents agents.yaml --tools 'ask_*,list_agents'` so connected editors see only the agents and tools you intend to expose.

> [accordion] Use OAuth 2.1 when connecting to a remote URL
>
> When passing `--url` to a remote `praisonai mcp serve --transport http-stream` server, pair it with [MCP Server OAuth 2.1](https://praison.ai/docs/features/mcp-server-oauth.md) so editors sign in automatically without sharing static API keys.

***

## Related

> [card] [MCP Server OAuth 2.1](https://praison.ai/docs/features/mcp-server-oauth.md)
>
> Built-in OAuth 2.1 sign-in for remote praisonai mcp serve

> [card] [praisonai-mcp Package](https://praison.ai/docs/features/praisonai-mcp-package.md)
>
> Install extras, host commands, and three MCP layers

> [card] [MCP from Config](https://praison.ai/docs/features/mcp-from-config.md)
>
> Reuse editor mcpServers blocks inside Python agents

> [card] [PraisonAI Dashboard](https://praison.ai/docs/ui/claw.md)
>
> Built-in Connect sidebar page in the web dashboard


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.