agents-mcp-server

agents-mcp-server

A set of MCP servers that provide AI agents with safe, composable access to web3 market data and trading, featuring read-only intelligence and execution modes with SIM/PAPER/LIVE safeguards.

Category
访问服务器

README

agents-mcp-server

CI License: MIT Node

A monorepo of focused MCP (Model Context Protocol) servers that give an AI agent safe, composable access to web3 market data and trading — split by concern so that reading the chain and acting on it are never the same surface.

  • Read-only intelligence & data servers expose on-chain analytics and market data. They never sign or send anything.
  • Execution servers place trades and swaps, and gate every action behind an explicit SIM | PAPER | LIVE mode so an agent can never accidentally move funds.
  • A tiny shared framework (@agentsmcp/mcp-core) makes every server a flat registry of tool modules — adding a tool is one file, not a new switch arm.

Built with TypeScript (strict, ESM, Node ≥22), the MCP SDK, Zod, and Vitest; formatted/linted with Biome; secrets encrypted at rest with dotenvx.


Architecture

flowchart TB
  agent["AI agent / MCP client"]

  subgraph readonly["Read-only servers (no signing)"]
    intel["web3-intel<br/>9 tools · wallet & token intelligence"]
    market["web3-market-data<br/>15 tools · multi-venue market data"]
  end

  subgraph exec["Execution servers (SIM · PAPER · LIVE)"]
    hl["web3-hyperliquid-trading<br/>4 tools · perps"]
    onchain["web3-onchain-trading<br/>6 tools · 0x + Jupiter swaps"]
  end

  subgraph core["Shared packages"]
    mcpcore["@agentsmcp/mcp-core<br/>tool registry · stdio runtime · CLI"]
    providers["web3-core-onchain<br/>Alchemy · Helius · 0x · Jupiter · Codex"]
    wallets["web3-core-wallets<br/>encrypted wallet resolution"]
    norm["web3-core-hyperliquid<br/>position/account normalization"]
  end

  ext["External APIs<br/>Alchemy · Helius · Codex · Hyperliquid · 0x · Jupiter"]

  agent -- stdio/JSON-RPC --> intel & market & hl & onchain
  intel & market & hl & onchain --> mcpcore
  intel & market & onchain --> providers
  hl & onchain --> wallets
  market --> norm
  providers --> ext
  hl --> ext
Server Kind Tools Talks to
web3-intel read-only 9 Alchemy, Helius, Codex
web3-market-data read-only 15 Hyperliquid, Alchemy, Helius
web3-hyperliquid-trading execution 4 Hyperliquid
web3-onchain-trading execution 6 0x (EVM), Jupiter (Solana)

Shared packages: @agentsmcp/mcp-core · web3-core-onchain · web3-core-wallets · web3-core-hyperliquid · mcp-test-harness.

The tool-registry pattern

Every server is just a list of ToolDefinitions wired through mcp-core. There is no per-server switch, no repeated server bootstrap, and no duplicated CLI.

// web3-onchain-trading/src/tools/zerox.ts
import { type ToolDefinition, jsonText } from '@agentsmcp/mcp-core';

export const getQuote0x: ToolDefinition = {
  name: 'get_quote_0x',
  description: 'Get a 0x swap quote for an EVM trade…',
  inputSchema: zeroXQuoteInputJsonSchema,
  annotations: { readOnlyHint: true },
  async handler(rawArgs, deps) {
    const { args, quote, fee } = await fetch0xQuote(rawArgs, deps); // deps.fetch is injectable
    return jsonText({ provider: '0x', ...args, fee, quote });
  },
};
// web3-onchain-trading/src/index.ts — the whole server
import { createToolRouter } from '@agentsmcp/mcp-core';
import { tools } from './tools/index.js';

export function createOnchainTradingRouter(deps?) {
  return createToolRouter(tools, { serverName: 'web3-onchain-trading', deps });
}

createToolRouter dispatches by name via a Map and wraps every failure as "<server> <tool> failed: …". runStdioServer and runCli (in cli.ts) provide the SDK server and the dotenvx bootstrap. Adding a tool = write one tools/*.ts module and add it to the tools array.

The injectable deps.fetch is the testing seam: handlers are unit-tested by passing a mock fetch, with no network and no live keys (see any *.mock.test.ts).

Execution safety: SIM · PAPER · LIVE

Every execution tool requires a mode:

  • SIM / PAPER — never touch the network and never resolve wallet secrets; they return exactly what would be sent. Safe for an agent to call freely.
  • LIVE — the only mode that signs and broadcasts. It resolves the selected wallet on demand and (for Hyperliquid) verifies the account matches the wallet.

Wallet private keys are never stored in code or JSON. A wallet file holds metadata plus pointers to env vars; the actual secrets live in an dotenvx-encrypted ~/.agentsmcp/.env.

Quickstart

pnpm install
pnpm build                 # build all packages
pnpm test                  # unit + mock + contract tests (e2e auto-skip)
pnpm check                 # Biome + MCP registry validation

# configure secrets / wallet (see .env.example for every variable)
pnpm wallet add main       # create an encrypted wallet
pnpm env:set ALCHEMY_API_KEY <key>

Run a server over stdio (e.g. with the MCP Inspector):

pnpm --filter @agentsmcp/web3-intel inspect

Point an MCP client at the server's dist/cli.js (each package ships a bin).

Testing

pnpm test                  # all workspaces, sequential + visible output
pnpm test:coverage         # with V8 coverage report
RUN_E2E=1 pnpm test        # also run live-API e2e tests (needs real keys)

Tests are layered: contract tests spawn the built server over stdio and assert its tool list; mock tests exercise handlers with an injected fetch; e2e tests hit real APIs and are gated behind RUN_E2E=1 so a normal run is fast and offline.

Repository layout

packages/
  mcp-core/             # tool registry + stdio runtime + CLI bootstrap (the framework)
  web3-core-onchain/    # Alchemy/Helius/0x/Jupiter/Codex providers + request builders
  web3-core-wallets/    # wallet metadata + encrypted secret resolution
  web3-core-hyperliquid/# Hyperliquid position/account normalization
  mcp-test-harness/     # McpStdioClient used by contract/e2e tests
web3-intel/             # read-only intelligence server
web3-market-data/       # read-only market-data server
web3-hyperliquid-trading/  # perps execution server
web3-onchain-trading/   # spot-swap execution server
web/docs/               # Astro/Starlight documentation site
scripts/                # wallet CLI, registry validation, publish

See ARCHITECTURE.md for a deeper tour, and .env.example for every environment variable.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选