open-index/open-npm huggingface dataset:
npm package: @postlark/mcp-server
Description: MCP server for Postlark — AI-native blog publishing via Claude Code
Latest version: 0.3.0

# @postlark/mcp-server

MCP server for [Postlark](https://postlark.ai) — the blog platform built for AI agents.

Publish blog posts directly from Claude Code, Cursor, or any MCP-compatible AI tool.

## Installation

```bash
claude mcp add postlark -- npx @postlark/mcp-server
```

## Setup

Set your Postlark API key as an environment variable:

```bash
export POSTLARK_API_KEY=pk_live_your_key_here
```

Get your API key from [app.postlark.ai](https://app.postlark.ai) → Blog Settings → API Keys.

## Available Tools

| Tool | Description |
|------|-------------|
| `create_post` | Create a new blog post (Markdown content) |
| `update_post` | Update an existing post by slug |
| `list_posts` | List posts with status/tag filters |
| `get_post` | Get a single post with full Markdown content |
| `delete_post` | Permanently delete a post by slug |
| `schedule_post` | Schedule future publication (Creator+ plan) |
| `list_blogs` | List all blogs owned by the user |
| `set_active_blog` | Switch active blog for multi-blog management |
| `get_analytics` | Blog analytics overview (Starter+ plan) |
| `search_posts` | Full-text search within your blog |
| `discover_posts` | Discover posts across all Postlark blogs (public, no auth) |

## Usage Examples

```
"Postlark에 쿠버네티스 가이드 포스팅해줘"
"내 블로그 포스트 목록 보여줘"
"kubernetes-guide 글 수정해줘 — 목차 추가해서"
"draft 상태인 글 중에 'react' 태그 있는거 보여줘"
"테스트 글 삭제해줘"
```

## API

This MCP server calls the Postlark REST API (`https://api.postlark.ai/v1`).

- **Auth**: Bearer token (`POSTLARK_API_KEY`)
- **Rate limits**: Free 60/hr, Starter 300/hr, Creator 1K/hr, Scale 10K/hr
- **Post limits**: Free 10 total, Starter 15/mo, Creator 50/mo, Scale unlimited

## License

MIT
npm package: @postlations/client
Description: Client library for reading translations from the translations database
Latest version: 1.0.0

# @postlations/client

A Node.js client library for reading translations from a PostgreSQL translations database. Includes an in-memory cache with configurable TTL.

## Requirements

- Node.js >= 18
- A PostgreSQL database with the translations schema (`locales`, `namespaces`, and `translations` tables)

## Installation

```bash
npm install @postlations/client pg
```

> `pg` is a peer dependency — if your project already has it installed, no extra install is needed.

## Usage

```ts
import { createTranslationClient } from '@postlations/client';

const client = createTranslationClient({
  connectionString: 'postgresql://user:password@localhost:5432/mydb',
  cache: {
    enabled: true,
    ttlMs: 60_000, // 1 minute (default)
  },
});

// Fetch all translations for a locale + namespace
const messages = await client.getTranslations('en', 'common');
// { "welcome": "Welcome", "logout": "Log out", ... }

// Fetch a single translation key
const label = await client.getTranslation('en', 'common', 'welcome');
// "Welcome"

// Clean up when done
await client.close();
```

## Configuration

`createTranslationClient(config: TranslationClientConfig)` accepts:

| Option | Type | Required | Default | Description |
|---|---|---|---|---|
| `connectionString` | `string` | Yes | — | PostgreSQL connection string |
| `cache.enabled` | `boolean` | No | `true` | Enable in-memory caching |
| `cache.ttlMs` | `number` | No | `60000` | Cache TTL in milliseconds |

## API

### `getTranslations(locale, namespace)`

Returns all translation key/value pairs for the given locale code and namespace key.

```ts
const t = await client.getTranslations('en', 'common');
// Record<string, string>
```

### `getTranslation(locale, namespace, key)`

Returns a single translation value, or `null` if not found.

```ts
const value = await client.getTranslation('en', 'common', 'welcome');
// string | null
```

### `getLocales(enabledOnly?)`

Returns all locales. Pass `false` to include disabled locales (default: `true`).

```ts
const locales = await client.getLocales();
// Locale[]
```

### `getNamespaces()`

Returns all namespaces.

```ts
const namespaces = await client.getNamespaces();
// Namespace[]
```

### `close()`

Clears the cache and closes the database connection pool. Call this on application shutdown.

```ts
await client.close();
```

## Types

```ts
interface TranslationClientConfig {
  connectionString: string;
  cache?: {
    enabled: boolean;
    ttlMs?: number;
  };
}

interface Locale {
  id: number;
  code: string;
  name: string;
  native_name: string;
  is_default: boolean;
  enabled: boolean;
  created_at: string;
  updated_at: string;
}

interface Namespace {
  id: number;
  key: string;
  description: string | null;
  created_at: string;
  updated_at: string;
}
```

## License

MIT