mcp-server-shortcut

このプロジェクトは、WindsurfおよびCursorのためのMCPサーバー設定を提供します。ユーザーは、Shortcut APIトークンを使用してカスタムサーバーを追加し、簡単に設定を行うことができます。TypeScriptで構築されており、開発者向けの便利なツールです。

GitHubスター

67

ユーザー評価

未評価

お気に入り

0

閲覧数

13

フォーク

28

イシュー

10

インストール方法
難易度
中級
推定所要時間
10-20
必要な環境
Node.js: 18.0.0以上
npm: 8.0.0以上

インストール方法

インストール方法

前提条件

必要なソフトウェアとバージョンを明記してください。
Node.js: 18.0.0以上
npm: 8.0.0以上

インストール手順

1. リポジトリのクローン

bash
git clone https://github.com/useshortcut/mcp-server-shortcut
cd mcp-server-shortcut

2. 依存関係のインストール

bash
npm install

3. MCPサーバーの設定

mcp.jsonを編集してMCPサーバーを追加:
json
{
  "mcpServers": {
    "shortcut": {
      "command": "npx",
      "args": [
        "-y",
        "@shortcut/mcp@latest"
      ],
      "env": {
        "SHORTCUT_API_TOKEN": ""
      }
    }
  }
}

4. サーバーの起動

bash
npm start

トラブルシューティング

よくある問題

問題: サーバーが起動しない 解決策: Node.jsのバージョンを確認し、依存関係を再インストールしてください。 問題: 設定ファイルが正しく読み込まれない 解決策: 設定ファイルのパスと構文を確認してください。

設定方法

設定方法

基本設定

MCPサーバー設定

mcp.jsonを編集して以下のように設定します:
json
{
  "mcpServers": {
    "shortcut": {
      "command": "npx",
      "args": [
        "-y",
        "@shortcut/mcp@latest"
      ],
      "env": {
        "SHORTCUT_API_TOKEN": ""
      }
    }
  }
}

環境変数

必要に応じて以下の環境変数を設定:
bash
export SHORTCUT_API_TOKEN="your-api-token"

詳細設定

セキュリティ設定

APIキーは環境変数または安全な設定ファイルに保存
ファイルアクセス権限の適切な設定

設定例

基本的な設定

json
{
  "mcpServers": {
    "shortcut": {
      "command": "npx",
      "args": [
        "-y",
        "@shortcut/mcp@latest"
      ],
      "env": {
        "SHORTCUT_API_TOKEN": ""
      }
    }
  }
}

使用例

使用例

基本的な使用方法

MCPサーバーの基本的な使用方法を以下に示します:

Claude Desktopでの使用

1MCPサーバーの起動確認
Claude Desktopを開き、設定が正しく読み込まれていることを確認してください。
2基本コマンドの実行

   Available tools from this MCP server:
   - tool1: Description of tool1
   - tool2: Description of tool2
   

プログラムでの使用

javascript
// JavaScript例(Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// ツールの実行
const result = await client.callTool('toolName', {
  parameter1: 'value1',
  parameter2: 'value2'
});

console.log(result);

応用例

自動化スクリプト

bash
#!/bin/bash

バッチ処理の例

for file in *.txt; do mcp-tool process "$file" done

API統合

python

Python例

import requests import json def call_mcp_tool(tool_name, params): response = requests.post( 'http://localhost:3000/mcp/call', json={ 'tool': tool_name, 'parameters': params } ) return response.json()

使用例

result = call_mcp_tool('analyze', { 'input': 'sample data', 'options': {'format': 'json'} })

使用ケース

Shortcut APIを使用してタスク管理を自動化するプロジェクト
Windsurfを使用した開発環境の構築
Cursorを介してMCPサーバーを利用するアプリケーションの開発
Claude CodeでのAIツールとの連携
Zedを使用したリアルタイムデータ処理

追加リソース