frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Dynamic Code Execution with MCP: A More Efficient Approach

https://github.com/pranftw/aiter-app
2•pranftw•9h ago
I've been working on a more efficient approach to code execution with MCP servers that eliminates the filesystem overhead described in Anthropic's recent blog post.

The Anthropic post (https://www.anthropic.com/engineering/code-execution-mcp) showed how agents can avoid token bloat by writing code to call MCP tools instead of using direct tool calls.

Their approach generates TypeScript files for each tool to enable progressive discovery. It works well but introduces complexity: you need to generate files for every tool, manage complex type schemas, rebuild when tools update, and handle version conflicts. At scale, 1000 MCP tools means maintaining 1000 generated files.

I built codex-mcp using pure dynamic execution. Instead of generating files, we expose just two lightweight tools: list_mcp_tools() returns available tool names, and get_mcp_tool_details(name) loads definitions on demand. The agent explores tools as if navigating a filesystem, but nothing actually exists on disk.

Code snippets are stored in-memory as strings in the chat session data. When you execute a snippet, we inject a callMCPTool function directly into the execution environment using AsyncFunction constructor. No imports, no filesystem dependencies, just runtime injection. The function calls mcpManager.tools directly, so you're always hitting the live MCP connection.

This means tools are perpetually in sync. When a tool's schema changes on the server, you're already calling the updated version. No regeneration, no build step, no version mismatches. The agent gets all the same benefits of the filesystem approach (progressive discovery, context efficiency, complex control flow, privacy preservation) without any of the maintenance overhead.

One caveat: the MCP protocol doesn't enforce output schemas, so chaining tool calls requires defensive parsing since the model can't predict output structure. This affects all MCP implementations though, not specific to our approach.

The dynamic execution is made possible by Vercel AI SDK's MCP support, which provides the runtime infrastructure to call MCP tools directly from code.

Project: https://github.com/pranftw/aiter-app

Would love feedback from folks working with MCP at scale. Has anyone else explored similar patterns?

Show HN: qqqa – a fast, stateless LLM-powered assistant for your shell

https://github.com/matisojka/qqqa
3•iagooar•10m ago•1 comments

Show HN: Flutter_compositions: Vue-inspired reactive building blocks for Flutter

https://github.com/yoyo930021/flutter_compositions
19•yoyo930021•4h ago•7 comments

Show HN: fx - A (micro)blogging server that you can self-host

https://github.com/rikhuijzer/fx
2•huijzer•50m ago•0 comments

Show HN: I made a MVP development agency and want your feedback on the site

https://mintmvp.com/
2•alwassikhan•3h ago•0 comments

Show HN: Standards compliant SAX-style XML parser for JavaScript

https://github.com/federicocarboni/saxe
2•federicocarboni•3h ago•0 comments

Show HN: Data Formulator 0.5 – Vibe with your data (Microsoft Research)

https://data-formulator.ai/
3•chenglong-hn•4h ago•0 comments

Show HN: The Legal Embedding Benchmark (MLEB)

https://huggingface.co/blog/isaacus/introducing-mleb
10•ubutler•1w ago•0 comments

Show HN: A CSS-Only Terrain Generator

https://terra.layoutit.com
357•rofko•1d ago•82 comments

Show HN: SSH terminal multiplayer written in Golang

https://github.com/MShel/sshOuroboros
2•mishk0sh•8h ago•0 comments

Show HN: A living wall of life goals and deathbed regrets

https://beforewedie.org
14•jamespetercook•19h ago•9 comments

Show HN: Dynamic Code Execution with MCP: A More Efficient Approach

https://github.com/pranftw/aiter-app
2•pranftw•9h ago•0 comments

Show HN: a Rust ray tracer that runs on any GPU – even in the browser

https://github.com/tchauffi/rust-rasterizer
93•tchauffi•2d ago•29 comments

Show HN: Kumi – a portable, declarative, functional core for business logic

https://kumi-play-web.fly.dev/?example=monte-carlo-simulation
4•goldenCeasar•15h ago•0 comments

Show HN: sudocode – manage specs, tasks, and context-as-code for coding agents

https://github.com/sudocode-ai/sudocode
15•alexsngai•16h ago•5 comments

Show HN: Zee – AI that interviews everyone so you only meet the best

https://www.zeeda.com/
4•davecarruthers•16h ago•4 comments

Show HN: Tamagotchi P1 for FPGAs

https://github.com/agg23/fpga-tamagotchi
68•agg23•1w ago•11 comments

Show HN: SixSevenStudio – open-source Video Editor For Sora

https://github.com/palmier-io/sixsevenstudio
2•hchtin•17h ago•0 comments

Show HN: MyTimers.app offline-first PWA with no build step and zero dependencies

https://mytimers.app/
46•y3k•2d ago•28 comments

Show HN: Strange Attractors

https://blog.shashanktomar.com/posts/strange-attractors
793•shashanktomar•5d ago•77 comments

Show HN: Cj–tiny no-deps JIT in C for x86-64 and ARM64

https://github.com/hellerve-pl-experiments/cj
3•hellerve•18h ago•0 comments

Show HN: Dev Cockpit (OSS) – TUI System Monitor for Apple Silicon

https://devcockpit.app
3•caioricciuti•19h ago•1 comments

Show HN: JermCAD – A YAML-powered, vibe-coded, browser-based CAD software

https://github.com/jeremyaboyd/jerm-cad
3•jermaustin1•20h ago•0 comments

Show HN: I was in a boring meeting so I made an encyclopedia

https://encyclopedai.stavros.io
4•stavros•20h ago•9 comments

Show HN: Wosp – advanced full-text search on the command line

https://github.com/atrettel/wosp
6•atrettel•20h ago•0 comments

Show HN: FinBodhi – Local-first, double-entry app/PWA for your financial journey

https://finbodhi.com/
40•ciju•2d ago•21 comments

Show HN: DMARC report parser as a single Go binary (SQLite, no Elasticsearch)

https://github.com/meysam81/parse-dmarc
2•meysamazad•21h ago•0 comments

Show HN: Free Quantum-Resistant Timestamping API (Dual-Signature and Bitcoin)

5•sasasavic•1d ago•1 comments

Show HN: I built a local-first daily planner for iOS

https://apps.apple.com/ca/app/to-do-list-planner-zesfy/id6479947874
86•zesfy•1d ago•77 comments

Show HN: Pipelex – Declarative language for repeatable AI workflows

https://github.com/Pipelex/pipelex
122•lchoquel•1w ago•27 comments

Show HN: I got fired so I built a bank statement converter

https://aussiebankstatements.com
15•matherslabs•1d ago•3 comments