Skip to main content
Glama
README.md
# marketifyall-mcp

Stdio ⇄ Streamable-HTTP bridge that connects any local MCP client (Claude Code, Codex CLI, Gemini CLI, …) to a [MarketifyALL](https://app.marketifyall.com) workspace.

MarketifyALL exposes its capability layer as a hosted MCP server at `https://app.marketifyall.com/api/mcp` (Streamable HTTP, bearer-token auth). Clients with native remote-MCP support can connect to that URL directly — this bridge is the universal-compatibility fallback for clients that only speak stdio.

## How it works

```
┌────────────────┐   stdio    ┌───────────────┐   HTTPS (Streamable HTTP)    ┌────────────────────────────┐
│  MCP client    │ ─────────► │  this bridge  │ ───────────────────────────► │ app.marketifyall.com/api/  │
│  (Claude Code, │ ◄───────── │   (~40 LOC)   │   Authorization: Bearer …    │ mcp — capability MCP server│
│   Codex, …)    │            └───────────────┘                              └────────────────────────────┘
└────────────────┘
```

The bridge is deliberately thin: it opens one upstream connection to the hosted server and proxies `tools/list` and `tools/call` through 1:1. No tool logic lives here — every capability, schema, and permission decision stays server-side, so the bridge never goes stale when the workspace gains new tools.

On the hosted side, tools are generated from a scope-filtered capability registry (Zod schemas become MCP tool schemas at registration time). Clients see a small advertised tier plus two discovery tools — `search_capabilities` and `invoke_capability` — so the long tail of capabilities is discoverable on demand instead of flooding the client's context with every tool definition up front.

## Safety model

MCP clients can act with real consequences (posting content, sending email), so the hosted server enforces a graduated model:

- **Reads are free** — listing content, searching, fetching drafts.
- **Generation costs workspace credits** — drafting posts, emails, SEO metadata.
- **Publishing and sending are never executed directly** — those calls create a *pending action* that a human approves in the MarketifyALL Command Center. The agent proposes; the user disposes.

## Usage

Requires Node.js 18+ and a MarketifyALL account.

1. Create a token in **MarketifyALL → Settings → MCP Tokens**.
2. Clone and run:

```bash
git clone https://github.com/Aadilhassan/marketifyall-mcp.git
cd marketifyall-mcp
MARKETIFYALL_TOKEN=mk_live_... npx -y tsx index.ts
```

3. Or register it with your MCP client, e.g. in `.mcp.json`:

```json
{
  "mcpServers": {
    "marketifyall": {
      "command": "npx",
      "args": ["-y", "tsx", "/path/to/marketifyall-mcp/index.ts"],
      "env": { "MARKETIFYALL_TOKEN": "mk_live_..." }
    }
  }
}
```

### Configuration

| Env var | Required | Description |
|---|---|---|
| `MARKETIFYALL_TOKEN` | yes | Bearer token created in MarketifyALL settings |
| `MARKETIFYALL_MCP_URL` | no | Override the endpoint (e.g. `http://localhost:3000/api/mcp` for local development) |

## Status

Extracted from the MarketifyALL monorepo. Publishing to npm as `@marketifyall/mcp` is planned; until then, run from source as above.

## License

MIT © Aadil Hassan