Back to Home11/19/2025, 5:31:07 PM

Show HN: pctx – OSS to build efficient AI agents with Code Mode

1 points
0 comments
Hey HN! I built pctx, a framework that lets AI agents execute code directly instead of making tool calls to save on tokens on MCP.

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 (0 comments)

Discussion hasn't started yet.

ID: 45982258Type: storyLast synced: 11/19/2025, 6:59:55 PM

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.