{"_id":"@brxce/bruce-studio-mcp","_rev":"2-2de29f900d1547d418653ea2ca8452e8","name":"@brxce/bruce-studio-mcp","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@brxce/bruce-studio-mcp","version":"0.0.1","keywords":["mcp","model-context-protocol","bruce-studio","threads","content-management","ai","claude"],"author":{"name":"intellieffect","email":"bruce@intellieffect.com"},"license":"MIT","_id":"@brxce/bruce-studio-mcp@0.0.1","maintainers":[{"name":"intellieffect","email":"bruce@intellieffect.com"}],"homepage":"https://github.com/intellieffect/bruce-studio/tree/main/bruce-studio-mcp#readme","bugs":{"url":"https://github.com/intellieffect/bruce-studio/issues"},"bin":{"bruce-studio-mcp":"dist/index.js"},"dist":{"shasum":"800cd7afc073a4fa984efabcbca2260f3448525e","tarball":"https://registry.npmjs.org/@brxce/bruce-studio-mcp/-/bruce-studio-mcp-0.0.1.tgz","fileCount":4,"integrity":"sha512-0elhnrid2BHqxfVcahQMPOZAI5S7zCnySTe31GkI7BnlH3/MpqUJkuzxkVTvlO8N6TMV60t0hhK4zDbvgEVKmA==","signatures":[{"sig":"MEYCIQC0sWrVqFKDuzP9XOU7eGWQC4cjVAtLGWefBXadJDXDIAIhAKZcnfYOnkiI5XTVs1CKivrI3GYe5XRoPctotbCt9hs5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84097},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"35b4a4a177bf4d2494bd291bb5b9099f3b51e10b","scripts":{"dev":"tsx src/index.ts","test":"vitest","build":"tsup","start":"node dist/index.js","test:coverage":"vitest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"intellieffect","email":"bruce@intellieffect.com"},"repository":{"url":"git+https://github.com/intellieffect/bruce-studio.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Bruce Studio - Content management and marketing automation for Threads","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^3.23.8","dotenv":"^16.4.5","zod-to-json-schema":"^3.24.6","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.5.1","vitest":"^2.1.9","typescript":"^5.7.2","@types/node":"^22.10.2","@vitest/coverage-v8":"^2.1.9","@bruce-studio/shared":"file:../shared"},"_npmOperationalInternal":{"tmp":"tmp/bruce-studio-mcp_0.0.1_1767836060939_0.091331063235635","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@brxce/bruce-studio-mcp","version":"0.0.2","description":"MCP server for Bruce Studio - Content management and marketing automation for Threads","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"bruce-studio-mcp":"dist/index.js"},"scripts":{"dev":"tsx src/index.ts","build":"tsup","start":"node dist/index.js","test":"vitest","test:coverage":"vitest --coverage","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","bruce-studio","threads","content-management","ai","claude"],"author":{"name":"intellieffect","email":"bruce@intellieffect.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/intellieffect/bruce-studio.git"},"bugs":{"url":"https://github.com/intellieffect/bruce-studio/issues"},"homepage":"https://github.com/intellieffect/bruce-studio/tree/main/bruce-studio-mcp#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","dotenv":"^16.4.5","zod":"^3.23.8","zod-to-json-schema":"^3.24.6"},"devDependencies":{"@bruce-studio/shared":"file:../shared","@types/node":"^22.10.2","@vitest/coverage-v8":"^2.1.9","tsup":"^8.5.1","tsx":"^4.19.2","typescript":"^5.7.2","vitest":"^2.1.9"},"engines":{"node":">=18"},"gitHead":"35b4a4a177bf4d2494bd291bb5b9099f3b51e10b","_id":"@brxce/bruce-studio-mcp@0.0.2","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-3XDTwedsqw0fWfqKlh49pSJ0f2grWWMt2/Pc7xdPG1auni8TpkfTdUTw/QpU4qE7svw74vxScAch4KYrr3wF5w==","shasum":"7ec8047e72e0c942b39e6c178aafdfbbdf5d4777","tarball":"https://registry.npmjs.org/@brxce/bruce-studio-mcp/-/bruce-studio-mcp-0.0.2.tgz","fileCount":4,"unpackedSize":84805,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDfK50RgI0TGlj27Izva9MfMRswryHVFIpGaqo5id3LEAiEAq+wfeREZ+y1FREKGaqhRum1+GahNbeodCqz8FWzzfuc="}]},"_npmUser":{"name":"intellieffect","email":"bruce@intellieffect.com"},"directories":{},"maintainers":[{"name":"intellieffect","email":"bruce@intellieffect.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bruce-studio-mcp_0.0.2_1767861309426_0.3726480844183946"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-08T01:34:20.837Z","modified":"2026-01-08T08:35:09.778Z","0.0.1":"2026-01-08T01:34:21.140Z","0.0.2":"2026-01-08T08:35:09.584Z"},"bugs":{"url":"https://github.com/intellieffect/bruce-studio/issues"},"author":{"name":"intellieffect","email":"bruce@intellieffect.com"},"license":"MIT","homepage":"https://github.com/intellieffect/bruce-studio/tree/main/bruce-studio-mcp#readme","keywords":["mcp","model-context-protocol","bruce-studio","threads","content-management","ai","claude"],"repository":{"type":"git","url":"git+https://github.com/intellieffect/bruce-studio.git"},"description":"MCP server for Bruce Studio - Content management and marketing automation for Threads","maintainers":[{"name":"intellieffect","email":"bruce@intellieffect.com"}],"readme":"# @brxce/bruce-studio-mcp\n\nMCP (Model Context Protocol) server for Bruce Studio - Content management and marketing automation for Threads.\n\n## Features\n\n- **Content CRUD**: Create, read, update, delete content metadata\n- **Revision Management**: Full version control with branching support\n- **Insights**: User editing pattern analysis\n- **Analytics**: Performance metrics and analysis\n- **Threads Data**: Threads posts/analytics 조회 및 동기화\n\n## Architecture\n\nThis MCP server connects Claude Desktop to the Bruce Studio API backend:\n\n```\n┌─────────────────┐      ┌─────────────────┐      ┌─────────────────┐\n│  Claude Desktop │◄────►│   MCP Server    │◄────►│   API Server    │\n│  (AI Assistant) │      │   (stdio)       │      │   (Port 9000)   │\n└─────────────────┘      └─────────────────┘      └─────────────────┘\n```\n\n## Setup\n\n### Prerequisites\n\n- Node.js 18+\n- Bruce Studio API server running on port 9000\n- Claude Desktop application\n\n### Installation\n\nNo installation required - runs via npx.\n\n### Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `BACKEND_URL` | Bruce Studio API endpoint | Yes |\n\n## Claude Desktop Integration\n\nAdd this configuration to your Claude Desktop config file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"bruce-studio-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@brxce/bruce-studio-mcp\"],\n      \"env\": {\n        \"BACKEND_URL\": \"http://localhost:9000/api/v1\"\n      }\n    }\n  }\n}\n```\n\nAfter updating the config, restart Claude Desktop.\n\n## Claude Code Integration\n\nAdd to your `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"bruce-studio-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@brxce/bruce-studio-mcp\"],\n      \"env\": {\n        \"BACKEND_URL\": \"http://localhost:9000/api/v1\"\n      }\n    }\n  }\n}\n```\n\n## Available MCP Tools\n\n### Content Management\n\n#### `threads_list_contents`\nList all contents with optional filters\n\n**Parameters**:\n- `category` (optional): Filter by category/pillar\n- `status` (optional): Filter by status (draft, approved, scheduled, published)\n- `limit` (optional): Maximum number of results (default: 50)\n\n**Example**:\n```typescript\n{\n  \"category\": \"productivity-tips\",\n  \"status\": \"published\",\n  \"limit\": 10\n}\n```\n\n#### `threads_get_content`\nGet a specific content by UUID (includes current revision text)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n\n#### `threads_create_content`\nCreate a new content with initial revision\n\n**Parameters**:\n- `title` (optional): Content title\n- `text` (optional): Initial content text\n- `status` (optional): Status (default: 'draft')\n- `category` (optional): Content category/pillar\n- `tags` (optional): Array of tags\n- `message` (optional): Initial revision message\n\n#### `threads_update_content_metadata`\nUpdate content metadata (does NOT change text - use `threads_create_revision` to edit text)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n- `title` (optional): New title\n- `status` (optional): New status\n- `category` (optional): New category\n- `tags` (optional): New tags\n- `scheduledDate` (optional): Scheduled publish date (ISO 8601)\n- `publishedDate` (optional): Published date (ISO 8601)\n- `liked` (optional): Liked status\n- `impressions` (optional): Number of impressions\n- `engagementRate` (optional): Engagement rate (0-1)\n\n#### `threads_delete_content`\nDelete a content and all its revisions\n\n**Parameters**:\n- `contentId` (required): Content UUID to delete\n\n#### `threads_get_pillars`\nGet list of available content pillars/categories\n\n**Parameters**: None\n\n---\n\n### Revision Management\n\n#### `threads_list_revisions`\nList all revisions for a content (metadata only, no text)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n\n#### `threads_get_revision`\nGet a specific revision by UUID (includes full text content)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n- `revisionId` (required): Revision UUID\n\n#### `threads_get_revision_tree`\nGet the full revision tree showing parent-child relationships (branching structure)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n\n**Returns**: Tree structure with all revisions and their relationships\n\n#### `threads_create_revision`\nCreate a new revision (version) of content text\n\n**Parameters**:\n- `contentId` (required): Content UUID\n- `content` (required): New revision text content\n- `message` (optional): Commit message describing changes\n- `author` (optional): 'manual' or 'ai' (default: 'manual')\n- `aiPrompt` (optional): AI prompt used (if author='ai')\n- `parentRevisionId` (optional): Parent revision UUID (defaults to current revision)\n- `setAsCurrent` (optional): Set this revision as the current one (default: true)\n\n**Example - Creating a new revision**:\n```typescript\n{\n  \"contentId\": \"a894ed46-cad9-466f-95f1-42614a7e780a\",\n  \"content\": \"Updated content text...\",\n  \"message\": \"Fixed typos and improved clarity\",\n  \"author\": \"manual\"\n}\n```\n\n**Example - Creating a branch**:\n```typescript\n{\n  \"contentId\": \"a894ed46-cad9-466f-95f1-42614a7e780a\",\n  \"content\": \"Alternative version...\",\n  \"message\": \"Trying a different approach\",\n  \"parentRevisionId\": \"2e4d48c3-06e6-4441-b21e-8d2110bdc1b9\",\n  \"setAsCurrent\": false\n}\n```\n\n#### `threads_update_revision_metadata`\nUpdate revision metadata (message, author, aiPrompt)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n- `revisionId` (required): Revision UUID\n- `message` (optional): New commit message\n- `author` (optional): Update author type\n- `aiPrompt` (optional): Update AI prompt\n\n#### `threads_delete_revision`\nDelete a revision (optionally cascade to children)\n\n**Parameters**:\n- `contentId` (required): Content UUID\n- `revisionId` (required): Revision UUID to delete\n- `cascade` (optional): Also delete all child revisions (default: false)\n\n#### `threads_restore_revision`\nRestore an old revision by creating a new revision from it\n\n**Parameters**:\n- `contentId` (required): Content UUID\n- `revisionId` (required): Revision UUID to restore from\n- `message` (optional): Custom message (default: \"Restored from revision {hash}\")\n\n---\n\n### Insights\n\n#### `threads_list_insights`\nList editing insights with optional scope filtering\n\n**Parameters**:\n- `scope` (optional): Filter by scope type ('user', 'content', 'pillar')\n- `contentId` (optional): Filter by specific content\n- `pillar` (optional): Filter by pillar\n\n#### `threads_get_insight`\nGet detailed information about a specific insight\n\n**Parameters**:\n- `insightId` (required): Insight ID\n\n#### `threads_get_insight_context`\nGet formatted insight context for LLM to understand user editing patterns\n\n**Parameters**:\n- `scope` (optional): Scope type\n- `contentId` (optional): Content ID\n- `pillar` (optional): Pillar name\n\n---\n\n### Analytics\n\n#### `threads_analyze_performance`\nAnalyze performance metrics across contents\n\n**Parameters**:\n- `startDate` (optional): Start date (ISO 8601)\n- `endDate` (optional): End date (ISO 8601)\n- `pillar` (optional): Filter by pillar\n\n---\n\n### Threads Data\n\n#### `threads_read_posts`\nFetch Threads posts from the local DB (optionally force sync with Threads API) and display summary + preview.\n\n**Parameters**:\n- `sync` (optional): Set to `true` to trigger a fresh sync before returning data\n\n**Response**: Includes totals (posts/views/likes/replies/avg engagement), date range, optional sync metadata, and up to 5 preview posts with engagement data.\n\n---\n\n## Development\n\n### Running in Development\n\n```bash\nnpm run dev\n```\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Testing\n\n```bash\n# Test with a simple script\nnode test-api.js\n```\n\n## Data Models\n\n### Content\nMetadata container for a piece of content (does NOT contain text):\n\n```typescript\ninterface Content {\n  id: string                  // UUID\n  title: string\n  status: 'draft' | 'approved' | 'scheduled' | 'published'\n  category: string            // pillar (quicknote, productivity-tips, etc.)\n  tags: string[]\n  currentRevisionId: string   // UUID of active revision\n  createdAt: string\n  updatedAt: string\n  scheduledDate?: string\n  publishedDate?: string\n  liked: boolean\n  impressions: number\n  engagementRate: number\n}\n```\n\n### ContentRevision\nVersioned snapshot of content text:\n\n```typescript\ninterface ContentRevision {\n  id: string                  // UUID\n  contentId: string           // Parent content UUID\n  revisionNumber: number      // Sequential number (1, 2, 3...)\n  hash: string                // Git-style 7-character hash\n  content: string             // The actual text content\n  parentRevisionId: string | null  // Parent revision UUID (null for root)\n  children: string[]          // Child revision UUIDs\n  message: string             // Commit message\n  author: 'manual' | 'ai'\n  aiPrompt?: string\n  createdAt: string\n}\n```\n\n## Troubleshooting\n\n### MCP Server Not Showing in Claude Desktop\n\n1. Check that the path in `claude_desktop_config.json` is absolute and correct\n2. Verify the API server is running on port 9000\n3. Restart Claude Desktop completely\n4. Check Claude Desktop logs for errors\n\n### Connection Errors\n\n1. Ensure `BACKEND_URL` environment variable is set correctly\n2. Verify the API server is accessible at the specified URL\n3. Check for firewall or network issues\n\n### Tool Execution Errors\n\n1. Check the API server logs for detailed error messages\n2. Verify that content/revision IDs are valid UUIDs\n3. Ensure required parameters are provided\n\n## Related Projects\n\n- [bruce-studio-api](../bruce-studio-api) - Backend API server\n- [bruce-studio-web](../bruce-studio-web) - Web frontend\n- [@brxce/shared](../shared) - Shared TypeScript types and schemas\n\n## License\n\nMIT\n","readmeFilename":"README.md"}