Skip to main content
Glama
SiJia713
by SiJia713
README.md
# Remote Child Story MCP

Remote MCP server for generating short bedtime stories for 3-year-old children.

This project is designed for cloud deployment on Render and exposes one MCP tool:

- `generate_story`
  - `theme`: optional story theme
  - `child_name`: optional child name to include in the story

## Endpoints

- `GET /health`
- `POST /mcp`

## Local Development

```powershell
npm install
npm run build
npm start
```

The server listens on `PORT` and loads environment variables from `.env.local` or `.env` when present.

## Environment Variables

```env
PORT=3000
ARK_API_KEY=your_ark_api_key
ARK_BASE_URL=https://ark.cn-beijing.volces.com/api/v3
ARK_MODEL=your_model_id
ARK_TIMEOUT_MS=45000
```

## Render Deployment

Create a new Render `Web Service` and use:

- Runtime: `Node`
- Build Command: `npm install && npm run build`
- Start Command: `npm start`
- Health Check Path: `/health`

Required environment variables on Render:

- `ARK_API_KEY`
- `ARK_BASE_URL`
- `ARK_MODEL`
- `ARK_TIMEOUT_MS`

After deployment, use the Render app URL with `/mcp` as the remote MCP endpoint.

## Verification

```powershell
npm test
npm run check
npm run build
```