@rynko/mcp-server 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,209 @@
1
+ # @rynko/mcp-server
2
+
3
+ Rynko MCP server for Claude Desktop - manage templates and generate documents through natural conversation.
4
+
5
+ ## Installation
6
+
7
+ ### Option 1: One-Click Install (Recommended)
8
+
9
+ **Coming Soon**: Install directly from the Claude Desktop Extensions directory.
10
+
11
+ Or install from the `.mcpb` bundle:
12
+
13
+ 1. Download `rynko-mcp-{version}.mcpb` from the [releases page](https://github.com/rynko/rynko/releases)
14
+ 2. In Claude Desktop, go to **Settings** → **Extensions**
15
+ 3. Click **Install from file** and select the downloaded `.mcpb` file
16
+ 4. Enter your Personal Access Token when prompted
17
+ 5. Done! Start chatting with Claude about your documents.
18
+
19
+ ### Option 2: NPX (Manual Setup)
20
+
21
+ Install globally:
22
+
23
+ ```bash
24
+ npm install -g @rynko/mcp-server
25
+ ```
26
+
27
+ Or use directly with npx (recommended):
28
+
29
+ ```bash
30
+ npx @rynko/mcp-server
31
+ ```
32
+
33
+ ## Manual Setup
34
+
35
+ ### 1. Get a Personal Access Token (PAT)
36
+
37
+ 1. Log in to your [Rynko Dashboard](https://app.rynko.dev)
38
+ 2. Go to **Settings** → **Personal Access Tokens**
39
+ 3. Click **Create Token**
40
+ 4. Enter a label (e.g., "Claude Desktop")
41
+ 5. Select expiry (max 30 days)
42
+ 6. Copy the token - it won't be shown again!
43
+
44
+ ### 2. Configure Claude Desktop
45
+
46
+ Add to your Claude Desktop configuration file:
47
+
48
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
49
+
50
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
51
+
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "rynko": {
56
+ "command": "npx",
57
+ "args": ["-y", "@rynko/mcp-server"],
58
+ "env": {
59
+ "RYNKO_USER_TOKEN": "pat_xxxxxxxxxxxxxxxx"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### 3. Restart Claude Desktop
67
+
68
+ Close and reopen Claude Desktop. You should see "rynko" in your available MCP servers.
69
+
70
+ ## Available Tools
71
+
72
+ ### Workspace Tools
73
+
74
+ | Tool | Description |
75
+ |------|-------------|
76
+ | `list_workspaces` | List all workspaces you have access to |
77
+ | `get_workspace` | Get details of a specific workspace |
78
+
79
+ ### Template Tools
80
+
81
+ | Tool | Description |
82
+ |------|-------------|
83
+ | `list_templates` | List templates in a workspace |
84
+ | `get_template` | Get template details and schema |
85
+ | `create_draft_template` | Create a new draft template |
86
+ | `update_draft_template` | Update a draft template |
87
+ | `validate_schema` | Validate template schema |
88
+ | `get_schema_reference` | Get template schema documentation |
89
+
90
+ ### Data Tools
91
+
92
+ | Tool | Description |
93
+ |------|-------------|
94
+ | `parse_data_file` | Parse Excel or CSV data to JSON |
95
+ | `map_variables` | Auto-map data columns to template variables |
96
+
97
+ ### Generation Tools
98
+
99
+ | Tool | Description |
100
+ |------|-------------|
101
+ | `preview_template` | Generate a preview document |
102
+ | `generate_document` | Generate a production document |
103
+ | `get_job_status` | Check document generation status |
104
+
105
+ ## Example Usage
106
+
107
+ Once configured, you can have natural conversations with Claude:
108
+
109
+ > **You:** Create an invoice template with company logo, client details, and line items table.
110
+ >
111
+ > **Claude:** I'll create that for you. Let me check your workspaces first...
112
+ >
113
+ > *[Creates template using Rynko tools]*
114
+
115
+ > **You:** Generate an invoice for Acme Corp with 3 line items totaling $1,500.
116
+ >
117
+ > **Claude:** I'll generate that invoice now...
118
+ >
119
+ > *[Generates PDF using your template]*
120
+
121
+ ## Environment Variables
122
+
123
+ | Variable | Required | Description |
124
+ |----------|----------|-------------|
125
+ | `RYNKO_USER_TOKEN` | Yes | Your Personal Access Token (starts with `pat_`) |
126
+ | `RYNKO_API_URL` | No | Custom API URL (default: `https://api.rynko.dev/api`) |
127
+
128
+ ## Security
129
+
130
+ - **Token Expiry**: PATs expire after max 30 days
131
+ - **Draft-Only**: Templates created via MCP are drafts until manually published
132
+ - **Audit Logging**: All operations are logged in your team's activity feed
133
+ - **Revocable**: Instantly revoke tokens from your dashboard
134
+
135
+ ## Troubleshooting
136
+
137
+ ### "Invalid token" error
138
+
139
+ - Verify your token starts with `pat_`
140
+ - Check if the token has expired
141
+ - Generate a new token from your dashboard
142
+
143
+ ### "Failed to connect" error
144
+
145
+ - Check your internet connection
146
+ - Verify the Rynko API is accessible
147
+ - Try regenerating your PAT
148
+
149
+ ### Claude Desktop not finding the server
150
+
151
+ - Check your config file JSON syntax
152
+ - Ensure `npx` is in your PATH
153
+ - Restart Claude Desktop completely
154
+
155
+ ## Documentation
156
+
157
+ - [Full Integration Guide](https://docs.rynko.dev/integrations/mcp-integration)
158
+ - [Template Schema Reference](https://docs.rynko.dev/developer-guide/template-schema)
159
+ - [API Documentation](https://docs.rynko.dev/api/)
160
+
161
+ ## Support
162
+
163
+ - **Email**: support@rynko.dev
164
+ - **Issues**: [GitHub Issues](https://github.com/rynko/rynko/issues)
165
+
166
+ ## Building from Source
167
+
168
+ ### Build the MCPB Bundle
169
+
170
+ To build the Claude Desktop extension bundle:
171
+
172
+ ```bash
173
+ cd integrations/mcp-server
174
+ npm install
175
+ npm run build:mcpb
176
+ ```
177
+
178
+ This creates:
179
+ - `dist-mcpb/rynko-mcp-{version}.mcpb` - The extension bundle
180
+ - `dist-mcpb/rynko-mcp-{version}.mcpb.sha256` - Checksum file
181
+
182
+ ### Bundle Contents
183
+
184
+ ```
185
+ rynko-mcp-{version}.mcpb
186
+ ├── manifest.json # Extension metadata and configuration
187
+ ├── server/ # Compiled server code
188
+ │ ├── index.js
189
+ │ └── client.js
190
+ └── icon.png # Extension icon (optional)
191
+ ```
192
+
193
+ ## Directory Submission
194
+
195
+ To submit to the Claude Desktop Extensions directory:
196
+
197
+ 1. Build the MCPB bundle: `npm run build:mcpb`
198
+ 2. Test locally by installing via "Install from file"
199
+ 3. Submit via [Anthropic's Extension Submission Form](https://forms.gle/...)
200
+ 4. Include:
201
+ - Extension name and description
202
+ - Privacy policy URL
203
+ - Terms of service URL
204
+ - 3+ usage examples
205
+ - Safety annotations (data access, network access)
206
+
207
+ ## License
208
+
209
+ MIT
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Rynko API Client
3
+ *
4
+ * HTTP client for communicating with the Rynko MCP Documents API.
5
+ */
6
+ export interface McpToolCallResponse {
7
+ content: Array<{
8
+ type: 'text' | 'image' | 'resource';
9
+ text?: string;
10
+ data?: string;
11
+ mimeType?: string;
12
+ }>;
13
+ isError?: boolean;
14
+ }
15
+ export interface McpToolDefinition {
16
+ name: string;
17
+ description: string;
18
+ inputSchema: {
19
+ type: 'object';
20
+ properties: Record<string, unknown>;
21
+ required: string[];
22
+ };
23
+ }
24
+ export interface ServerInfo {
25
+ name: string;
26
+ version: string;
27
+ description: string;
28
+ capabilities: {
29
+ tools: boolean;
30
+ resources: boolean;
31
+ prompts: boolean;
32
+ };
33
+ }
34
+ export declare class RynkoClient {
35
+ private readonly baseUrl;
36
+ private readonly token;
37
+ constructor(token: string, baseUrl?: string);
38
+ /**
39
+ * Get server info
40
+ */
41
+ getServerInfo(): Promise<ServerInfo>;
42
+ /**
43
+ * List available tools
44
+ */
45
+ listTools(): Promise<{
46
+ tools: McpToolDefinition[];
47
+ }>;
48
+ /**
49
+ * Execute a tool call
50
+ */
51
+ callTool(name: string, args: Record<string, unknown>): Promise<McpToolCallResponse>;
52
+ /**
53
+ * Make an HTTP request to the Rynko API
54
+ */
55
+ private request;
56
+ }
57
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;QACpC,IAAI,CAAC,EAAE,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+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.RynkoClient = void 0;
9
+ class RynkoClient {
10
+ baseUrl;
11
+ token;
12
+ constructor(token, baseUrl) {
13
+ this.token = token;
14
+ this.baseUrl = baseUrl || 'https://api.rynko.dev/api';
15
+ }
16
+ /**
17
+ * Get server info
18
+ */
19
+ async getServerInfo() {
20
+ const response = await this.request('GET', '/mcp-documents');
21
+ return response;
22
+ }
23
+ /**
24
+ * List available tools
25
+ */
26
+ async listTools() {
27
+ const response = await this.request('GET', '/mcp-documents/tools');
28
+ return response;
29
+ }
30
+ /**
31
+ * Execute a tool call
32
+ */
33
+ async callTool(name, args) {
34
+ const response = await this.request('POST', '/mcp-documents/tools/call', { name, arguments: args });
35
+ return response;
36
+ }
37
+ /**
38
+ * Make an HTTP request to the Rynko API
39
+ */
40
+ async request(method, path, body) {
41
+ const url = `${this.baseUrl}${path}`;
42
+ const headers = {
43
+ 'Content-Type': 'application/json',
44
+ Authorization: `Bearer ${this.token}`,
45
+ 'User-Agent': '@rynko/mcp-server/1.0.0',
46
+ };
47
+ const options = {
48
+ method,
49
+ headers,
50
+ };
51
+ if (body) {
52
+ options.body = JSON.stringify(body);
53
+ }
54
+ const response = await fetch(url, options);
55
+ if (!response.ok) {
56
+ const errorText = await response.text();
57
+ let errorMessage;
58
+ try {
59
+ const errorJson = JSON.parse(errorText);
60
+ errorMessage = errorJson.message || errorJson.error || errorText;
61
+ }
62
+ catch {
63
+ errorMessage = errorText || `HTTP ${response.status}`;
64
+ }
65
+ throw new Error(`Rynko API error: ${errorMessage}`);
66
+ }
67
+ return response.json();
68
+ }
69
+ }
70
+ exports.RynkoClient = RynkoClient;
71
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAiCH,MAAa,WAAW;IACL,OAAO,CAAS;IAChB,KAAK,CAAS;IAE/B,YAAY,KAAa,EA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C,EAAE,EAAE,CAAC;YACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,IAAI,YAAoB,CAAC;YAEzB,IAAI,CAAC;gBACH,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACxC,YAAY,GAAG,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC;YACnE,CAAC;YAAC,MAAM,CAAC;gBACP,YAAY,GAAG,SAAS,IAAI,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC;YACxD,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,oBAAoB,YAAY,EAAE,CAAC,CAAC;QACtD,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAgB,CAAC;IACvC,CAAC;CACF;AAtFD,kCAsFC"}
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Rynko MCP Server
4
+ *
5
+ * Model Context Protocol server for Claude Desktop integration.
6
+ * Enables AI assistants to manage templates and generate documents
7
+ * through natural conversation.
8
+ *
9
+ * Usage:
10
+ * RYNKO_USER_TOKEN=pat_xxx npx @rynko/mcp-server
11
+ *
12
+ * Or configure in Claude Desktop's config file:
13
+ * {
14
+ * "mcpServers": {
15
+ * "rynko": {
16
+ * "command": "npx",
17
+ * "args": ["-y", "@rynko/mcp-server"],
18
+ * "env": {
19
+ * "RYNKO_USER_TOKEN": "pat_xxxxxxxxxxxxxxxx"
20
+ * }
21
+ * }
22
+ * }
23
+ * }
24
+ */
25
+ export {};
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
package/dist/index.js ADDED
@@ -0,0 +1,158 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * Rynko MCP Server
5
+ *
6
+ * Model Context Protocol server for Claude Desktop integration.
7
+ * Enables AI assistants to manage templates and generate documents
8
+ * through natural conversation.
9
+ *
10
+ * Usage:
11
+ * RYNKO_USER_TOKEN=pat_xxx npx @rynko/mcp-server
12
+ *
13
+ * Or configure in Claude Desktop's config file:
14
+ * {
15
+ * "mcpServers": {
16
+ * "rynko": {
17
+ * "command": "npx",
18
+ * "args": ["-y", "@rynko/mcp-server"],
19
+ * "env": {
20
+ * "RYNKO_USER_TOKEN": "pat_xxxxxxxxxxxxxxxx"
21
+ * }
22
+ * }
23
+ * }
24
+ * }
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
28
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
29
+ const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
30
+ const client_js_1 = require("./client.js");
31
+ // Get configuration from environment
32
+ const RYNKO_USER_TOKEN = process.env.RYNKO_USER_TOKEN;
33
+ const RYNKO_API_URL = process.env.RYNKO_API_URL;
34
+ // Validate token
35
+ if (!RYNKO_USER_TOKEN) {
36
+ console.error('Error: RYNKO_USER_TOKEN environment variable is required');
37
+ console.error('');
38
+ console.error('Get a Personal Access Token from your Rynko dashboard:');
39
+ console.error(' Settings → Personal Access Tokens → Create Token');
40
+ console.error('');
41
+ console.error('Then set it in your environment or Claude Desktop config.');
42
+ process.exit(1);
43
+ }
44
+ if (!RYNKO_USER_TOKEN.startsWith('pat_')) {
45
+ console.error('Error: Invalid token format. Token must start with "pat_"');
46
+ process.exit(1);
47
+ }
48
+ // Initialize API client
49
+ const client = new client_js_1.RynkoClient(RYNKO_USER_TOKEN, RYNKO_API_URL);
50
+ // Create MCP server
51
+ const server = new index_js_1.Server({
52
+ name: 'rynko-mcp',
53
+ version: '1.0.0',
54
+ }, {
55
+ capabilities: {
56
+ tools: {},
57
+ },
58
+ });
59
+ /**
60
+ * Handle list tools request
61
+ */
62
+ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
63
+ try {
64
+ const { tools } = await client.listTools();
65
+ return {
66
+ tools: tools.map((tool) => ({
67
+ name: tool.name,
68
+ description: tool.description,
69
+ inputSchema: tool.inputSchema,
70
+ })),
71
+ };
72
+ }
73
+ catch (error) {
74
+ const message = error instanceof Error ? error.message : 'Unknown error';
75
+ throw new types_js_1.McpError(types_js_1.ErrorCode.InternalError, `Failed to list tools: ${message}`);
76
+ }
77
+ });
78
+ /**
79
+ * Handle tool call request
80
+ */
81
+ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
82
+ const { name, arguments: args } = request.params;
83
+ try {
84
+ const result = await client.callTool(name, args || {});
85
+ // Convert response to MCP format
86
+ return {
87
+ content: result.content.map((item) => {
88
+ if (item.type === 'text') {
89
+ return {
90
+ type: 'text',
91
+ text: item.text || '',
92
+ };
93
+ }
94
+ if (item.type === 'image' && item.data) {
95
+ return {
96
+ type: 'image',
97
+ data: item.data,
98
+ mimeType: item.mimeType || 'image/png',
99
+ };
100
+ }
101
+ // Default to text
102
+ return {
103
+ type: 'text',
104
+ text: JSON.stringify(item),
105
+ };
106
+ }),
107
+ isError: result.isError,
108
+ };
109
+ }
110
+ catch (error) {
111
+ const message = error instanceof Error ? error.message : 'Unknown error';
112
+ return {
113
+ content: [
114
+ {
115
+ type: 'text',
116
+ text: `Error: ${message}`,
117
+ },
118
+ ],
119
+ isError: true,
120
+ };
121
+ }
122
+ });
123
+ /**
124
+ * Main entry point
125
+ */
126
+ async function main() {
127
+ // Verify connection to Rynko API
128
+ try {
129
+ await client.getServerInfo();
130
+ }
131
+ catch (error) {
132
+ const message = error instanceof Error ? error.message : 'Unknown error';
133
+ console.error(`Failed to connect to Rynko API: ${message}`);
134
+ console.error('');
135
+ console.error('Please check:');
136
+ console.error(' 1. Your token is valid and not expired');
137
+ console.error(' 2. You have network connectivity');
138
+ console.error(' 3. The Rynko API is accessible');
139
+ process.exit(1);
140
+ }
141
+ // Start the server with stdio transport
142
+ const transport = new stdio_js_1.StdioServerTransport();
143
+ await server.connect(transport);
144
+ // Handle graceful shutdown
145
+ process.on('SIGINT', async () => {
146
+ await server.close();
147
+ process.exit(0);
148
+ });
149
+ process.on('SIGTERM', async () => {
150
+ await server.close();
151
+ process.exit(0);
152
+ });
153
+ }
154
+ main().catch((error) => {
155
+ console.error('Fatal error:', error);
156
+ process.exit(1);
157
+ });
158
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH,wEAAmE;AACnE,wEAAiF;AACjF,iEAK4C;AAC5C,2CAA0C;AAE1C,qCAAqC;AACrC,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACtD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAEhD,iBAAiB;AACjB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACtB,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC1E,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;IACxE,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACpE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;IACzC,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,wBAAwB;AACxB,MAAM,MAAM,GAAG,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Ae,CAAC;QACzE,OAAO,CAAC,KAAK,CAAC,mCAAmC,OAAO,EAAE,CAAC,CAAC;QAC5D,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACpD,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,wCAAwC;IACxC,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,2BAA2B;IAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QAC/B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@rynko/mcp-server",
3
+ "version": "1.0.3",
4
+ "description": "Rynko MCP server for Claude Desktop - manage templates and generate documents through natural conversation",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "rynko-mcp": "./dist/index.js"
8
+ },
9
+ "types": "dist/index.d.ts",
10
+ "files": [
11
+ "dist",
12
+ "README.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "dev": "tsc --watch",
17
+ "start": "node dist/index.js",
18
+ "prepublishOnly": "npm run build",
19
+ "lint": "eslint src --ext .ts",
20
+ "clean": "rimraf dist",
21
+ "build:mcpb": "bash scripts/build-mcpb.sh"
22
+ },
23
+ "keywords": [
24
+ "rynko",
25
+ "mcp",
26
+ "model-context-protocol",
27
+ "claude",
28
+ "claude-desktop",
29
+ "pdf",
30
+ "document-generation",
31
+ "templates"
32
+ ],
33
+ "author": "Rynko",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/rynko-dev/mcp-server.git"
38
+ },
39
+ "homepage": "https://docs.rynko.dev/integrations/mcp-integration",
40
+ "bugs": {
41
+ "url": "https://github.com/rynko-dev/mcp-server/issues"
42
+ },
43
+ "engines": {
44
+ "node": ">=18.0.0"
45
+ },
46
+ "dependencies": {
47
+ "@modelcontextprotocol/sdk": "^1.0.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^20.10.0",
51
+ "rimraf": "^5.0.5",
52
+ "typescript": "^5.3.0"
53
+ }
54
+ }