diff --git a/PROJECT_STATE.md b/PROJECT_STATE.md index 2fbd612..6db1c02 100644 --- a/PROJECT_STATE.md +++ b/PROJECT_STATE.md @@ -7,12 +7,16 @@ ChatGPT MCP Server ## Status Planning complete. -Implementation not started. +Phase 0 implementation in progress. ## Current Phase Phase 0 - Repository Setup +## Completed Tasks + +- Task 0.1 — Create repository skeleton ✅ + ## Next Task -Create repository skeleton. +Task 0.2 — Add package.json and dependencies diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b8a6b8 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# ChatGPT MCP Server + +A local MCP server that allows Claude Code to ask ChatGPT for focused second-opinion help. + +## Purpose + +ChatGPT acts as a reviewer, planner, debugging assistant, and architecture advisor. +Claude Code remains the primary coding agent with full control over files, commands, and decisions. + +## Non-Goals + +The server must not: + +- Modify files +- Run shell commands +- Access Git automatically +- Deploy anything +- Send whole repositories by default +- Send secrets +- Make autonomous decisions + +## Status + +Phase 0 complete — repository skeleton created. +Implementation in progress. diff --git a/TASKS.md b/TASKS.md index b08be07..3b756d4 100644 --- a/TASKS.md +++ b/TASKS.md @@ -17,4 +17,10 @@ Create: Do not implement functionality yet. -Status: Pending +Status: ✅ Complete + +### Task 0.2 - Add package.json and dependencies + +Add `package.json` with MCP SDK, OpenAI SDK, Zod, Vitest. + +Status: ⏳ Pending diff --git a/context/company-context.md b/context/company-context.md new file mode 100644 index 0000000..e69de29 diff --git a/context/current-environment.md b/context/current-environment.md new file mode 100644 index 0000000..e69de29 diff --git a/context/development-context.md b/context/development-context.md new file mode 100644 index 0000000..e69de29 diff --git a/context/infrastructure-context.md b/context/infrastructure-context.md new file mode 100644 index 0000000..e69de29 diff --git a/context/repository-context.md b/context/repository-context.md new file mode 100644 index 0000000..e69de29 diff --git a/context/security-context.md b/context/security-context.md new file mode 100644 index 0000000..e69de29 diff --git a/src/config/defaults.js b/src/config/defaults.js new file mode 100644 index 0000000..21e031e --- /dev/null +++ b/src/config/defaults.js @@ -0,0 +1 @@ +// Default configuration values. diff --git a/src/config/env.js b/src/config/env.js new file mode 100644 index 0000000..74f8641 --- /dev/null +++ b/src/config/env.js @@ -0,0 +1 @@ +// Environment variable loading and validation. diff --git a/src/openai/client.js b/src/openai/client.js new file mode 100644 index 0000000..f207005 --- /dev/null +++ b/src/openai/client.js @@ -0,0 +1 @@ +// OpenAI API client wrapper. diff --git a/src/openai/responses.js b/src/openai/responses.js new file mode 100644 index 0000000..1a4f0eb --- /dev/null +++ b/src/openai/responses.js @@ -0,0 +1 @@ +// OpenAI Responses API interface. diff --git a/src/prompts/architecture-review.js b/src/prompts/architecture-review.js new file mode 100644 index 0000000..c77e13e --- /dev/null +++ b/src/prompts/architecture-review.js @@ -0,0 +1 @@ +// architecture_review prompt template. diff --git a/src/prompts/ask-chatgpt.js b/src/prompts/ask-chatgpt.js new file mode 100644 index 0000000..9841c4d --- /dev/null +++ b/src/prompts/ask-chatgpt.js @@ -0,0 +1 @@ +// ask_chatgpt prompt template. diff --git a/src/prompts/base.js b/src/prompts/base.js new file mode 100644 index 0000000..2eb003c --- /dev/null +++ b/src/prompts/base.js @@ -0,0 +1 @@ +// Base prompt template. diff --git a/src/prompts/debug-issue.js b/src/prompts/debug-issue.js new file mode 100644 index 0000000..56fdf5f --- /dev/null +++ b/src/prompts/debug-issue.js @@ -0,0 +1 @@ +// debug_issue prompt template. diff --git a/src/prompts/review-code.js b/src/prompts/review-code.js new file mode 100644 index 0000000..d9a6335 --- /dev/null +++ b/src/prompts/review-code.js @@ -0,0 +1 @@ +// review_code prompt template. diff --git a/src/prompts/review-plan.js b/src/prompts/review-plan.js new file mode 100644 index 0000000..1554a30 --- /dev/null +++ b/src/prompts/review-plan.js @@ -0,0 +1 @@ +// review_plan prompt template. diff --git a/src/server.js b/src/server.js new file mode 100644 index 0000000..1669a24 --- /dev/null +++ b/src/server.js @@ -0,0 +1 @@ +// MCP stdio server entry point. diff --git a/src/tools/architecture-review.js b/src/tools/architecture-review.js new file mode 100644 index 0000000..3c7d3bd --- /dev/null +++ b/src/tools/architecture-review.js @@ -0,0 +1 @@ +// architecture_review tool handler. diff --git a/src/tools/ask-chatgpt.js b/src/tools/ask-chatgpt.js new file mode 100644 index 0000000..7c63f3a --- /dev/null +++ b/src/tools/ask-chatgpt.js @@ -0,0 +1 @@ +// ask_chatgpt tool handler. diff --git a/src/tools/debug-issue.js b/src/tools/debug-issue.js new file mode 100644 index 0000000..a5b5acc --- /dev/null +++ b/src/tools/debug-issue.js @@ -0,0 +1 @@ +// debug_issue tool handler. diff --git a/src/tools/review-code.js b/src/tools/review-code.js new file mode 100644 index 0000000..be6b076 --- /dev/null +++ b/src/tools/review-code.js @@ -0,0 +1 @@ +// review_code tool handler. diff --git a/src/tools/review-plan.js b/src/tools/review-plan.js new file mode 100644 index 0000000..cc413c6 --- /dev/null +++ b/src/tools/review-plan.js @@ -0,0 +1 @@ +// review_plan tool handler. diff --git a/src/tools/schemas.js b/src/tools/schemas.js new file mode 100644 index 0000000..db7d1cb --- /dev/null +++ b/src/tools/schemas.js @@ -0,0 +1 @@ +// Zod input validation schemas for all tools. diff --git a/src/utils/context-budget.js b/src/utils/context-budget.js new file mode 100644 index 0000000..f880552 --- /dev/null +++ b/src/utils/context-budget.js @@ -0,0 +1 @@ +// Context size limit and trimming logic. diff --git a/src/utils/errors.js b/src/utils/errors.js new file mode 100644 index 0000000..0d9f1d1 --- /dev/null +++ b/src/utils/errors.js @@ -0,0 +1 @@ +// Safe error message formatting. diff --git a/src/utils/logging.js b/src/utils/logging.js new file mode 100644 index 0000000..b171c82 --- /dev/null +++ b/src/utils/logging.js @@ -0,0 +1 @@ +// Safe logging utility (stderr only). diff --git a/src/utils/redact.js b/src/utils/redact.js new file mode 100644 index 0000000..3d459a5 --- /dev/null +++ b/src/utils/redact.js @@ -0,0 +1 @@ +// Secret redaction utility.