Solana MCP について
Solana MCPは、Solana向けのMCPサーバーとクライアントを提供し、Solanaの機能をMCPワークフローに組み込む開発者を対象とします。例にはトークン保有者の検索ツールがあります。
主な機能
- 01Solana MCPサーバーの提供
- 02Solana MCPクライアントの提供
- 03トークン保有者検索ツールの例
活用シーン
- 01MCPワークフローへのSolana接続
- 02例を使ったトークン保有者の検索
MCP 対応
Solana MCPサーバーとクライアントを提供します。例ではgetTokenHoldersというツールを示しています。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
インストール方法は未掲載です
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ツール一覧はまだ取得されていません
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
Solana MCP
Solana MCP サーバーです。

目次
インストール
@cubie-ai/solana-mcp パッケージをインストールして使用するには、次のコマンドを実行します。
npm i @cubie-ai/solana-mcp
ドキュメント
ドキュメントはこちらをご覧ください:ドキュメント
はじめに
サーバーの作成
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { solanaMCPServer } from "../../dist";
import { SOLANA_RPC_URL } from "./contants";
async function main() {
await solanaMCPServer({
transport: new StdioServerTransport(),
config: {
solanaRpcUrl: SOLANA_RPC_URL,
commitment: "confirmed",
},
});
}
main();
クライアントの作成
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { solanaMCPClient } from "../../dist";
const CUBIE_MINT = "2MH8ga3TuLvuvX2GUtVRS2BS8B9ujZo3bj5QeAkMpump";
async function main() {
const transport = new StdioClientTransport({
args: ["dist/server.js"],
command: "node",
});
const client = await solanaMCPClient({
name: "Solana MCP Client",
version: "1.0.0",
transport: transport,
});
const tools = await client.listTools();
console.dir(tools, { depth: null });
const supply = await client.callTool({
name: "getTokenSupply",
arguments: {
mint: CUBIE_MINT,
},
});
console.dir(supply, { depth: null });
}
main();
例
例を実行すると、次の出力が表示されます。
{
tools: [
{
name: "getTokenHolders",
description: "Get token holders for a specific mint address",
inputSchema: {
type: "object",
properties: { mint: { type: "string" } },
required: ["mint"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getTokenSupply",
description: "Get the total supply of a specific token",
inputSchema: {
type: "object",
properties: { mint: { type: "string" } },
required: ["mint"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getTokenProgramByMintAddress",
description: "Get the token program by mint address",
inputSchema: {
type: "object",
properties: { mint: { type: "string" } },
required: ["mint"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getAddressBalance",
description: "Get the balance of a specific address",
inputSchema: {
type: "object",
properties: { address: { type: "string" } },
required: ["address"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getAddressHoldings",
description: "Get the holdings of a specific address",
inputSchema: {
type: "object",
properties: { address: { type: "string" } },
required: ["address"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getSignaturesForAddress",
description: "Get the signatures for a specific address",
inputSchema: {
type: "object",
properties: { address: { type: "string" } },
required: ["address"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getJupiterQuote",
description: "Get a quote from Jupiter for a specific swap",
inputSchema: {
type: "object",
properties: {
inputMint: { type: "string" },
outputMint: { type: "string" },
amount: { type: "string" },
slippage: { type: "string" },
},
required: ["inputMint", "outputMint", "amount"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
{
name: "getPrice",
description: "Get the price of a specific token",
inputSchema: {
type: "object",
properties: {
inputMint: { type: "string" },
outputMint: {
type: "string",
default: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
},
},
required: ["inputMint"],
additionalProperties: false,
$schema: "http://json-schema.org/draft-07/schema#",
},
},
];
}
{
content: [
{
type: "text",
text: '{"amount":"999725949874932","decimals":6,"uiAmount":999725949.874932,"uiAmountString":"999725949.874932"}',
},
];
}
コメント
Markdown 対応
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。