HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
modelcontextprotocol
python-sdk
Python2024–2026
modelcontextprotocol / python-sdk

python-sdk

The official Python SDK for Model Context Protocol servers and clients

8Distinct people
9Mentions
0Explicit recommenders
24.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The official Python SDK for Model Context Protocol servers and clients

GitHub

Where it is used

  • Home Assistant — The Model Context Protocol Client integration gives your AI conversation agent in Home Assistant extra tools from an MCP server of your choice. The integration calls mcp.client.streamable_http.streamable_http_client. Source

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month9 dated mentions

Observed mentions: 2024-11-25 17:58:50 UTC to 2026-03-25 17:19:06 UTC.

01232024-11-01 00:00:00 UTC to 2024-12-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 commentsNov 20242024-12-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2025-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-01 00:00:00 UTC to 2025-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-03-01 00:00:00 UTC to 2025-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-04-01 00:00:00 UTC to 2025-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-05-01 00:00:00 UTC to 2025-06-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-06-01 00:00:00 UTC to 2025-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-01 00:00:00 UTC to 2025-08-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 20252025-08-01 00:00:00 UTC to 2025-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-01 00:00:00 UTC to 2025-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-10-01 00:00:00 UTC to 2025-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-01 00:00:00 UTC to 2025-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2026-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-02-01 00:00:00 UTC to 2026-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-01 00:00:00 UTC to 2026-04-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsMar 2026

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 20242024-11-01 00:00:00 UTC2024-12-01 00:00:00 UTC303
Dec 20242024-12-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
Jan 20252025-01-01 00:00:00 UTC2025-02-01 00:00:00 UTC000
Feb 20252025-02-01 00:00:00 UTC2025-03-01 00:00:00 UTC000
Mar 20252025-03-01 00:00:00 UTC2025-04-01 00:00:00 UTC000
Apr 20252025-04-01 00:00:00 UTC2025-05-01 00:00:00 UTC101
May 20252025-05-01 00:00:00 UTC2025-06-01 00:00:00 UTC101
Jun 20252025-06-01 00:00:00 UTC2025-07-01 00:00:00 UTC000
Jul 20252025-07-01 00:00:00 UTC2025-08-01 00:00:00 UTC110
Aug 20252025-08-01 00:00:00 UTC2025-09-01 00:00:00 UTC000
Sep 20252025-09-01 00:00:00 UTC2025-10-01 00:00:00 UTC000
Oct 20252025-10-01 00:00:00 UTC2025-11-01 00:00:00 UTC000
Nov 20252025-11-01 00:00:00 UTC2025-12-01 00:00:00 UTC000
Dec 20252025-12-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
Jan 20262026-01-01 00:00:00 UTC2026-02-01 00:00:00 UTC000
Feb 20262026-02-01 00:00:00 UTC2026-03-01 00:00:00 UTC000
Mar 20262026-03-01 00:00:00 UTC2026-04-01 00:00:00 UTC202

What Hacker News says

9 sources
There is a whole history with this, and i think its not appropriate or fair to malign the mcp python-sdk. My read of what happened is that the author spiked an an initial the implementation of 'fastmcp' on Nov 30 2025, 5 days later, the author relicensed it to MIT, and donated it to the python sdk (10 days after anthropic announced MCP): https://github.com/PrefectHQ/fastmcp/pull/54 It was incorporated on Dec 21 2024, and hardened through the efforts of one of the python-sdk maintainers. The author seemingly abandoned the github project shortly after donating it to the python-sdk and marked it as unmaintained, and it remained so for several months (there are roughly zero commits between jan-april): https://github.com/PrefectHQ/fastmcp/issues/96 He also apparently has made almost no other contributions to the mcp python-sdk: https://github.
Read the rest
com/modelcontextprotocol/python-sdk/commits?a... Many contributors to the python sdk continued to iterate on the mcp server implementation using the name fastmcp ( since it had been donated to the project ) resulting in growing interest: https://trends.google.com/explore?q=fastmcp%20&date=2024-12-... Then around April 2025, the author likely noticing the growing interest and stickyness of the name, decided to write a new version and start using the name fastmcp again. https://github.com/PrefectHQ/fastmcp/graphs/contributors?fro... The author clearly made an attempt to promote his effort: https://www.reddit.com/r/mcp/comments/1np6dwg/fastmcp_20_is_... This resulted in a lot of confusion by users, which persists to this day. I only looked into this last year, because i was one of those users who was suddenly confused regarding the provenance of what i was actually using vs what i thought i was using; and as i looked into it i was suddenly seeing lots of questionable reddit comments pop up in subreddits i was reading, all evangelizing fastmcp 2.0 and using language that was contributing to the confusion. The author's interest in monetizing the fastmcp github repo is understandable, and he and others have clearly put alot of effort into iterating in his SaaS onramp, but the confusion arises simply because the author wanted to capitalize on the success of mcp and on the popularity of the fastmcp name, the initial growth and popularity of which was primarily driven by the effort and support of contributors to the mcp python sdk .
In Welcome to FastMCP
Norcim133·Jul 21, 2025Submission

Show HN: Outlook MCP – I accidentally made the best email assistant

