{"id":45721988,"url":"https://github.com/selfagency/beans-mcp","last_synced_at":"2026-04-06T06:07:24.174Z","repository":{"id":340488577,"uuid":"1166165864","full_name":"selfagency/beans-mcp","owner":"selfagency","description":"🫘 MCP server for Beans issue tracker","archived":false,"fork":false,"pushed_at":"2026-03-13T20:02:00.000Z","size":390,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-14T07:52:47.827Z","etag":null,"topics":["ai-agents","beans","issue-tracker","issues","issues-tracker","mcp","mcp-server","model-context-protocol"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@selfagency/beans-mcp","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/selfagency.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":null,"dco":null,"cla":null}},"created_at":"2026-02-25T00:06:43.000Z","updated_at":"2026-03-13T20:01:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/selfagency/beans-mcp","commit_stats":null,"previous_names":["selfagency/beans-mcp"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/selfagency/beans-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfagency%2Fbeans-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfagency%2Fbeans-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfagency%2Fbeans-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfagency%2Fbeans-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfagency","download_url":"https://codeload.github.com/selfagency/beans-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfagency%2Fbeans-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai-agents","beans","issue-tracker","issues","issues-tracker","mcp","mcp-server","model-context-protocol"],"created_at":"2026-02-25T06:16:52.113Z","updated_at":"2026-04-06T06:07:24.168Z","avatar_url":"https://github.com/selfagency.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @selfagency/beans-mcp 🫘\n\n[![Test \u0026 Build](https://github.com/selfagency/beans-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/selfagency/beans-mcp/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/selfagency/beans-mcp/graph/badge.svg?token=udeAJyu8Nu)](https://codecov.io/gh/selfagency/beans-mcp)\n\nMCP (Model Context Protocol) server for [Beans](https://github.com/hmans/beans) issue tracker. Provides programmatic and CLI interfaces for AI-powered interactions with Beans workspaces.\n\n\u003e 🤖 **Try Beans fully-integrated with GitHub Copilot in VS Code! Install the \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=selfagency.beans-vscode\"\u003eselfagency.beans-vscode\u003c/a\u003e extension.**\n\n## Usage\n\n```bash\nnpx @selfagency/beans-mcp /path/to/workspace\n```\n\n### Versioning\n\n`@selfagency/beans-mcp` tracks upstream [Beans](https://github.com/hmans/beans) versions.\nFor example, Beans `v0.4.2` maps to `@selfagency/beans-mcp@0.4.2`.\n\nAt startup, the server compares its own package version against the installed `beans`\nCLI version. If they differ, it prints a warning to stderr and continues startup.\n\n### Parameters\n\n- `--workspace-root` or positional arg: Workspace root path\n- `--cli-path`: Path to Beans CLI\n- `--port`: MCP server port (default: 39173)\n- `--log-dir`: Log directory\n- `-h`, `--help`: Print usage and exit\n\n## Summary of public MCP tools\n\n- `beans_init` — Initialize the workspace (optional `prefix`).\n- `beans_view` — Fetch full bean details by `beanId` or `beanIds`.\n- `beans_create` — Create a new bean (title/type + optional fields).\n- `beans_update` — Consolidated metadata + body updates (status/type/priority/parent/clearParent/blocking/blockedBy/body/bodyAppend/bodyReplace) plus optional optimistic concurrency hint (`ifMatch`).\n- `beans_delete` — Delete one or many beans (`beanId` or `beanIds`, optional `force`).\n- `beans_reopen` — Reopen a completed or scrapped bean to an active status.\n- `beans_query` — Unified list/search/filter/sort/ready/llm_context/open_config operations.\n- `beans_bean_file` — Read/edit/create/delete files under `.beans`.\n- `beans_output` — Read extension output logs or show guidance.\n\n### Notes\n\n- The `beans_query` tool is intentionally broad: prefer it for listing, searching, filtering or sorting beans, and for generating Copilot instructions (`operation: 'llm_context'`).\n- All file and log operations validate paths to keep them within the workspace or the VS Code log directory.\n- `beans_update` replaces many fine-grained update tools; callers should use it to keep the public tool surface small and predictable.\n- Version mismatches are warning-only and non-blocking by design.\n\n## Examples\n\n### beans_init\n\nRequest:\n\n```json\n{ \"prefix\": \"project\" }\n```\n\nResponse (structuredContent):\n\n```json\n{ \"initialized\": true }\n```\n\n### beans_view\n\nRequest:\n\n```json\n{ \"beanId\": \"bean-abc\" }\n```\n\nRequest (multiple beans):\n\n```json\n{ \"beanIds\": [\"bean-abc\", \"bean-def\"] }\n```\n\nResponse (structuredContent):\n\n```json\n{\n  \"bean\": {\n    \"id\": \"bean-abc\",\n    \"title\": \"Fix login timeout\",\n    \"status\": \"todo\",\n    \"type\": \"bug\",\n    \"priority\": \"critical\",\n    \"body\": \"...markdown...\",\n    \"createdAt\": \"2025-12-01T12:00:00Z\",\n    \"updatedAt\": \"2025-12-02T08:00:00Z\"\n  }\n}\n```\n\n### beans_create\n\nRequest:\n\n```json\n{\n  \"title\": \"Add dark mode\",\n  \"type\": \"feature\",\n  \"status\": \"todo\",\n  \"priority\": \"normal\",\n  \"description\": \"Implement theme toggle and styles\"\n}\n```\n\nResponse (structuredContent):\n\n```json\n{\n  \"bean\": {\n    \"id\": \"new-1\",\n    \"title\": \"Add dark mode\",\n    \"status\": \"todo\",\n    \"type\": \"feature\"\n  }\n}\n```\n\n### beans_update\n\nRequest (change status and add blocking):\n\n```json\n{\n  \"beanId\": \"bean-abc\",\n  \"status\": \"in-progress\",\n  \"blocking\": [\"bean-def\"],\n  \"ifMatch\": \"etag-value\"\n}\n```\n\nRequest (atomic body modifications):\n\n```json\n{\n  \"beanId\": \"bean-abc\",\n  \"bodyReplace\": [\n    { \"old\": \"- [ ] Task 1\", \"new\": \"- [x] Task 1\" },\n    { \"old\": \"- [ ] Task 2\", \"new\": \"- [x] Task 2\" }\n  ],\n  \"bodyAppend\": \"## Summary\\n\\nAll checklist items completed.\"\n}\n```\n\n\u003e Note: `body` (full replacement) cannot be combined with `bodyAppend` or `bodyReplace` in the same request.\n\nResponse (structuredContent):\n\n```json\n{\n  \"bean\": {\n    \"id\": \"bean-abc\",\n    \"status\": \"in-progress\",\n    \"blockingIds\": [\"bean-def\"]\n  }\n}\n```\n\n### beans_delete\n\nRequest:\n\n```json\n{ \"beanId\": \"bean-old\", \"force\": false }\n```\n\nResponse:\n\n```json\n{ \"deleted\": true, \"beanId\": \"bean-old\" }\n```\n\nBatch request:\n\n```json\n{ \"beanIds\": [\"bean-old\", \"bean-older\"], \"force\": false }\n```\n\nBatch response (summary):\n\n```json\n{\n  \"requestedCount\": 2,\n  \"deletedCount\": 2,\n  \"failedCount\": 0,\n  \"results\": [\n    { \"beanId\": \"bean-old\", \"deleted\": true },\n    { \"beanId\": \"bean-older\", \"deleted\": true }\n  ]\n}\n```\n\n### beans_reopen\n\nRequest:\n\n```json\n{\n  \"beanId\": \"bean-closed\",\n  \"requiredCurrentStatus\": \"completed\",\n  \"targetStatus\": \"todo\"\n}\n```\n\nResponse:\n\n```json\n{ \"bean\": { \"id\": \"bean-closed\", \"status\": \"todo\" } }\n```\n\n### beans_query — examples\n\nRefresh (list all beans):\n\n```json\n{ \"operation\": \"refresh\" }\n```\n\nResponse (partial):\n\n```json\n{ \"count\": 12, \"beans\": [] }\n```\n\nFilter (statuses/types/tags):\n\n```json\n{\n  \"operation\": \"filter\",\n  \"statuses\": [\"in-progress\", \"todo\"],\n  \"types\": [\"bug\", \"feature\"],\n  \"tags\": [\"auth\"]\n}\n```\n\nSearch (full-text):\n\n```json\n{ \"operation\": \"search\", \"search\": \"authentication\", \"includeClosed\": false }\n```\n\nSort (modes: `status-priority-type-title`, `updated`, `created`, `id`):\n\n```json\n{ \"operation\": \"sort\", \"mode\": \"updated\" }\n```\n\nReady (actionable beans only):\n\n```json\n{ \"operation\": \"ready\" }\n```\n\nLLM context (generate Copilot instructions; optional write-to-workspace):\n\n```json\n{ \"operation\": \"llm_context\", \"writeToWorkspaceInstructions\": true }\n```\n\nResponse (structuredContent):\n\n```json\n{\n  \"graphqlSchema\": \"...\",\n  \"generatedInstructions\": \"...\",\n  \"instructionsPath\": \"/workspace/.github/instructions/beans-prime.instructions.md\"\n}\n```\n\n### beans_bean_file\n\nRequest (read):\n\n```json\n{ \"operation\": \"read\", \"path\": \"beans-vscode-123--title.md\" }\n```\n\nResponse:\n\n```json\n{\n  \"path\": \"/workspace/.beans/beans-vscode-123--title.md\",\n  \"content\": \"---\\n...frontmatter...\\n---\\n# Title\\n\"\n}\n```\n\n### beans_output\n\nRequest (read last 200 lines):\n\n```json\n{ \"operation\": \"read\", \"lines\": 200 }\n```\n\nResponse:\n\n```json\n{\n  \"path\": \"/workspace/.vscode/logs/beans-output.log\",\n  \"content\": \"...log lines...\",\n  \"linesReturned\": 200\n}\n```\n\n## Programmatic usage\n\n### Installation\n\n```bash\nnpm install beans-mcp\n```\n\n### Example\n\n```typescript\nimport { createBeansMcpServer, parseCliArgs } from \"@selfagency/beans-mcp\";\n\nconst server = await createBeansMcpServer({\n  workspaceRoot: \"/path/to/workspace\",\n  cliPath: \"beans\", // or path to beans CLI\n});\n\n// Connect to stdio transport or your own transport\n```\n\n### API\n\n#### createBeansMcpServer(opts)\n\nCreates and initializes a Beans MCP server instance.\n\n**Options:**\n\n- `workspaceRoot` (string): Path to the Beans workspace\n- `cliPath` (string, optional): Path to Beans CLI executable (default: 'beans')\n- `name` (string, optional): Server name (default: 'beans-mcp-server')\n- `version` (string, optional): Server version\n- `logDir` (string, optional): Directory for server logs\n- `backend` (BackendInterface, optional): Custom backend implementation\n\n**Returns:** `{ server: McpServer; backend: BackendInterface }`\n\n#### startBeansMcpServer(argv)\n\nCLI-compatible entrypoint for launching the server.\n\n### Utility Functions\n\n- `parseCliArgs(argv: string[])`: Parse CLI arguments\n- `isPathWithinRoot(root: string, target: string): boolean`: Check if path is contained within root\n- `sortBeans(beans, mode)`: Sort beans by specified mode\n\n### Types \u0026 Schemas\n\nExport of GraphQL schema, Zod validation schemas, and TypeScript types for Beans records and operations.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfagency%2Fbeans-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfagency%2Fbeans-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfagency%2Fbeans-mcp/lists"}