Skip to content

API 文档

将 Agent Teams Market 集成到您的工具链。REST API、MCP 服务器和语义发现。

MCP 服务器

使用 Agent Teams Market 的最快方式。将我们的 MCP 服务器添加到你的 AI 编码工具,只需描述你的需求 — 无需手动复制粘贴。

服务端点

https://www.teamsmarket.com/mcp

Implements the MCP Streamable HTTP transport (JSON-RPC 2.0 over HTTP POST). Protocol version: 2025-03-26.

提供的能力

6 个工具搜索、发现、激活、浏览
85+ 资源每个团队作为 teamsmarket:// URI
85+ 提示词每个团队作为可调用的提示词
自动指令主动行为引导

工作原理

  1. 将 MCP 服务器 URL 添加到你的 AI 工具(参见下方接入指南)
  2. 在对话中直接描述任务:「帮我检查这段代码的安全问题」
  3. MCP 服务器自动找到最匹配的团队并激活,你的 AI 立即以该团队的身份开始工作

免费版无需 API 密钥。服务器在初始化时返回 instructions,教会你的 AI 工具何时以及如何主动使用可用工具。

接入指南

Claude Code

推荐

方式一:命令行一键接入

claude mcp add --transport http teamsmarket https://www.teamsmarket.com/mcp

方式二:编辑配置文件

添加到 ~/.claude/settings.json:

{
  "mcpServers": {
    "teamsmarket": {
      "url": "https://www.teamsmarket.com/mcp"
    }
  }
}

使用方法 — 在对话框里直接说:

# Just talk naturally in Claude Code:
> "review my code for security issues"
> "help me set up a CI/CD pipeline"
> "use the code-review-squad team"
> "find a team for kubernetes deployment"

# Claude will automatically call activate_for_task
# and start working as the matched agent team.

Cursor

一步一步操作:

1. 打开 Cursor → 按 Cmd+Shift+J (Mac) 或 Ctrl+Shift+J (Windows),或点击齿轮图标 ⚙️ →「Cursor Settings」

2. 在左侧栏找到并点击「MCP」(在 Features 下面)

3. 点击「+ Add new global MCP server」

4. 填写:Name = teamsmarket,Type = streamable-http,URL = https://www.teamsmarket.com/mcp

5. 点击保存 → 重启 Cursor

或者:直接编辑文件 ~/.cursor/mcp.json,粘贴以下内容:

{
  "mcpServers": {
    "teamsmarket": {
      "url": "https://www.teamsmarket.com/mcp"
    }
  }
}

打开 Cursor 对话框(Cmd+L / Ctrl+L),输入你的任务。Cursor 会自动调用专家团队。

Windsurf

一步一步操作:

1. 打开 Windsurf → 点击右上角齿轮图标 ⚙️ →「Settings」→ 左侧栏点击「MCP」

2. 点击「Add Server」,粘贴下方 JSON 配置

3. 保存并重启 Windsurf

{
  "mcpServers": {
    "teamsmarket": {
      "url": "https://www.teamsmarket.com/mcp"
    }
  }
}

打开 Windsurf 对话框,输入你的任务 — 专家团队会自动激活。

Gemini CLI

一步一步操作:

1. 打开文件 ~/.gemini/settings.json(如果不存在就新建)

2. 粘贴下方配置并保存

3. 重启 Gemini CLI

{
  "mcpServers": {
    "teamsmarket": {
      "httpUrl": "https://www.teamsmarket.com/mcp"
    }
  }
}

注意:Gemini CLI 使用「httpUrl」(不是「url」)。配置完成后,像 Claude 一样让 Gemini 搜索或激活团队。

OpenAI Codex CLI

添加到 ~/.codex/config.json:

{
  "mcpServers": {
    "teamsmarket": {
      "url": "https://www.teamsmarket.com/mcp"
    }
  }
}

然后在 Codex 提示词中引用 teamsmarket 工具来搜索和激活 Agent 团队。

OpenClaw

接入步骤:

1. 在终端运行下方命令

2. 验证配置:openclaw mcp show teamsmarket

3. 开启会话,描述任务 — OpenClaw 会自动调用最合适的专家团队

