TDM MCP Server

TDM MCP Server

Enables AI agents to perform local session-state checks for TDM, helping decide whether to continue, fuel, sweep, or connect the wallet.

Category
访问服务器

README

<div align="center">

TDM MCP Server

<img src="https://img.shields.io/badge/TDM-MCP_Server-ff69b4?style=for-the-badge&logo=server&logoColor=white" alt="TDM MCP Server" />

Model Context Protocol Server for TDM

npm MCP Compatible License: MIT GitHub stars TypeScript

Session-state checks for AI agents

DocumentationQuick StartGitHubX/Twitter

</div>


What is TDM MCP Server?

@tdm/mcp-server is a small MCP stdio server for TDM local session-state checks.

The public GitHub repo for tdm-sdk shows the open contract-facing SDK surface: https://github.com/ToDealMarket/tdm-sdk

The current tdm-sdk npm beta used by the surrounding TDM docs remains broader and includes the CLI/operator flows referenced here.

Inside the broader Integration Kit, this package is the reference MCP implementation. It sits next to:

  • thin CLI and signer wrappers
  • copy-paste framework examples
  • lightweight local integration recipes
████████╗ ██████╗  ███╗   ███╗
╚══██╔══╝ ██╔══██╗ ████╗ ████║
   ██║    ██║  ██║ ██╔████╔██║
   ██║    ██║  ██║ ██║╚██╔╝██║
   ██║    ██████╔╝ ██║ ╚═╝ ██║
   ╚═╝    ╚═════╝  ╚═╝     ╚═╝

TDM CLI [V0.0.2-BETA]
SDK + CLI + MCP
Mode: local-first | Docs: todealmarket.com/docs

What it helps with

The tool helps an agent decide whether it should:

  • continue
  • ask the user to run tdm connect
  • suggest tdm fuel
  • suggest tdm sweep

Interactive seller commands in tdm-sdk can now auto-start that one-time Live TDM setup when the live runtime is still missing. MCP still keeps the explicit instruction path because an agent should ask the operator before triggering wallet/browser setup on their behalf.

For human operator flows, tdm connect stores the primary wallet locally. The current multi-wallet MVP also supports connecting one wallet per supported network for local signing and network-specific payout setup. During connect, TDM can attempt a safe default payout sync for the same network when that network does not already have a saved payout wallet. It does not overwrite an already saved payout wallet automatically, and tdm connect --no-sync-payout-wallet keeps connect local-only.

If the account protects new payout destinations with TOTP step-up, the operator should run:

tdm security totp enroll
tdm security totp verify --method-id <id> --code 123456

tdm security totp enroll opens a local setup page with a QR by default. Use --no-browser if terminal-only setup is preferred.

It is intentionally local-first:

  • reads local TDM credentials and runtime hints
  • follows TDM_CREDENTIALS_PATH when explicitly set
  • otherwise follows TDM_VAULT or the active vault marker from ~/.tdm/vaults/_active
  • does not depend on deprecated treasury balance routes
  • can use TDM_REMAINING_USDC and TDM_DUST_TOKENS_DETECTED when the host wants to provide fresh snapshot hints

For operators using named vaults, MCP will read the active/default vault context instead of pretending there is only one global runtime forever.

The vault resolution order is explicit:

  • TDM_CREDENTIALS_PATH when you pin one credentials file directly
  • otherwise TDM_VAULT
  • otherwise the active vault marker from ~/.tdm/vaults/_active
  • otherwise the legacy default ~/.tdm/credentials.json

That means one MCP process reads one selected vault contour. It does not merge agents, wallets, or sessions across multiple vaults.

If that active vault has its own optional runtime allowlist, agents in that vault inherit the narrower destination policy. If no project or vault allowlist is configured, MCP keeps the broader flexible runtime posture instead of assuming deny-by-default.

If the operator wants reusable runtime contours, tdm workspace use <name> can switch the active vault/storage combination before MCP starts. MCP still reads local runtime state only; it does not own those runtime workspaces.

Local catalogs and published assets now live next to that same runtime layer in tdm-sdk:

  • tdm storage add
  • tdm storage import-dir
  • tdm storage sync
  • tdm storage watch
  • tdm storage publish
  • tdm workspace
  • tdm status
  • tdm workspace status

MCP itself does not host or upload those files. It can only help an agent or operator decide when to suggest the surrounding CLI workflow.

States

  • FUELED
  • DEPLETED
  • UNINITIALIZED

Representative response fields:

  • state
  • remaining_usdc
  • wallet_linked
  • dust_tokens_detected
  • agent_instructions
  • balance_source

Install

npm install @tdm/mcp-server

Global install:

npm install -g @tdm/mcp-server

If you already use tdm-sdk, the simplest path is:

tdm mcp

That SDK command writes a project .mcp.json pointing to the bundled MCP runtime. The standalone @tdm/mcp-server package itself does not mutate your project config files.

Run

tdm-mcp-server

Bundled SDK path:

tdm mcp serve

Programmatic startup

import { startUltraThinRadarServer } from '@tdm/mcp-server';

await startUltraThinRadarServer();

Example response

{
  "state": "DEPLETED",
  "remaining_usdc": 0,
  "wallet_linked": true,
  "dust_tokens_detected": true,
  "agent_instructions": "Suggest tdm sweep.",
  "balance_source": "runtime_snapshot"
}

Scope

This package is a decision helper for agent runtimes. It is not a wallet manager, payout tool, or general execution framework.

If you need a live JavaScript gateway integration instead of local state guidance, use tdm-sdk with makePayable(...), tdm-sdk/authorize, tdm-sdk/checkout, tdm-sdk/session-tanks, or createGatewayClients(...).

If MCP suggests a recovery path such as tdm sweep, the current SDK routing behavior behind that suggestion is:

  • Solana Jupiter:
    • https://api.jup.ag/swap/v1 when JUPITER_API_KEY is configured
    • https://lite-api.jup.ag/swap/v1 as the compatibility fallback without a key
  • Base Odos:
    • https://api.odos.xyz without ODOS_API_KEY
    • https://enterprise-api.odos.xyz with ODOS_API_KEY

The MCP server itself does not hold or manage those API keys; it only points operators toward the surrounding tdm-sdk workflow.

If you need custom local signing for advanced third-party integrations, use the experimental tdm signer serve mode from tdm-sdk instead of treating the MCP server as a transaction executor.

Warning:

  • advanced users only
  • localhost-only signing surface
  • blind signing risk exists
  • TDM does not take responsibility for losses caused by compromised local scripts or unsafe third-party integrations in that mode

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选