Show HN: pctx – OSS to build efficient AI agents with Code Mode
I've been working on code generation in Rust for 2 years, mostly fighting with OpenAPI specs that are either missing or incorrect. MCP's self-documenting nature made this a fun project to tackle since the servers describe their own capabilities accurately. I could focus on building execution sandboxes instead of wrestling with bad specs. After seeing how Cloudflare and Anthropic's Code Mode implementations reduced tokens, I decided to build an open-source version with a focus on correctness and local-first design.
pctx prioritizes reliability (TypeScript validation pre execution) and DevEx (no dependencies, 100% local, built-in MCP auth)
Technical details: - Two locked-down Deno sandboxes: - TypeScript compilation/validation (pre-execution) - Execution with MCP network access only - Compiles to a single binary, no dependencies - Built-in TypeScript code generator and MCP auth utilities - Uses the official rmcp client/server within the execution runtime
Coming soon: - Automatic authentication of the pctx server - Python and TypeScript SDKs for using natively in agent frameworks - Anything else people want - One-click cloud deployment (see website)
GitHub: https://github.com/portofcontext/pctx Website: https://portofcontext.com
Would love your feedback on this. Thanks!
Discussion Activity
No activity data yet
We're still syncing comments from Hacker News.
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Discussion hasn't started yet.
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.