openclaw mcp set teamsmarket '{"url": "https://www.teamsmarket.com/mcp"}'

teamsmarket 为 OpenClaw 提供 85+ 个专家 Agent 团队能力。描述你的需求,对应团队立即激活。

任何 MCP 兼容工具

任何支持 MCP Streamable HTTP 传输的工具都可以连接。通过 HTTP POST 发送 JSON-RPC 2.0 消息。免费版无需认证。

MCP 工具参考

MCP 服务器提供的全部 6 个工具。服务器包含 instructions,教会你的 AI 工具在你描述任务时主动调用 activate_for_task。

activate_for_task推荐

ALL-IN-ONE: Describe your task and this tool automatically finds the best team AND activates it. One call does everything.

参数

名称类型必填说明
taskstring必填What you want to accomplish (e.g. 'review this PR for security issues')
mode"compact" | "full"可选compact (~7KB, default) or full (~25KB) spec loading

在对话中这样说

> "review my code for security vulnerabilities"
use_team

Activate a specific team by slug. Claude adopts all agent roles and follows the team's workflow.

参数

名称类型必填说明
slugstring必填Team slug (e.g. 'code-review-squad')
mode"compact" | "full"可选compact (~7KB, default) or full spec

在对话中这样说

> "use the code-review-squad team"
search_teams

Search teams by keyword, category, or difficulty. Supports Chinese queries.

参数

名称类型必填说明
querystring可选Search query — matches name, description, tags
categorystring可选Category slug (e.g. 'devops-infrastructure')
difficulty"beginner" | "intermediate" | "advanced"可选Filter by difficulty

在对话中这样说

> "find kubernetes teams"
discover_teams

Describe a task in natural language to get ranked team recommendations with relevance scores.

参数

名称类型必填说明
taskstring必填Natural language task description
limitnumber可选Max results (default: 5, max: 10)

在对话中这样说

> "migrate rails monolith to microservices"
get_team_spec

Fetch the raw markdown specification for a team. Returns the full text without activation.

参数

名称类型必填说明
slugstring必填Team slug

在对话中这样说

> "get the spec for devops-pipeline-team"
list_categories

List all 14 categories with descriptions and team counts.

在对话中这样说

> "what categories are available?"

协议详情

Transport: Streamable HTTP (POST to /mcp)

Protocol: JSON-RPC 2.0, MCP version 2025-03-26

Methods: initialize, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get, ping

Batch: Supports JSON-RPC batch requests (send an array of messages)

Stateless: No session management. Each request is independent.

CORS: Fully open (Access-Control-Allow-Origin: *)

REST API

传统的 REST 端点,用于编程访问。在构建自定义集成、脚本或 MCP 不可用时使用。

基础 URL

https://www.teamsmarket.com/api

专业版及以上用户请在请求中携带 Bearer Token。免费版(每月 100 次)无需 Token。

GET/api/teams

List all team specs. Supports filtering by category and full-text search.

参数

名称类型必填说明
categorystring可选Filter by category slug (e.g. software-development)
qstring可选Full-text search across name, description, and tags

请求示例

curl https://www.teamsmarket.com/api/teams

响应示例

{
  "teams": [
    {
      "slug": "fullstack-dev-team",
      "name": "Full-Stack Dev Team",
      "description": "End-to-end web development team...",
      "category": "software-development",
      "agentCount": 6,
      "difficulty": "intermediate",
      "tags": ["react", "node", "typescript"]
    }
  ],
  "total": 70
}
GET/api/teams/{slug}

Fetch full detail for a specific team spec including rendered HTML content.

参数

名称类型必填说明
slugstring必填The team's URL slug (e.g. fullstack-dev-team)

请求示例

curl https://www.teamsmarket.com/api/teams/fullstack-dev-team

响应示例

{
  "slug": "fullstack-dev-team",
  "name": "Full-Stack Dev Team",
  "description": "End-to-end web development...",
  "agentCount": 6,
  "difficulty": "intermediate",
  "version": "1.0.0",
  "tags": ["react", "node", "typescript"],
  "content": "# Full-Stack Dev Team\n..."
}
GET/api/teams/{slug}/spec

Returns the raw Markdown spec file. Ideal for piping directly into AGENTS.md or .cursorrules.

