Mastra + Ollama + MCPでローカルAIエージェントを作る
BRANK

はじめにどんな人向けの記事?背景2ヶ月ほど前、生成AIなんでも展示会向けにMastra + MCPを組み合わせたローカルのAIエージェントを作成した。当初Mastra + Ollama + MCPの組み合わせは動かなかったが、4月末時点で動くようになった。 24.04@EVO-X2(AMD Ryzen AI Max+ 395、UMA 128GB) 今回作成したコードMastra + Ollama + MCP構成のサンプルコード(手っ取り早くローカルAIエージェントを使いたい人用) HTTP transportなMCPサーバー(デプロイ済なのでCloneは不要) npx create-mastra@latest Need to install the following packages: create-mastra@0.10.5 Ok to proceed? (y) y ┌ Mastra Create │ ◇ What do you want to name your project? │ mastra_ollama_mcp │ ◇ Project structure created │ ◇ npm dependencies installed │ ◇ mastra installed │ ◇ Mastra dependencies installed │ ◇ .gitignore added │ └ Project created successfully ┌ Mastra Init │ ◇ Where should we create the Mastra files? (default: src/) │ src/ │ ◇ Select default provider: │ OpenAI │ ◇ Enter your openai API key? │ Skip …

zenn.dev
Related Topics: AI