MCP Jupiter

MIT License
6
  • Apple
  • Linux

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables performing operations on the Solana blockchain, specifically for executing token swaps through Jupiter's swap API.

MCP 木星

此代码库包含一个模型上下文协议 (MCP) 服务器,该服务器为 Claude 提供了访问 Jupiter 掉期 API 的权限。该服务器使 Claude 能够使用 Jupiter 在 Solana 区块链上执行诸如获取报价、构建掉期交易以及发送掉期交易等操作。

概述

MCP 服务器向 Claude 公开了几个工具:

  • jupiter_get_quote :获取在 Jupiter 上兑换代币的报价
  • jupiter_build_swap_transaction :在 Jupiter 上建立交换交易
  • jupiter_send_swap_transaction :在 Jupiter 上发送交换交易

先决条件

  • Node.js(v16 或更高版本)
  • Claude桌面应用程序

安装

  1. 克隆此存储库:
    git clone https://github.com/dcSpark/mcp-server-jupiter.git cd mcp-server-jupiter
  2. 安装依赖项:
    npm ci
  3. 构建项目:
    npm run build

全局安装

您还可以全局安装该包或直接通过 npx 使用它:

# Install globally npm install -g @mcp-dockmaster/mcp-server-jupiter # Or use directly with npx npx @mcp-dockmaster/mcp-server-jupiter

配置

配置 Claude 桌面

要配置 Claude Desktop 以使用此 MCP 服务器:

  1. 打开 Claude 桌面
  2. 导航到 Claude Desktop 配置文件:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  3. 添加 MCP 服务器配置:
{ "mcpServers": { "mcp-server-jupiter": { "command": "node", "args": [ "/path/to/your/mcp-server-jupiter/build/index.js" ] } } }

如果您已经全局安装了该包或者想要使用 npx,您可以像这样配置它:

{ "mcpServers": { "mcp-server-jupiter": { "command": "npx", "args": [ "@mcp-dockmaster/mcp-server-jupiter" ] } } }

本地运行

# If installed locally node build/index.js # If installed globally mcp-server-jupiter # Using npx npx @mcp-dockmaster/mcp-server-jupiter

用法

配置完成后,重新启动 Claude Desktop。Claude 现在就可以使用 Jupiter 交换工具了。您可以让 Claude 执行以下操作:

  1. 获取代币兑换报价:
    What's the quote for swapping 1 SOL to USDC?
  2. 建立掉期交易:
    Build a swap transaction for the quote I just got.
  3. 发送掉期交易:
    Send the swap transaction I just built.

Claude 将使用 MCP 服务器直接与 Jupiter 的交换 API 进行交互。

发展

添加新工具

要向 MCP 服务器添加新工具:

  1. src/tools.ts中定义工具
  2. 在适当的处理程序文件中创建处理程序函数
  3. 将处理程序添加到src/tools.ts中的handlers对象

建筑

npm run build

执照

麻省理工学院

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

模型上下文协议服务器使 Claude 能够通过 Jupiter 的 API 执行 Solana 代币交换,包括获取报价、构建交易以及在 Solana 区块链上发送交换交易。

  1. Overview
    1. Prerequisites
      1. Installation
        1. Global Installation
      2. Configuration
        1. Configure Claude Desktop
        2. Running Locally
      3. Usage
        1. Development
          1. Adding New Tools
          2. Building
        2. License
          ID: jc7lttojhw