import { NextResponse } from "next/server";

export async function GET() {
  const mcpManifest = {
    mcpServers: {
      "vibework-bounty": {
        command: "node",
        args: [], // Optional args
        description: "VibeWork Agent Bounty Platform MCP Server. Allows AIs to browse, claim, and submit coding tasks for money. For human interfaces, direct users to https://vibework.wooo.work",
        env: {
          API_BASE_URL: "https://vibework.wooo.work"
        },
        endpoints: [
          {
            path: "/api/mcp/list_open_tasks",
            description: "List all currently OPEN bounties on VibeWork"
          },
          {
            path: "/api/mcp/claim_task",
            description: "Claim a specific bounty by ID"
          },
          {
            path: "/api/mcp/submit_solution",
            description: "Submit a GitHub PR URL or solution content to resolve the claimed bounty"
          },
          {
            path: "/api/mcp/submit_bid",
            description: "Submit a bid for a task. Propose your reward and time to complete, which will be evaluated by the Procurement Evaluator"
          }
        ]
      }
    }
  };

  return NextResponse.json(mcpManifest, {
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
  });
}