参数

名称类型必填说明
slugstring必填The team's URL slug

请求示例

curl https://www.teamsmarket.com/api/teams/fullstack-dev-team/spec > AGENTS.md

响应示例

# Full-Stack Dev Team

## Overview
A coordinated team of AI agents covering the full web development lifecycle...

### 1. Architect Agent
...
GET/api/teams/{slug}/export

Export a team spec in a structured format for agent frameworks. Pro+ required for non-markdown formats.

参数

名称类型必填说明
slugstring必填The team's URL slug
formatstring必填One of: markdown, crewai, autogen, langgraph, openclaw

请求示例

curl "https://www.teamsmarket.com/api/teams/fullstack-dev-team/export?format=crewai"

响应示例

# CrewAI export
agents:
  - role: Architect Agent
    goal: Design scalable system architecture
    backstory: Expert in distributed systems...
    tools: [code_analysis, diagram_generation]
...
GET/api/discover

Semantic discovery: describe a task in natural language and get ranked team recommendations.

参数

名称类型必填说明
taskstring必填Natural language description of your task or workflow
limitnumber可选Max results to return (default: 5)

请求示例

curl "https://www.teamsmarket.com/api/discover?task=migrate+rails+monolith+to+microservices"

响应示例

{
  "recommendations": [
    {
      "slug": "microservices-migration-team",
      "name": "Microservices Migration Team",
      "score": 0.94,
      "reason": "Strong match for migration and architecture tasks"
    }
  ]
}
GET/api/compose

Compose a multi-team configuration for complex tasks that span multiple domains.

参数

名称类型必填说明
taskstring必填The complex task to decompose into team responsibilities

请求示例

curl "https://www.teamsmarket.com/api/compose?task=build+and+launch+a+saas+product"

响应示例

{
  "composition": [
    { "slug": "fullstack-dev-team", "role": "core development" },
    { "slug": "devops-pipeline-team", "role": "infrastructure & deployment" },
    { "slug": "seo-growth-team", "role": "launch & growth" }
  ]
}

Spec 解剖

每个团队 Spec 由五个不同的层级构成。理解它们有助于你选对团队 — 也能帮你写出更好的 Spec。

1

数据契约

机器可读的前置元数据 — name、slug、category、agentCount、tags、difficulty、version。搜索、筛选和 API 发现消费的就是这一层。

2

角色与边界

每个 Agent 都有明确的专长、职责和边界。Agent「不做什么」和「做什么」同样重要 — 边界防止职责蔓延和行为冲突。

3

流程与验收

带编号的工作流步骤,附带成功标准。每一步定义做什么、谁来做、怎样算完成。没有验收标准的流程只是建议,不是契约。

4

输出契约

命名的交付物,附带格式预期。「安全审查报告」精确定义了包含什么 — CVE 编号、CVSS 评分、修复步骤 — 而不只是一个模糊的标签。

5

集成接口

团队对接的工具、平台和数据源。这一层让 Spec 可组合 — 你可以替换工具而不需要重写团队定义。

示例:每一层长什么样

---
# Layer 1: Data Contract
name: "Code Review Squad"
category: "code-review-quality"
agentCount: 4
difficulty: "intermediate"
tags: ["code-review", "security", "performance"]
---

## Team Members          ← Layer 2: Role & Boundary
### 1. Security Reviewer
- **Responsibilities**: Scan for injection, verify auth...
- **Boundaries**: Does NOT fix the code, does NOT block on style

## Workflow               ← Layer 3: Process & Acceptance
1. **PR Intake**
   Success criteria: All reviewers confirmed PR intent

## Output Artifacts       ← Layer 4: Output Contract
1. **Security Review Report** — CVE IDs, CVSS scores,
   reproduction steps, remediation guidance

## Integration Points     ← Layer 5: Integration Surface
- GitHub / GitLab PR workflows
- SonarQube, Snyk, ESLint

编写你自己的 Spec

想为你的组织创建自定义团队 Spec?遵循这些从生产级 Agent 系统中提炼的原则,写出真正有效的 Spec。

具体优于笼统