I couldn't understand the hype around MCP so I decided to build a simple server for Outlook (requires admin in Azure). For the build I just used a Python MCP SDK: https://github.com/modelcontextprotocol/python-sdk Now, I'm not a fast dev. Still, in 2 days I had Claude Desktop filing and responding to emails better than any assistant I've worked with (human or otherwise). None of this was due to my skill. I was basically just wrapping msgraph calls in the same @mcp.tool decorator over and over. In fact, I spent more time fiddling with msgraph auth & api-calls than I did on the MCP server itself. Today, in a typical workflow, I just tell Claude to "sort my inbox" and it handles everything from filing mails, creating folders, writing responses, scheduling meetings, flagging actions, etc. For anyone wondering about MCP, the following struck m
Read the rest
e: 1. It was the fastest "time-to-capable" I've had on any software build. 2. It was fully "human-capable" in a way that I have not experienced with "agentic workflow" approaches... it just worked. 3. There are nuances to how you "architect" your tool signatures for best results. For example, I had to name one parameter html_code_mail_body to prevent Claude from using plaintext in mails. 4. It was better to make pure, highly cohesive and atomic tools and let the LLM combine them for more complicated tasks. 5. It was so easy to build, all companies are likely to launch official MCP servers eventually. Overall, I think MCP offers a stark alternative to the "agentic workflows" model. In a technical sense, each step in a workflow is highly coupled to its upstream/downstream counterpart. This makes them both rigid and fragile. That's the source of some of the "RPA smells" people talk about with workflow agents. MCP is classic dependency inversion. The llm becomes an abstraction that can self-orchestrate using any tool it wants, in any order, based on the task set for it.
2 points · Open discussion
Yes, and I believe this is what the article is referring to when it says “a stochastic black box that communicates through a complex web of JSON schemas attached to docstring annotations”. Specifically, in the function definition: @mcp.tool() def factor(a: int) -> int: """Factor an integer""" return factor_number(a) the decorator `@mcp.tool()` does something behind the scenes to set up the right thing using the docstring of the function. The documentation and source code seem to be: - (official SDK): https://github.com/modelcontextprotocol/python-sdk/blob/e80c... -> using the function's docstring: https://github.com/modelcontextprotocol/python-sdk/blob/e80c... - (v2?): https://gofastmcp.com/servers/tools#the-%40tool-decorator and https://github.com/jlowin/fastmcp/blob/998de22a6e76fc8ae323e... -> using the functio
Read the rest
In Adventures in Symbolic Algebra with Model Context Protocol
Not the person you asked, but I've gone down this rabbit hole recently and can maybe add something. First, let me say that I don't find much value in the stdio transport stuff and really only care about the http/sse side. Given that, I found that the docs at modelcontextprotocol.org are somewhat lacking. They seem to assume that you want to use stdio and don't have much meat on setting up sse. The good news is, the official Python SDK repo has examples of both scenarios. Between the actual "example servers" in the examples/ dir[1], and comments sprinkled around some of the various module files[2][3] themselves, everything you need to write an sse based server/client pair (in Python at least) is there. Note that most of what I just said is true mainly if you want to use the lowlevel / "vanilla" SDK. Using FastMCP makes things a lot simpler
Read the rest
and faster. If you're interested, I keep a repo with some of my experiments and samples as I'm learning this stuff. Feel free to poke around there and see if any of those examples help: https://github.com/mindcrime/MCPSandbox I've got FastMCP and "vanilla SDK" examples of sse server/client pairs, and a stdio based example mostly cribbed from the "quickstart guide". My next step is going to be to start working with the Java SDK, so some Java samples will probably show up there soon'ish. [1]: https://github.com/modelcontextprotocol/python-sdk/tree/main... [2]: https://github.com/modelcontextprotocol/python-sdk/blob/main... [3]: https://github.com/modelcontextprotocol/python-sdk/blob/main...
In Damn Vulnerable MCP Server
i’ve been looking at your implementation as a reference, thank you have you run into this weird bug which causes python MCP servers to crash when the MCP client times out? https://github.com/modelcontextprotocol/python-sdk/issues/88 also generally do you have any advice for how to notify Claude Desktop when a long running tool call is done? there are resource notifications but those must be selected by the user in the subsequent message thanks!
In How I'm monitoring my MCP server logs
Looking at https://github.com/modelcontextprotocol/python-sdk?tab=readm... it's clear that there must be a decision connecting, for example, `tools` returned by the MCP server and `call_tool` executed by the host. In case of Claude Desktop App, I assume the decision which MCP-server's tool to use based on the end-user's query is done by Claude LLM using something like ReAct loop. Are the prompts and LLM-generated tokens involved inside "Protocol Handshake"-phase available for review?
In Model Context Protocol
We are still a bit light on documentation on how to integrate MCP into an application. The best starting point are the respective client parts in the SDK: https://github.com/modelcontextprotocol/typescript-sdk/tree/... and https://github.com/modelcontextprotocol/python-sdk/tree/main..., as well as the official specification documentation at https://spec.modelcontextprotocol.io. If you run into issues, feel free to open a discussion in the respective SDK repository and we are happy to help. (I've been fairly successful in taking the spec documentation in markdown, an SDK and giving both to Claude and asking questions, but of course that requires a Claude account, which I don't want to assume)
In Model Context Protocol
Both Python and Typescript SDK can be used to build a client. https://github.com/modelcontextprotocol/typescript-sdk/tree/... and https://github.com/modelcontextprotocol/python-sdk/tree/main.... The TypeScript client is widely used, while the Python side is more experimental. In addition, I recommend looking at the specification documentation at https://spec.modelcontextprotocol.io. This should give you a good overview of how to implement a client. If you are looking to see an implemented open source client, Zed implements an MCP client: https://github.com/zed-industries/zed/tree/main/crates/conte... If you have specific questions, please feel free to start a discussion on the respective https://github.com/modelcontextprotocol discussion, and we are happy to help you with integrating MCP.
In Model Context Protocol

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.