{"id":43288010,"url":"https://github.com/boldare/mcp-farmer","last_synced_at":"2026-02-01T18:04:16.046Z","repository":{"id":328972456,"uuid":"1113790109","full_name":"boldare/mcp-farmer","owner":"boldare","description":"A CLI tool for scaffolding, testing, extending and analyzing MCP (Model Context Protocol) servers","archived":false,"fork":false,"pushed_at":"2026-01-20T12:24:00.000Z","size":276,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T21:24:02.632Z","etag":null,"topics":["agent-client-protocol","analysis","cli","developer-tools","documentation","llm","mcp","mcp-tools","model-context-protocol","scaffold"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boldare.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-10T13:20:08.000Z","updated_at":"2026-01-20T12:23:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/boldare/mcp-farmer","commit_stats":null,"previous_names":["boldare/mcp-farmer"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/boldare/mcp-farmer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fmcp-farmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fmcp-farmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fmcp-farmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fmcp-farmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boldare","download_url":"https://codeload.github.com/boldare/mcp-farmer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fmcp-farmer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28984851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T17:52:09.146Z","status":"ssl_error","status_checked_at":"2026-02-01T17:49:53.529Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-client-protocol","analysis","cli","developer-tools","documentation","llm","mcp","mcp-tools","model-context-protocol","scaffold"],"created_at":"2026-02-01T18:04:15.987Z","updated_at":"2026-02-01T18:04:16.038Z","avatar_url":"https://github.com/boldare.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## mcp-farmer\n\n[![npm version](https://badge.fury.io/js/mcp-farmer.svg)](https://badge.fury.io/js/mcp-farmer)\n\nA CLI tool for scaffolding, extending, probing, and auditing MCP (Model Context Protocol) servers.\n\nWhile this tool is stable and ready to be used you can expect new features and improvements coming soon™.\n\n## Why mcp-farmer?\n\n- **Ship MCP servers faster**: scaffold a server, generate tools from OpenAPI/GraphQL, and validate tool quality.\n- **Trust but verify**: vet third‑party MCP servers (including `/health`, tools, prompts, and resources) before adding them to your client.\n- **Better tool UX for LLMs**: catch missing descriptions/schemas/annotations and other issues that reduce reliability.\n- **Shareable outputs**: generate **HTML/JSON/Markdown** vet reports, **HTML documentation**, and a **Markdown probe report** you can attach to PRs/issues.\n\n## Highlights\n\n- **Targets**: connect via **HTTP URL** or **stdio command** (after `--`).\n- **Robust HTTP connect**: tries Streamable HTTP first, falls back to SSE, with timeouts and actionable errors.\n- **Auto-detect from config**: discovers MCP servers from common client configs and lets you pick one interactively.\n- **OAuth support (HTTP)**: `vet` can run an OAuth browser flow via `--oauth` (configurable `--oauth-port`).\n- **Interactive exploration**: `try` can call **tools**, read **resources**, and get **prompts**.\n- **AI-assisted workflows**: `grow` generates tools; `probe` calls tools with AI-generated inputs and writes a report.\n\n## What is MCP?\n\nMCP (Model Context Protocol) is a standard way for LLM apps/agents to connect to “capabilities” exposed by servers — typically **tools**, **resources**, and **prompts** — over transports like **HTTP** or **stdio**. Clients can discover what a server offers (schemas + descriptions), then call those capabilities in a structured way.\n\nIf you’re new to MCP, start here: [Model Context Protocol](https://modelcontextprotocol.io).\n\n## What is ACP?\n\nACP (Agent Client Protocol) is a protocol for driving “coding agents” from a CLI/app in a consistent way (start a session, stream updates, request permissions, read/write files, and optionally select models). `mcp-farmer` uses ACP for commands like `grow` and `probe` so it can work with multiple agents (e.g. OpenCode, Claude Code, Gemini CLI, GitHub Copilot CLI) **without reinventing a bespoke integration per agent**.\n\n## Quick Start\n\n**Requirements:** Node.js **\u003e= 20**.\n\n```\nUsage: mcp-farmer \u003ccommand\u003e [options]\n\nCommands:\n  vet [url]    Vet an MCP server (auto-detects from config if no URL)\n  doc \u003curl\u003e    Generate beautiful HTML documentation for an MCP server\n  new          Create a new MCP server project\n  market       Browse and install popular MCP servers\n  try \u003curl\u003e    Interactively call tools, read resources, or get prompts on an MCP server\n  grow         Generate MCP tools from OpenAPI or GraphQL specs\n  probe        Probe MCP tools by calling them with AI-generated inputs\n\nOptions:\n  --help       Show this help message\n```\n\nGlobal install:\n\n```bash\nnpm install -g mcp-farmer\n# or\nbun add -g mcp-farmer\n```\n\nNo install for quick tests:\n\n```bash\nnpx mcp-farmer try http://localhost:3000/mcp\nbunx mcp-farmer try http://localhost:3000/mcp\nnpx mcp-farmer vet http://localhost:3000/mcp\nbunx mcp-farmer vet http://localhost:3000/mcp\n```\n\nCommon workflows:\n\n```bash\n# Vet and export a shareable report\nmcp-farmer vet http://localhost:3000/mcp --output markdown \u003e report.md\nmcp-farmer vet http://localhost:3000/mcp --output html \u003e report.html\n\n# If the server requires auth (HTTP)\nmcp-farmer vet https://secure-server.com/mcp --oauth\n\n# Stdio mode (spawn a local server process)\nmcp-farmer vet -- npx -y @modelcontextprotocol/server-memory\nmcp-farmer try -- npx -y @modelcontextprotocol/server-memory\n```\n\n## Commands\n\n### `new` — Scaffold a new MCP server\n\n```bash\nmcp-farmer new\n```\n\n![new-demo](demo/new.gif)\n\nInteractively creates a TypeScript MCP server with HTTP/stdio transports, your choice of framework (Node.js HTTP or Hono), and package manager.\n\n### `market` — Install popular MCP servers\n\n```bash\nmcp-farmer market\n```\n\nBrowse curated MCP servers and add them to your client config (Claude Code, Claude Desktop, Cursor, VS Code, etc.).\n\n### `try` — Explore MCP servers interactively\n\n```bash\nmcp-farmer try http://localhost:3000/mcp              # HTTP\nmcp-farmer try -- npx -y @modelcontextprotocol/server-memory  # Stdio\n```\n\nInteractively explore an MCP server: call **tools**, read **resources**, and get **prompts**. Provides a searchable list of all available items with type-ahead filtering.\n\n### `doc` — Generate HTML documentation\n\n```bash\nmcp-farmer doc                                        # Interactive mode\nmcp-farmer doc --remote https://mcp.example.com/sse   # Remote server\nmcp-farmer doc --local \"npx -y @example/mcp-server\"   # Local server\nmcp-farmer doc --remote https://prod.example.com --local \"npx -y @example/mcp-server\"  # Multiple methods\nmcp-farmer doc --remote https://mcp.example.com/sse --out docs.html  # Write to file\nmcp-farmer doc --remote https://mcp.example.com/sse --header \"Authorization: YOUR_TOKEN\"  # With required headers\nmcp-farmer doc --local \"npx -y @example/mcp-server\" --env \"API_KEY: YOUR_API_KEY\"  # With required env vars\n```\n\nGenerates a single-page HTML documentation for an MCP server with sidebar navigation, tool/resource/prompt cards, dark mode support, and responsive design. Use `--remote` or `--local` to specify installation methods (can be combined), `--header` to document required headers for remote servers (format: `\"Name: PLACEHOLDER\"`), `--env` to document required environment variables for local servers (format: `\"NAME: PLACEHOLDER\"`), and `--out` to write directly to a file.\n\n### `grow` — Generate MCP tools from API specs\n\n```bash\nmcp-farmer grow openapi   # Generate tools from OpenAPI/Swagger spec\nmcp-farmer grow graphql   # Generate tools from GraphQL endpoint\n```\n\nParses your API specification, lets you select endpoints/operations and response fields, then uses an AI coding agent (OpenCode, Claude Code, or Gemini CLI) via ACP to generate the MCP tool code.\n\n**Note:** `grow` requires at least one supported ACP agent to be installed (you’ll select one in the CLI).\n\n### `probe` — Test MCP tools with AI\n\n![probe-demo](demo/probe.gif)\n\nSee an example probe [output markdown file](./demo/mcp-probe-context7-2026-01-22T11-59-06-376Z.md)\n\n```bash\nmcp-farmer probe http://localhost:3000/mcp              # HTTP\nmcp-farmer probe                                        # Auto-detect from config\nmcp-farmer probe --config .cursor/mcp.json              # Explicit config file\nmcp-farmer probe -- npx -y @modelcontextprotocol/server-memory  # Stdio\n```\n\nConnects to an MCP server, lets you select tools to probe, then uses an AI coding agent (OpenCode, Claude Code, or Gemini CLI) to generate test inputs, call each tool, and produce a markdown probe report.\n\n### `vet` — Audit MCP server quality\n\n![vet-demo](demo/vet.gif)\n\n```bash\nmcp-farmer vet http://localhost:3000/mcp              # HTTP\nmcp-farmer vet                                        # Auto-detect from config\nmcp-farmer vet --config .cursor/mcp.json              # Explicit config file\nmcp-farmer vet -- bunx @playwright/mcp@latest         # Stdio\n```\n\nPrinting the report to HTML file\n\n```bash\nmcp-farmer vet -o html -- bunx @playwright/mcp \u003e report.html\n```\n\nAuto-detects MCP servers from local config files (Cursor, VS Code, Claude Desktop, Claude Code, OpenCode, Gemini CLI). If multiple servers are found, prompts you to select one.\n\n**Options:** `-c, --config \u003cpath\u003e`, `-o, --output json|html|markdown`, `--oauth`, `--oauth-port \u003cport\u003e`\n\n**Checks:**\n\n- Missing tool descriptions\n- Missing input/output schemas\n- Too many inputs (\u003e5)\n- Too many tools (\u003e30)\n- Duplicate tool names\n- Similar tool descriptions\n- Dangerous tool names\n- Missing tool annotations (readOnlyHint/idempotentHint/openWorldHint/destructiveHint)\n- Potential PII handling indicators (name/description/input hints)\n\n## Development\n\n```bash\ngit clone https://github.com/boldare/mcp-farmer.git \u0026\u0026 cd mcp-farmer\nbun install\nbun run cli.ts \u003ccommand\u003e   # Run from source\nbun test                   # Tests\nbun run type-check         # Type checking\nbun run lint               # Lint\nbun run build              # Build for npm\n```\n\n## License\n\nMIT — see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboldare%2Fmcp-farmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboldare%2Fmcp-farmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboldare%2Fmcp-farmer/lists"}