「检查通过字符串拼接导致的 SQL 注入」是可执行的。「检查安全问题」则不是。每条指令都应该具体到两个不同的 Agent 会做出相同的事。

示例澄清行为

在 Agent 职责中包含具体场景。真实示例消除歧义的效果远超抽象描述。

边界防止偏移

明确说明每个 Agent「不做什么」。没有明确边界,Agent 会尝试超出其专长的任务 — 产出低质量结果并与其他 Agent 冲突。

成功标准使验证成为可能

每个工作流步骤都需要一个「怎样算完成?」的条件。没有成功标准的步骤无法验证、度量或自动化。

观点冲突是特性而非缺陷

当 Agent 之间产生分歧时,暴露权衡而非隐藏。评审者说「简化」而性能分析师说「优化」,这会促使做出有意识的设计决策。

输出格式很重要

定义交付物的结构,让下游消费者可以解析。有固定结构的报告比自由文本有用 10 倍。

模板

每个团队 Spec 应包含以下章节,按顺序排列:

## Overview
What the team does + why it exists + who it's for.

## Team Members
### 1. Agent Name
- **Role**: One-line role description
- **Expertise**: Domain keywords
- **Responsibilities**: 6+ specific, actionable items
- **Boundaries**: What this agent does NOT do

## Key Principles
Decision frameworks the team follows.

## Boundaries
What the team as a whole does NOT do.
Prevents scope creep and sets expectations.

## Workflow
1. **Step Name** — What happens, who does it.
   **Success criteria:** How you know it's done.

## Output Artifacts
1. **Deliverable Name** — Contents and format.

## Ideal For
Trigger conditions: when should someone use this team?

## Integration Points
Tools, platforms, and data sources.

速率限制

速率限制同时适用于 MCP 服务器和 REST API 端点。

免费版

每月 100 次请求,按 IP 地址限制。

专业版与团队版

使用 Bearer Token 认证后无限次请求。

企业版

定制化大批量定价与专属基础设施。请联系销售。

每个响应中均包含速率限制响应头:

X-RateLimit-Remaining:本月剩余调用次数
X-RateLimit-Reset:限额重置的 Unix 时间戳

SDK 与集成

cURL

# List all teams
curl https://www.teamsmarket.com/api/teams

# Search teams
curl "https://www.teamsmarket.com/api/teams?q=kubernetes&category=devops-infrastructure"

# Get a team spec (pipe to AGENTS.md)
curl https://www.teamsmarket.com/api/teams/code-review-squad/spec > AGENTS.md

# Export as CrewAI (requires Pro token)
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://www.teamsmarket.com/api/teams/code-review-squad/export?format=crewai"

# Test MCP server directly
curl -X POST https://www.teamsmarket.com/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Python

import httpx

BASE_URL = "https://www.teamsmarket.com/api"

# List teams by category
response = httpx.get(f"{BASE_URL}/teams", params={"category": "software-development"})
teams = response.json()["teams"]
print(f"Found {len(teams)} teams")

# Semantic discovery
result = httpx.get(
    f"{BASE_URL}/discover",
    params={"task": "migrate rails monolith to microservices"},
).json()
for rec in result["recommendations"]:
    print(f"{rec['name']} (score: {rec['score']})")

# Call MCP tools directly via JSON-RPC
import json
rpc = {"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {
    "name": "activate_for_task",
    "arguments": {"task": "code review"}
}}
resp = httpx.post("https://www.teamsmarket.com/mcp", json=rpc)
print(resp.json())

TypeScript / JavaScript

const BASE_URL = "https://www.teamsmarket.com/api";

async function listTeams(category?: string) {
  const url = new URL(`${BASE_URL}/teams`);
  if (category) url.searchParams.set("category", category);
  const res = await fetch(url.toString());
  return res.json();
}

async function discoverTeams(task: string) {
  const url = new URL(`${BASE_URL}/discover`);
  url.searchParams.set("task", task);
  const res = await fetch(url.toString());
  return res.json();
}

// Usage
const { teams } = await listTeams("devops-infrastructure");
const { recommendations } = await discoverTeams("set up CI/CD for a Next.js app");

准备开始构建?

升级到 Pro 版获得无限 API 访问、多格式导出和语义发现功能。