mindcore-mcp

mindcore-mcp

Enables AI-powered chat and DeFi operations (swap, transfer) via MCP-compliant tools, integrating with LLMs for onchain actions.

Category
Visit Server

README

Mindcore MCP Server

MCP (Model Context Protocol) server for onchain chat, DeFi operations, and AI model integration.

Overview

This library provides a framework for AI-powered chat and DeFi operations (swap, transfer) via MCP-compliant tools. It is designed for seamless integration with AI models and LLM tool providers.


Features

  • AI Chat Agents: Analyst and Trader Copilot powered by OpenAI.
  • DeFi Operations: Swap tokens (Uniswap), transfer ETH/ERC20.
  • Intent Parsing: Natural language understanding for DeFi actions.
  • MCP Tool Manifest: Ready for LLM/AI tool integration.
  • Framework Agnostic: Use with Express, Fastify, h3, or any Node.js backend.

Installation

npm install mindcore-mcp

Usage

Basic Example

import { createChatHandler, swapHandler, transferHandler } from 'mindcore-mcp';

// Example: Express.js
app.post('/api/chat', createChatHandler());

// Example: Direct function call
const chatResponse = await chatHandler({
  messages: [{ role: 'user', content: 'Swap 1 ETH to USDC' }],
  agentId: 2
});

const swapResponse = await swapHandler({
  from: 'ETH',
  to: 'USDC',
  amount: '1',
  userAddress: '0xYourAddress'
});

Running the Server

You can run the Mindcore MCP Server as a standalone HTTP server:

npx mindcore-mcp

This will start the server on the default port (3000). You can set a custom port with the PORT environment variable.


MCP Tools

Tool Description Example Use Case
chat AI-powered chat with intent parsing "What is the price of ETH?"
swap Swap tokens via Uniswap "Swap 1 ETH to USDC"
transfer Transfer ETH or ERC20 tokens "Send 10 USDC to 0xabc..."

Environment Variables

Variable Description
OPENAI_API_KEY Your OpenAI API key
RPC_URL Ethereum RPC URL
UNISWAP_ROUTER_ADDRESS Uniswap router contract address
WETH_ADDRESS (Optional) WETH contract address

Copy .env.example to .env and fill in your values.


Usage with LLM Tools

The Mindcore MCP Server exposes the following MCP-compliant tools for LLMs:

chat

Endpoint: POST /api/chat Input:

{
  "messages": [
    { "role": "user", "content": "Swap 1 ETH to USDC" }
  ],
  "agentId": 2
}

Output:

{
  "reply": "swap_intent",
  "swap": { "amount": "1", "from": "ETH", "to": "USDC" },
  "message": "You want to swap 1 ETH to USDC. Please confirm the swap."
}

swap

Endpoint: POST /api/swap Input:

{
  "from": "ETH",
  "to": "USDC",
  "amount": "1",
  "userAddress": "0xYourAddress"
}

Output: Returns transaction data for the swap.

transfer

Endpoint: POST /api/transfer Input:

{
  "token": "USDC",
  "amount": "10",
  "recipient": "0xRecipientAddress",
  "userAddress": "0xYourAddress"
}

Output: Returns transaction data for the transfer.


Registering Tools with LLMs

To use these tools with an LLM, add them to your tool manifest or configuration. Example (pseudo-config):

{
  "mcpServers": {
    "mindcore": {
      "command": "npx",
      "args": [
        "mindcore-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "your_openai_api_key",
        "RPC_URL": "your_rpc_url",
        "UNISWAP_ROUTER_ADDRESS": "your_router_address"
      }
    }
  }
}

Prompting Tips:

  • Instruct the LLM to use the chat, swap, and transfer tools for onchain actions.
  • Provide the tool descriptions and example calls in your LLM's tool registry.

Development

# Build the package
npm run build

# Run tests (if implemented)
npm test

License

MIT


Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured