{"_id":"@edwardtang1024/mcp-openai-planner","name":"@edwardtang1024/mcp-openai-planner","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@edwardtang1024/mcp-openai-planner","version":"0.1.2","description":"MCP server for planning with with OpenAI o1 models","license":"MIT","author":{"name":"edwardtang"},"homepage":"https://github.com/edwardtang1024/mcp-openai-planner","repository":{"type":"git","url":"git+https://github.com/edwardtang1024/mcp-openai-planner.git"},"bugs":{"url":"https://github.com/edwardtang1024/mcp-openai-planner/issues"},"type":"module","bin":{"mcp-server-webresearch":"dist/index.js"},"publishConfig":{"access":"public"},"keywords":["mcp","model-context-protocol","openai","o1","ai","planning"],"dependencies":{"@modelcontextprotocol/sdk":"1.0.1","dotenv":"^16.4.7","openai":"4.77.0"},"devDependencies":{"rxjs":"^6.6.7","shx":"^0.3.4","tsx":"^4.19.2","typescript":"^5.6.2"},"scripts":{"build":"tsc && shx chmod +x dist/*.js","watch":"tsc --watch","dev":"tsx watch index.ts"},"_id":"@edwardtang1024/mcp-openai-planner@0.1.2","_integrity":"sha512-BBqUoDTeOnDSkw/mz12MRBA/hv88+E8Pip93fqig44CR1hkld9CT7sWLdMArF8wCbIrQSZyg7/qn/7HLFbdwkA==","_resolved":"/tmp/be5d37e3c1744fa4b3e9d3c0e3a543b5/edwardtang1024-mcp-openai-planner-0.1.2.tgz","_from":"file:edwardtang1024-mcp-openai-planner-0.1.2.tgz","_nodeVersion":"20.17.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-BBqUoDTeOnDSkw/mz12MRBA/hv88+E8Pip93fqig44CR1hkld9CT7sWLdMArF8wCbIrQSZyg7/qn/7HLFbdwkA==","shasum":"d09ab2deebeb0ecd0aaa6dd8e1a6e06246d24dea","tarball":"https://registry.npmjs.org/@edwardtang1024/mcp-openai-planner/-/mcp-openai-planner-0.1.2.tgz","fileCount":6,"unpackedSize":43044,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCKMWbvO8jLCxD44jhSup35r/kYkQb4DEUipAQ6QlCaMgIhAMXPPd6Mg+DfDga2ynd0k8cxdr18jcE54eDGMNdxqQWO"}]},"_npmUser":{"name":"edwardtang1024","email":"yongbing.e.tang@gmail.com"},"directories":{},"maintainers":[{"name":"edwardtang1024","email":"yongbing.e.tang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-openai-planner_0.1.2_1741913972195_0.6581174617888101"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-14T00:59:32.115Z","0.1.2":"2025-03-14T00:59:32.424Z","modified":"2025-03-14T00:59:32.683Z"},"maintainers":[{"name":"edwardtang1024","email":"yongbing.e.tang@gmail.com"}],"description":"MCP server for planning with with OpenAI o1 models","homepage":"https://github.com/edwardtang1024/mcp-openai-planner","keywords":["mcp","model-context-protocol","openai","o1","ai","planning"],"repository":{"type":"git","url":"git+https://github.com/edwardtang1024/mcp-openai-planner.git"},"author":{"name":"edwardtang"},"bugs":{"url":"https://github.com/edwardtang1024/mcp-openai-planner/issues"},"license":"MIT","readme":"# MCP OpenAI Server\n\nA Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.\n\n## Features\n\n- Direct integration with OpenAI's chat and planning models\n- Support for multiple models including:\n  - gpt-4o (chat)\n  - gpt-4o-mini (chat)\n  - o1-preview (planning)\n  - o1-mini (planning)\n  - o1 (advanced planning)\n  - o3-mini (lightweight planning)\n- Reasoning effort levels (low, medium, high)\n- Simple message passing interface\n- Basic error handling\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) >= 18 (includes `npm` and `npx`)\n- [Claude Desktop app](https://claude.ai/download)\n- [OpenAI API key](https://platform.openai.com/api-keys)\n\n## Installation\n\nFirst, make sure you've got the [Claude Desktop app](https://claude.ai/download) installed and you've requested an [OpenAI API key](https://platform.openai.com/api-keys).\n\nAdd this entry to your `claude_desktop_config.json` (on Mac, you'll find it at `~/Library/Application\\ Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-openai-planner\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@edwardtang1024/mcp-openai-planner@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"your-api-key-here (get one from https://platform.openai.com/api-keys)\"\n      }\n    }\n  }\n}\n```\n\nThis config lets Claude Desktop fire up the OpenAI MCP server whenever you need it.\n\n## Usage\n\nLeverage the multi-agent architecture inspired by [grapeot's planner-executor design](https://github.com/grapeot/devin.cursorrules/blob/multi-agent/.cursorrules) to optimize both reasoning quality and cost efficiency:\n\n### Claude as Executor, o1 as Planner\n\nThe MCP server implements a streamlined multi-agent workflow where:\n- **Claude (3.7 Sonnet)** automatically functions as your **Executor** agent\n- **o1/o1-mini/o3-mini** serves as your dedicated **Planner** agent\n\nThis eliminates the need to manually switch roles - each model plays to its strengths:\n\n```plaintext\n# Just ask o1 for planning help directly\n@o1 I need to design a system that processes large volumes of customer data while ensuring privacy compliance.\n\n# Claude acts as the executor, o1 responds as the planner\n```\n\n**Automatic Executor-to-Planner Request Formatting:**\n\nWhen you use the `openai_plan` tool with any o1 model, your message is automatically formatted as an executor request:\n\n```plaintext\n# Your simple input\n@o1 How should I approach building a secure authentication system?\n\n# Gets automatically formatted as\n[EXECUTOR REQUEST]\nTask: Project planning/implementation\nStatus: Seeking guidance\nQuestion: How should I approach building a secure authentication system?\n\nPlease analyze this request and provide guidance on the next steps.\n```\n\n**Structured Requests for Better Planning:**\n\nFor more complex planning needs, you can use explicit request formatting:\n\n```plaintext\n@o1\nTask: Implement OAuth2 authentication\nStatus: Blocked\nProgress: Basic login flow implemented\nBlocker: Unsure about token management strategy\nQuestion: Should we use short-lived JWTs with refresh or longer expiration?\nContext: Currently storing tokens in localStorage\n```\n\n**Cost-Optimized Multi-Agent Workflow:**\n\n```plaintext\n# Phase 1: Planning (o1 - $0.15/1k tokens)\n- Problem decomposition\n- Architecture design\n- Risk assessment\n\n# Phase 2: Implementation (Claude 3.7 - $0.03/1k tokens)\n- Code writing\n- Testing\n- Documentation\n\n# Phase 3: Targeted Planning (o3-mini - $0.015/1k tokens)\n- Specific implementation questions\n- Code optimization advice\n- Cost-effective reasoning\n```\n\n**Key Benefits of This Architecture:**\n- 💸 **90% Cost Reduction**: Use o1 only for critical planning decisions\n- 🤖 **Automatic Role Assignment**: No need to explicitly switch between roles\n- 🔄 **Contextual Prompting**: Messages automatically formatted for planning\n- ⚡ **Faster Development**: Models specialized for their most efficient tasks\n\n### Supported Models\n\nThe server currently supports these models:\n\n- gpt-4o (default)\n- gpt-4o-mini\n- o1-preview\n- o1-mini\n- o1\n- o3-mini\n\n### Example Commands\n\n```plaintext\n# Basic planning request\n@o1 How should we structure the database for a multi-tenant SaaS app?\n\n# Planning with explicit task context\n@o1\nTask: Implement real-time notification system\nStatus: Starting implementation\nQuestion: What's the best approach for handling WebSocket connections at scale?\n\n# Cost-efficient targeted planning\n@o3-mini\nTask: Optimize API response times\nStatus: In progress\nContext: Current response time is 1.2s for listing endpoints\nQuestion: Which indexes should I add to improve query performance?\n\n# Using different models for specific strengths\n@gpt-4o Can you help me debug this React component?\n@o1 Design a scalable architecture for this microservice\n```\n\n### Tools\n\n1. `openai_chat`\n   - Sends messages to OpenAI's chat completion API\n   - Arguments: \n     - `messages`: Array of messages (required)\n     - `model`: Which model to use (optional, defaults to gpt-4o)\n\n2. `openai_plan`\n   - Specialized tool for complex reasoning tasks and inter-agent communication\n   - Arguments:\n     - `messages`: Array of messages with developer role support (required)\n     - `model`: Planning model to use (o1-preview, o1-mini, o1, o3-mini)\n     - `reasoning_effort`: Cognitive effort level (low/medium/high, defaults to low)\n\n## Problems\n\nThis is alpha software, so may have bugs. If you have an issue, check Claude Desktop's MCP logs:\n\n```bash\ntail -n 20 -f ~/Library/Logs/Claude/mcp*.log\n```\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build the project\npnpm build\n\n# Watch for changes\npnpm watch\n\n# Run in development mode\npnpm dev\n```\n\n## Requirements\n\n- Node.js >= 18\n- OpenAI API key\n\n## Verified Platforms\n\n- [x] macOS\n- [x ] Linux\n\n## License\n\nMIT\n\n## Authors\n\n- [edwardtang](https://github.com/edwardtang) 🛠️ Current maintainer  \n  _Building upon the foundations of:_  \n  - [mzxrai](https://github.com/mzxrai) 🚀 Original MCP Server ([mcp-openai](https://github.com/mzxrai/mcp-openai))  \n  - [grapeot](https://github.com/grapeot) 🤖 Multi-agent Architecture ([devin.cursorrules](https://github.com/grapeot/devin.cursorrules/tree/multi-agent))  \n\n🙏 Grateful for the open source community's collective wisdom that made this project possible.","readmeFilename":"README.md","_rev":"1-127b1b10640c108f79c8d96fecb43c61"}