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
Visit Server

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

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