SM

scrive/mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

3 stars 0 forks 品質 62 トレンド 18MIT

Model Context Protocol server for various Scrive services

概要

A Model Context Protocol server in TypeScript that integrates with Scrive for document automation. Follow the Getting Started guide for a quick walkthrough. Full user-facing documentation lives at scrive.github.io/mcp. This README covers building and developing the server. - Node.js 24+ - Corepack enabled - pnpm 10+ - Docker (optional) This prompts for your Scrive server and OAuth client credentials (from your Scrive Integration settings), then opens your browser to authorize the application. By default, credentials are stored in your OS keychain. Alternatively, if a keychain is unavailable on your system, you can configure the server to store credentials in a plain-text file on your disk: SCRIVE_MCP_INSECURE_STORAGE selects the storage backend for both reading and writing, with no fallback between them. Two consequences: - If you use it, set it everywhere the server runs, not just for auth — including the env block of your MCP client config.

README

以下は原文 README の抜粋です。原文を見る。

scrive-mcp

A Model Context Protocol server in TypeScript that integrates with Scrive for document automation.

New here? Follow the Getting Started guide for a quick walkthrough. Full user-facing documentation lives at scrive.github.io/mcp. This README covers building and developing the server.

Prerequisites

  • Node.js 24+
  • Corepack enabled
  • pnpm 10+
  • Docker (optional)

Setup

1. Enable Corepack and install dependencies

corepack enable
pnpm install

2. Build the server and MCP App UI

pnpm run build

3. Configure credentials for stdio mode

Run the OAuth authorization flow:

node dist/index.js auth

This prompts for your Scrive server and OAuth client credentials (from your Scrive Integration settings), then opens your browser to authorize the application.

By default, credentials are stored in your OS keychain. Alternatively, if a keychain is unavailable on your system, you can configure the server to store credentials in a plain-text file on your disk:

export SCRIVE_MCP_INSECURE_STORAGE=true

SCRIVE_MCP_INSECURE_STORAGE selects the storage backend for both reading and writing, with no fallback between them. Two consequences:

  • If you use it, set it everywhere the server runs, not just for auth — including the env block of your MCP client config. Credentials written to the plain-text file are not read back unless the variable is also set when the server starts.
  • Upgrading from a version that stored credentials in a plain-text file requires re-running auth to store them in the keychain (or setting SCRIVE_MCP_INSECURE_STORAGE=true to keep using the file). Re-running auth does not delete the old plain-text file — remove it yourself if you no longer want it on disk.

Running

Stdio transport

For local MCP clients:

node dist/index.js stdio ~/Documents ~/Downloads

Arguments after stdio are directories the server is allowed to read PDFs from. Tools that take a local path (such as create_document) reject paths outside this list. ~ is expanded.

HTTP transport

For remote deployments with bearer-token forwarding:

export PORT=8080
export AUTH_SERVER_URL=https://oauth2.scrive.com
export SCRIVE_BASE_URL=https://scrive.com
export RESOURCE_URL=https://your-host.example.com/mcp
export SCOPES=full
export ALLOWED_CORS_ORIGINS=https://claude.ai,https://chatgpt.com

node dist/index.js http

Set ALLOWED_CORS_ORIGINS to the exact web client origins that should be allowed to call /mcp. Wildcards such as * are not supported by the current HTTP transport.

The HTTP server exposes:

  • /.well-known/oauth-protected-resource
  • /mcp

DNS rebinding protection is enabled by default from the configured RESOURCE_URL hostname and can be disabled with:

GitHub で README 全文を見る

インストール

docker run -p 8080:8080 \
MCP 初心者?mcpskill.org のガイドから始めましょう →