The Project : The Accord Project is The Linux Foundation's reference implementation for smart legal contracts. Its APAP server exposes those contracts to AI clients via the Model Context Protocol (MCP). As Accord's 2026 roadmap leans further into agentic workflows, LLM-based contract execution and graphical editing, the APAP/MCP layer becomes foundational infrastructure - and any unreliability in MCP propagates to every downstream project.
What I'm shipping (Idea #4) :
- Shared service layer refactor - replace the internal HTTP loop (every MCP tool call routes through
makeApiRequest()→fetch()back to the same Express server) with a single Drizzle-ORM service layer, removing 2-5ms of avoidable latency and unlocking real testability. - Four-tier testing - unit, integration, contract and E2E with 90%+ coverage enforced in GitHub Actions CI.
- Multi-client documentation - Claude, ChatGPT and MCP Inspector tutorials, plus Docker Compose quickstart, structured Pino logging and a
/healthzendpoint.
Proof of concept (already live) : Rather than describing what I plan to build, the proposal ships with a working refactor: github.com/JayDS22/apap-mcp-poc.
- 53 passing tests across unit and integration suites
- 98.55% statement coverage · 92.3% branch · 100% function
- Docker Compose one-command startup (Postgres + server in ~30s)
- GitHub Actions CI running type-check, tests and coverage on every push
- Demo: youtube.com/watch?v=KFwc5IRuKUc
The POC implements Phase 1 of the proposed refactor end-to-end - shared service layer, six structured error classes, refactored MCP handler over both SSE (2024-10-05) and StreamableHTTP (2025-03-26) transports, and a REST router that calls the same service functions. A bug fix in the service layer now propagates to both protocols automatically.
Timeline (175 hours / 12 weeks) :
- Weeks 1-2 · Refactor - Ship
src/services/with full CRUD, convert, trigger, and six error classes. (Already done in POC.) - Weeks 3-5 · Testing - Unit + integration + contract tests across both MCP transports. (Done: 53 tests, 98.55% coverage.)
- Week 6 - Midterm and mentor review buffer.
- Weeks 7-8 · Docs - Full client tutorials with screenshots for Claude, ChatGPT and MCP Inspector.
- Weeks 9-10 · DX - Docker Compose polish, Pino logging,
/healthzprobes. (Partially done in POC.) - Weeks 11-12 · Testing & polish - E2E client flows, load testing, contributor docs.
Prior contributions to Accord : Five accepted contributions to the codebase before the proposal even shipped - Issue #152, PRs #153-#155 and an RFC #143 design comment. The GSoC project builds on patterns I've already validated with the maintainers.
Why this matters : Idea #4 sits underneath three other 2026 roadmap items - Idea #1 (Agentic Workflow for Drafting Templates) relies on MCP tool calling for Concerto and template-engine, Idea #7 (LLM Template Logic Executor) integrates into trigger functionality, and Idea #2 (graphical editing) layers on top. Every downstream project inherits whatever MCP reliability, test coverage and documentation quality this work establishes.
Tech stack :
Runtime: Node.js, TypeScript, Express, Drizzle ORM, PostgreSQL
Protocols: Model Context Protocol (MCP) over SSE and StreamableHTTP transports
Testing: Vitest (unit, integration, contract), Playwright (E2E), Postman/Newman
Observability: Pino structured logging with request-id correlation, /healthz readiness probes
DevEx: Docker Compose, GitHub Actions CI, MCP Inspector tooling