Skip to content

Commit c4e794f

Browse files
committed
new endpoint, more ready
1 parent 644801c commit c4e794f

File tree

10 files changed

+462
-431
lines changed

10 files changed

+462
-431
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@ All notable changes to the Orshot MCP Server will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.9.0] - 2025-07-05
9+
10+
### Added
11+
12+
- **Studio Template Name Support** - You can now reference studio templates by name instead of just numeric IDs
13+
- Template name resolution for all studio template operations (generate, modifications, etc.)
14+
- Enhanced studio template listing with detailed information including modifications, dimensions, and thumbnails
15+
- Improved template modification display with better formatting and examples
16+
- Railway deployment optimization with health check endpoint
17+
- Railway configuration files (`railway.toml`, `Procfile`)
18+
- Comprehensive Railway deployment guide (`RAILWAY.md`)
19+
20+
### Changed
21+
22+
- Updated studio templates endpoint to use new `/v1/studio/templates` structure
23+
- Enhanced `get-studio-templates` tool to show comprehensive template information
24+
- Improved `get-template-modifications` tool to handle new modification structure
25+
- Updated all generation tools to support template name resolution
26+
- Removed Docker support in favor of simpler Railway deployment
27+
- Enhanced tool descriptions to mention template name support
28+
29+
### Removed
30+
31+
- Docker configuration files (`Dockerfile`, `docker-compose.yml`)
32+
- Outdated `index_new.ts` file
33+
834
## [1.8.0] - 2025-07-05
935

1036
### Added

Dockerfile

Lines changed: 0 additions & 63 deletions
This file was deleted.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: npm run start

RAILWAY.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Railway Deployment Guide
2+
3+
This guide explains how to deploy the Orshot MCP Server on Railway.
4+
5+
## Prerequisites
6+
7+
1. A Railway account (sign up at https://railway.app)
8+
2. Your Orshot API key
9+
10+
## Deployment Steps
11+
12+
### Method 1: Deploy from GitHub (Recommended)
13+
14+
1. **Connect your repository to Railway:**
15+
16+
- Go to https://railway.app/dashboard
17+
- Click "New Project"
18+
- Select "Deploy from GitHub repo"
19+
- Connect your GitHub account and select this repository
20+
21+
2. **Configure environment variables:**
22+
23+
- In your Railway project dashboard, go to "Variables"
24+
- Add the following environment variables:
25+
```
26+
ORSHOT_API_KEY=your_orshot_api_key_here
27+
NODE_ENV=production
28+
```
29+
30+
3. **Deploy:**
31+
- Railway will automatically build and deploy your application
32+
- The build process uses the `railway.toml` configuration
33+
34+
### Method 2: Deploy via Railway CLI
35+
36+
1. **Install Railway CLI:**
37+
38+
```bash
39+
npm install -g @railway/cli
40+
```
41+
42+
2. **Login to Railway:**
43+
44+
```bash
45+
railway login
46+
```
47+
48+
3. **Initialize the project:**
49+
50+
```bash
51+
cd /path/to/orshot-mcp-server
52+
railway init
53+
```
54+
55+
4. **Set environment variables:**
56+
57+
```bash
58+
railway variables set ORSHOT_API_KEY=your_orshot_api_key_here
59+
railway variables set NODE_ENV=production
60+
```
61+
62+
5. **Deploy:**
63+
```bash
64+
railway up
65+
```
66+
67+
## Configuration
68+
69+
### Environment Variables
70+
71+
| Variable | Required | Description | Default |
72+
| ---------------- | -------- | ---------------------------- | ------------- |
73+
| `ORSHOT_API_KEY` | Yes | Your Orshot API key | - |
74+
| `NODE_ENV` | No | Environment mode | `development` |
75+
| `PORT` | No | Port for health check server | `3000` |
76+
77+
### Health Check
78+
79+
The server includes a built-in health check endpoint at `/health` that Railway uses to monitor your deployment. This endpoint returns:
80+
81+
```json
82+
{
83+
"status": "healthy",
84+
"service": "orshot-mcp-server",
85+
"version": "1.8.0",
86+
"timestamp": "2025-07-05T12:00:00.000Z"
87+
}
88+
```
89+
90+
## Monitoring
91+
92+
- **Logs:** View real-time logs in your Railway dashboard
93+
- **Metrics:** Monitor CPU, memory, and network usage
94+
- **Health Check:** Automatic health monitoring via `/health` endpoint
95+
96+
## Scaling
97+
98+
Railway automatically handles:
99+
100+
- Auto-scaling based on traffic
101+
- Zero-downtime deployments
102+
- SSL certificate management
103+
- CDN integration
104+
105+
## Troubleshooting
106+
107+
### Common Issues
108+
109+
1. **Build failures:**
110+
111+
- Check that all dependencies are listed in `package.json`
112+
- Verify Node.js version compatibility (requires Node.js ≥18.0.0)
113+
114+
2. **Runtime errors:**
115+
116+
- Check environment variables are set correctly
117+
- Review logs in Railway dashboard
118+
- Verify Orshot API key is valid
119+
120+
3. **Health check failures:**
121+
- Ensure the PORT environment variable is set
122+
- Check if the health server is binding correctly
123+
124+
### Support
125+
126+
- Railway Documentation: https://docs.railway.app
127+
- Railway Community: https://discord.gg/railway
128+
- Orshot API Documentation: https://docs.orshot.com
129+
130+
## Cost Optimization
131+
132+
- Railway offers a generous free tier
133+
- Consider setting resource limits for cost control
134+
- Monitor usage in the Railway dashboard
135+
- Use environment-based scaling policies

README.md

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,34 @@ Examples:
6767

6868
Generated images with `base64` response type are automatically displayed inline in your chat conversation!
6969

70+
### ✨ NEW: Studio Template Name Support
71+
72+
You can now reference studio templates by their **name** instead of just numeric IDs! This makes it much easier to work with your custom templates:
73+
74+
```json
75+
// Use template name (much easier!)
76+
{
77+
"templateId": "My Social Media Post",
78+
"modifications": {
79+
"headline": "Hello World!",
80+
"image": "https://example.com/photo.jpg"
81+
}
82+
}
83+
84+
// Or still use numeric ID
85+
{
86+
"templateId": "123",
87+
"modifications": { ... }
88+
}
89+
```
90+
7091
### Note on Website Screenshots
7192

7293
Website screenshots are available through the standard library templates (template ID: `website-screenshot`). Simply use the `generate-image` or `generate-image-from-library` tools with the `website-screenshot` template and provide the `websiteUrl` modification.
7394

74-
## 🚀 Quick Start (Production)
95+
## 🚀 Quick Start
96+
97+
### Local Development
7598

7699
```bash
77100
# 1. Install and build
@@ -84,7 +107,23 @@ export ORSHOT_API_KEY="your-api-key-here"
84107
npm start
85108
```
86109

87-
**Claude Desktop Integration:**
110+
### Railway Deployment (Recommended for Production)
111+
112+
Deploy to Railway in one click:
113+
114+
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template)
115+
116+
Or manually:
117+
118+
1. **Connect Repository:** Fork this repo and connect it to Railway
119+
2. **Set Environment Variables:**
120+
- `ORSHOT_API_KEY`: Your Orshot API key
121+
- `NODE_ENV`: `production`
122+
3. **Deploy:** Railway will automatically build and deploy
123+
124+
> **📚 Complete Railway guide:** [RAILWAY.md](./RAILWAY.md)
125+
126+
### Claude Desktop Integration
88127

