docs: adapt project guidelines, architecture, and ADRs for Bun
- Update AGENTS.md, CLAUDE.md, and GEMINI.md with Bun workflow rules and bun:test - Update docs/ARCHITECTURE.md with Bun runtime layer and lockfile - Add ADR-010 in docs/DECISIONS.md superseding ADR-001 with Bun adoption - Update README.md with Bun prerequisites, installation, and run instructions
This commit is contained in:
1 parent
003737d927
commit
4251c03e42
6 files changed
+109
-9
No files matched your search
@@ -47,6 +47,7 @@ flowchart LR
|
||||
The system is organized into four modular layers:
|
||||
|
||||
### 2.1. MCP Server & Transport Layer
|
||||
- **Runtime**: **Bun** (>= 1.2/1.3) providing native TypeScript execution without build steps, automatic `.env` loading, and fast startup for CLI/stdio subprocesses.
|
||||
- **Responsibility**: Manages the MCP connection lifecycle, tool definitions, input validation, and JSON-RPC dispatching.
|
||||
- **Protocol**: MCP specification implemented via `@modelcontextprotocol/sdk`.
|
||||
- **Default Transport**: `StdioServerTransport` for local integration with desktop clients and CLI tools.
|
||||
@@ -159,7 +160,8 @@ openproject-mcp/
|
||||
│ └── tools.test.ts # MCP tool integration tests
|
||||
├── AGENTS.md # Operating guidelines for AI agents
|
||||
├── package.json # Project dependencies and scripts
|
||||
└── tsconfig.json # TypeScript compiler configuration
|
||||
├── bun.lock # Bun dependency lockfile
|
||||
└── tsconfig.json # TypeScript compiler configuration (Bun bundler mode)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
+31
-1
@@ -7,7 +7,7 @@ This document records the key architectural and technical decisions made for `op
|
||||
## ADR-001: Technology Stack Selection (TypeScript & Node.js)
|
||||
|
||||
### Status
|
||||
Accepted
|
||||
Superseded by ADR-010
|
||||
|
||||
### Context
|
||||
We need to build a companion MCP server for OpenProject (https://github.com/opf/openproject) that runs reliably on local machines and integrates smoothly with MCP clients such as Claude Desktop, Cursor, and Antigravity.
|
||||
@@ -205,3 +205,33 @@ Target **OpenProject 17** (`openproject/openproject:17-slim`) for all containeri
|
||||
- **Negative**:
|
||||
- Ensures we adhere to OpenProject 17's specific cache configuration and host name variables.
|
||||
|
||||
---
|
||||
|
||||
## ADR-010: Adopt Bun as Runtime, Package Manager, and Test Runner
|
||||
|
||||
### Status
|
||||
Accepted (Supersedes ADR-001)
|
||||
|
||||
### Context
|
||||
MCP servers are typically spawned by LLM desktop clients (Claude Desktop, Cursor, Antigravity) as child processes over `stdio`. Fast startup time, low memory footprint, zero compilation lag for TypeScript files, and integrated test runner ergonomics are vital for agentic development workflows.
|
||||
|
||||
Bun provides:
|
||||
1. Native TypeScript and JSX execution without intermediate build steps or transpilers (`ts-node`, `esbuild`, `tsc`).
|
||||
2. Extremely fast package management (`bun install` in sub-second speeds) with modern text-based `bun.lock`.
|
||||
3. Built-in test runner (`bun test`, `bun:test`) eliminating external dependencies like Jest or Vitest.
|
||||
4. Native environment variable loading (`.env`, `.env.local`) without needing `dotenv`.
|
||||
5. High-performance native `fetch` and `Bun.file` APIs.
|
||||
|
||||
### Decision
|
||||
Adopt **Bun** (>= 1.2 / 1.3) as the exclusive runtime, package manager, and test runner for `openproject-mcp`.
|
||||
|
||||
### Consequences
|
||||
- **Positive**:
|
||||
- Immediate startup with zero transpile overhead: `bun run src/index.ts`.
|
||||
- Ultra-fast test execution: `bun test`.
|
||||
- Simpler dependency tree: no `dotenv`, `ts-node`, `vitest`, or `jest`.
|
||||
- Seamless developer experience matching Bun's project initialization conventions.
|
||||
- **Negative**:
|
||||
- Requires the host machine to have Bun installed rather than traditional Node.js/npm.
|
||||
|
||||
|
||||
Reference in new issue
Block a user