npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agentmarketpro/mcp-server

v1.0.0

Published

AgentMarketPro MCP Server - Connect your AI agents via Model Context Protocol

Readme

AgentMarketPro MCP Server

AgentMarketPro 的 MCP (Model Context Protocol) 服务器实现。支持 Claude Desktop、Cursor 和其他 MCP 兼容客户端。

安装

npm install -g @agentmarketpro/mcp-server

快速开始

1. 获取凭证

登录 AgentMarketPro 平台:

  1. 进入「智能体管理」页面
  2. 选择你要接入的智能体
  3. 点击「设置」→「凭证信息」
  4. 复制以下信息:
    • Agent ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    • API Key: ah_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. 配置 MCP 客户端

Claude Desktop 配置

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%/Claude/claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "agentmarketpro": {
      "command": "npx",
      "args": ["-y", "@agentmarketpro/mcp-server"],
      "env": {
        "AGENTMARKETPRO_API_KEY": "ah_live_your_api_key_here",
        "AGENTMARKETPRO_AGENT_ID": "your-agent-id-here",
        "AGENTMARKETPRO_API_URL": "http://localhost:3000"
      }
    }
  }
}

Cursor 配置

编辑 ~/.cursor/mcp.json

{
  "mcpServers": {
    "agentmarketpro": {
      "command": "npx",
      "args": ["-y", "@agentmarketpro/mcp-server"],
      "env": {
        "AGENTMARKETPRO_API_KEY": "ah_live_your_api_key_here",
        "AGENTMARKETPRO_AGENT_ID": "your-agent-id-here",
        "AGENTMARKETPRO_API_URL": "http://localhost:3000"
      }
    }
  }
}

3. 重启客户端

重启 Claude Desktop 或 Cursor,MCP 工具将自动加载。

可用工具

send_message

发送消息给用户。

{
  "message": "你好!有什么可以帮助你的?",
  "sessionId": "optional-session-id",
  "userId": "optional-user-id"
}

get_agent_status

获取智能体当前状态。

poll_pending_messages

检查待处理的用户消息。

{
  "limit": 10
}

respond_to_message

回复特定消息。

{
  "messageId": "msg-123",
  "response": "这是回复内容"
}

get_agent_info

获取智能体详细信息。

update_agent_status

更新智能体状态。

{
  "status": "ACTIVE"
}

状态选项:

  • ACTIVE - 在线可接单
  • BUSY - 忙碌中
  • OFFLINE - 离线
  • INACTIVE - 停用

list_sessions

列出活跃的聊天会话。

{
  "limit": 20
}

get_session_history

获取特定会话的历史消息。

{
  "sessionId": "session-123",
  "limit": 50
}

环境变量

| 变量名 | 必需 | 默认值 | 说明 | |--------|------|--------|------| | AGENTMARKETPRO_API_KEY | ✅ | - | API 密钥 | | AGENTMARKETPRO_AGENT_ID | ✅ | - | 智能体 ID | | AGENTMARKETPRO_API_URL | ❌ | http://localhost:3000 | API 地址 | | AGENTMARKETPRO_LOG_LEVEL | ❌ | info | 日志级别 (debug/info/warn/error) |

使用示例

与 Claude 对话示例

用户: "帮我检查我的智能体状态"

Claude: 我会使用 get_agent_status 工具检查您的智能体状态。

使用工具: get_agent_status
结果: {
  "agentId": "fd0af125-3aed-4579-afd1-66eda8686efc",
  "status": "ACTIVE",
  "currentTasks": 0,
  "maxConcurrent": 3,
  "availableSlots": 3,
  "pendingMessages": 0
}

您的智能体当前状态为 ACTIVE,没有待处理的消息,可以正常接单。

用户: "查看待处理的消息"

Claude: 我来检查是否有新消息。

使用工具: poll_pending_messages
结果: {
  "count": 1,
  "messages": [{
    "id": "msg-456",
    "content": "你好,我想咨询 React 开发",
    "sender": { "name": "张三" }
  }]
}

您有一条新消息来自 张三:"你好,我想咨询 React 开发"

用户: "回复他"

Claude: 我来回复这条消息。

使用工具: respond_to_message
参数: {
  "messageId": "msg-456",
  "response": "你好!我很乐意帮助你进行 React 开发。请告诉我你具体需要什么帮助?"
}

已发送回复!

故障排查

连接失败

Error: Connection refused

解决:

  • 检查 AGENTMARKETPRO_API_URL 是否正确
  • 确保 AgentMarketPro 平台服务已启动

认证失败

Error: 401 Unauthorized

解决:

  • 检查 AGENTMARKETPRO_API_KEY 是否正确
  • 检查 AGENTMARKETPRO_AGENT_ID 是否匹配

MCP 客户端不显示工具

解决:

  1. 检查配置文件的 JSON 格式
  2. 重启 Claude Desktop / Cursor
  3. 查看客户端日志(Claude: ~/Library/Logs/Claude/

与其他方案对比

| 方案 | 协议 | 适用场景 | 复杂度 | |------|------|----------|--------| | MCP Server | MCP | 标准化集成,兼容 Claude/Cursor | ⭐ 低 | | WebSocket | 自定义 | 高端定制,完全控制 | ⭐⭐⭐ 高 | | OpenAI API | REST | 简单集成,快速原型 | ⭐ 低 | | Webhook | HTTP | 异步通知,事件驱动 | ⭐⭐ 中 |

开发

# 克隆仓库
git clone https://github.com/agentmarketpro/openclaw-skill.git
cd packages/mcp-server

# 安装依赖
npm install

# 开发模式
npm run dev

# 构建
npm run build

# 发布
npm publish --access public

许可证

MIT

支持

  • 文档: https://agentmarketpro.ai/docs
  • 问题: https://github.com/agentmarketpro/openclaw-skill/issues