TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Mcp-Agent – Build effective agents with Model Context Protocol

80 pointsby saqadri4 months ago
Hey HN, I spent my xmas break building an agent framework called mcp-agent [1](<a href="https:&#x2F;&#x2F;github.com&#x2F;lastmile-ai&#x2F;mcp-agent">https:&#x2F;&#x2F;github.com&#x2F;lastmile-ai&#x2F;mcp-agent</a>) for Model Context Protocol [2]. It makes it easy to build AI apps with MCP servers, and implements every pattern from the popular Building Effective Agents blog [3] as well as OpenAI’s Swarm [4]. I’m sharing it early to get community feedback on where to take it from here, and to ask for contributions.<p>For those who aren’t familiar with MCP, I think of it as a standardized interface to let AI communicate with software via tool calls, resources and prompts.<p>mcp-agent provides a higher level interface to build apps with MCP. It handles the connection management of MCP servers so you don’t have to. It also implements the Building Effective Agents patterns: - Augmented LLM (an LLM with access to one or more MCP servers) - Router, Orchestrator-Worker, Evaluator-Optimizer, and more - Swarm<p>The key design principles are composability and reusability – every pattern is an AugmentedLLM itself, so you can chain them into more complex workflows.<p>Some background: I worked on LSP [5] and language servers at Microsoft, and saw firsthand how standards and protocols can revolutionize developer workflows. Before LSP every IDE had its own esoteric ways of providing language services. LSP changed all that, and arguably made every language server better, since they can focus on improving a single implementation for all clients.<p>I think AI development is in a similar pre-LSP space right now. There are tons of frameworks [6], every model provider has its own way of handling messages, tool calls, streaming, etc. I really think we need a protocol to standardize these patterns.<p>Pretty soon every service is going to expose an MCP interface, and mcp-agent is about letting developers orchestrate these services into applications (i.e. build “MCP apps”). This can cover any use of an AI model that needs to interact with the world around it: - RAG pipelines and Q&amp;A chatbots - Process automation via AI workflows&#x2F;async tasks - Multi-agent orchestration, with human in the loop<p>The repo contains examples [7] to build RAG agents, streamlit apps and more. There’s a lot left to build, like streaming support, server auth and tighter integration with MCP clients.<p>But I wanted to share early in the hopes that you can guide me: - If you find this useful, please let me know. If it’s useful to you, I will dedicate all my time to improving it. - I really welcome contributions. If you want to collaborate, please reach out on github to help take this forward.<p>I want to help standardize AI development, so developers a few years from now can look back with horror at the pre-MCP days.<p>[1] - <a href="https:&#x2F;&#x2F;github.com&#x2F;lastmile-ai&#x2F;mcp-agent">https:&#x2F;&#x2F;github.com&#x2F;lastmile-ai&#x2F;mcp-agent</a><p>[2] - <a href="https:&#x2F;&#x2F;modelcontextprotocol.io&#x2F;introduction" rel="nofollow">https:&#x2F;&#x2F;modelcontextprotocol.io&#x2F;introduction</a><p>[3] - <a href="https:&#x2F;&#x2F;www.anthropic.com&#x2F;research&#x2F;building-effective-agents" rel="nofollow">https:&#x2F;&#x2F;www.anthropic.com&#x2F;research&#x2F;building-effective-agents</a><p>[4] - <a href="https:&#x2F;&#x2F;github.com&#x2F;openai&#x2F;swarm">https:&#x2F;&#x2F;github.com&#x2F;openai&#x2F;swarm</a><p>[5] - <a href="https:&#x2F;&#x2F;microsoft.github.io&#x2F;language-server-protocol&#x2F;" rel="nofollow">https:&#x2F;&#x2F;microsoft.github.io&#x2F;language-server-protocol&#x2F;</a><p>[6] - <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a> (I understand the irony)<p>[7] - <a href="https:&#x2F;&#x2F;github.com&#x2F;lastmile-ai&#x2F;mcp-agent&#x2F;tree&#x2F;main&#x2F;examples">https:&#x2F;&#x2F;github.com&#x2F;lastmile-ai&#x2F;mcp-agent&#x2F;tree&#x2F;main&#x2F;examples</a>

10 comments

a1j9o944 months ago
This is really interesting. Has anyone seen a good registry of MCP servers somewhere? What I would love to be able to do is ask for a task and have the agent figure out what servers and tools it needs to accomplish that task directly.
评论 #42874913 未加载
评论 #42878968 未加载
评论 #42874447 未加载
评论 #42879716 未加载
评论 #42874326 未加载
评论 #42874509 未加载
sparacha4 months ago
OP - congrats on this launch! I think there are a lot of useful bits here, especially the communication abstractions for MCP and having clear recipes to implement patterns mentioned by Anthropic team is a big plus.
exclipy4 months ago
This looks very nice, and obviously needed in hindsight.<p>I would love to see a Typescript&#x2F;node port of this.
评论 #42872551 未加载
评论 #42872439 未加载
nurettin4 months ago
What&#x27;s so special about this other than poisoning straightforward python code with async&#x2F;await?<p>Claude message API already accepts a tools=[] parameter. All you need is a json schema of your python class and docs which you can easily generate with a few dozen lines of code.<p>Then just call whatever the LLM outputs like getattr(instance, result[&quot;name&quot;])( **result[&quot;kwargs&quot;]) and your computer is controlled by AI congratulations.
codenote4 months ago
I&#x27;m considering implementing MCP into an application in the future. This information will be very helpful for that. Thank you!
评论 #42889751 未加载
saqadri4 months ago
Please let me know if you have any questions - I&#x27;ll be monitoring the post today and would love to discuss!
sanchitmonga3 months ago
This is awesome!
justintorre754 months ago
MCP Agent seems super promising and the team behind it is amazing!
评论 #42874322 未加载
wedn3sday4 months ago
The example code reminds me how much I absolutely loath python async&#x2F;await syntax.<p>&gt;&gt;&gt; server_names=[&quot;fetch&quot;, &quot;filesystem&quot;]<p>This is, IMO, bad design. Where is the fetch defined? How would I find these? If it was an imported module I could easily find the definition to see what its doing, or subclass it to make my own, but instead its just some magic strings getting passed making it astronomically more difficult to understand what the heck is going on.
评论 #42872781 未加载
评论 #42872765 未加载
shrisukhani4 months ago
this is neat - congrats!