89128
```json
90129
{
@@ -144,6 +183,51 @@ Add the server to your Claude Desktop configuration in `claude_desktop_config.js
144183
npm start
145184
```
146185

186+
## Usage Examples
187+
188+
### Working with Studio Templates by Name
189+
190+
```typescript
191+
// 1. First, get your studio templates to see available names
192+
await use_mcp_tool("get-studio-templates");
193+
194+
// 2. Generate an image using template name instead of ID
195+
await use_mcp_tool("generate-image", {
196+
templateId: "My Social Media Post", // Use the template name!
197+
modifications: {
198+
headline: "Join us for the big announcement!",
199+
description: "Something amazing is coming...",
200+
image: "https://example.com/announcement.jpg"
201+
}
202+
});
203+
204+
// 3. Or use the auto-detect tool (recommended)
205+
await use_mcp_tool("generate-image", {
206+
templateId: "Instagram Story Template",
207+
modifications: {
208+
profilePhoto: "https://example.com/profile.jpg",
209+
username: "@myusername",
210+
storyText: "Having a great day!"
211+
}
212+
});
213+
```
214+
215+
### URL Auto-Mapping for Studio Templates
216+
217+
The server automatically maps image URLs to the correct template fields:
218+
219+
```typescript
220+
// The server will automatically map these URLs to image fields
221+
await use_mcp_tool("generate-image", {
222+
templateId: "Product Showcase",
223+
modifications: {
224+
productImage: "https://example.com/product.jpg", // Will be auto-mapped
225+
title: "Amazing Product",
226+
price: "$29.99"
227+
}
228+
});
229+
```
230+
147231
## Tools
148232

149233
### Template Discovery Tools

0 commit comments

Comments
 (0)