my-tools-mcp-server-public-preview
0
My Tools MCP Server is designed as a Model Context Protocol server to allow personal automation tools to be utilized by AI agents. It aims to consolidate various tools for efficient management.
My Tools MCP Server
このプロジェクトは、個人の自動化ツールをAIエージェントでも利用できるようにするためのMCPサーバーです。
プロジェクト概要
- プライベートリポジトリ: my-tools
- パブリックリポジトリ: my-tools-mcp-server-public-preview
公開とプライベートリポジトリの使い分け
このMCPサーバーは、個人専用のツールとして設計されています。プライベートリポジトリには個人の設定やスクリプトが含まれていますが、現時点で秘密情報は含まれていないため、パブリックリポジトリにも一部の情報を公開しています。
今後の展望
今後は、細々としたツールを作るたびに新しいサーバーを作成するのではなく、my-tools
サーバーに様々なツールを集約し、効率的に管理していく予定です。
作業メモ
-
プロジェクトディレクトリを作成します。
$ mkdir my-tools $ code my-tools
-
MCPサーバーを作成します。
$ npx @modelcontextprotocol/create-server time-server
-
サーバーにPythonスクリプトを呼び出すツールを追加します。
index.ts
ファイルを編集し、以下のコードを追加します。{ name: "get_current_time", description: "Get the current time", inputSchema: { type: "object", properties: {}, required: [] } }
-
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"); } });