MCPInstall
my-tools-mcp-server-public-preview logo

my-tools-mcp-server-public-preview

by nishio nishio/my-tools-mcp-server-public-preview

My Tools MCP Server enables the use of personal automation tools through an AI agent. It supports both private and public repositories, allowing for efficient management of personal scripts and configurations without exposing sensitive information. Future plans include consolidating multiple tools into a single server for better organization.

READMEmain

My Tools MCP Server

このプロジェクトは、個人の自動化ツールをAIエージェントでも利用できるようにするためのMCPサーバーです。

プロジェクト概要

公開とプライベートリポジトリの使い分け

このMCPサーバーは、個人専用のツールとして設計されています。プライベートリポジトリには個人の設定やスクリプトが含まれていますが、現時点で秘密情報は含まれていないため、パブリックリポジトリにも一部の情報を公開しています。

今後の展望

今後は、細々としたツールを作るたびに新しいサーバーを作成するのではなく、my-toolsサーバーに様々なツールを集約し、効率的に管理していく予定です。

作業メモ

  1. プロジェクトディレクトリを作成します。

    $ mkdir my-tools
    $ code my-tools
    
  2. MCPサーバーを作成します。

    $ npx @modelcontextprotocol/create-server time-server
    
  3. サーバーにPythonスクリプトを呼び出すツールを追加します。index.tsファイルを編集し、以下のコードを追加します。

    {
      name: "get_current_time",
      description: "Get the current time",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    }
    
  4. execSyncを使用してPythonスクリプトを呼び出します。

    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      switch (request.params.name) {
        case "get_current_time": {
          const output = execSync('python3 current_time.py').toString().trim();
          return {
            content: [{
              type: "text",
              text: `Current time is: ${output}`
            }]
          };
        }
        default:
          throw new Error("Unknown tool");
      }
    });