Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

README - replace code snippets with examples #1136

Merged
ihrpr merged 4 commits intomainmodelcontextprotocol/python-sdk:mainfrom
ihrpr/more-readme-snippetsmodelcontextprotocol/python-sdk:ihrpr/more-readme-snippetsCopy head branch name to clipboard
Jul 14, 2025
Merged

README - replace code snippets with examples #1136
ihrpr merged 4 commits intomainmodelcontextprotocol/python-sdk:mainfrom
ihrpr/more-readme-snippetsmodelcontextprotocol/python-sdk:ihrpr/more-readme-snippetsCopy head branch name to clipboard

Conversation

@ihrpr
Copy link
Contributor

@ihrpr ihrpr commented Jul 14, 2025

Part 2, based on #1055

  • Replaced hardcoded Quickstart example with fastmcp_quickstart.py
  • Replaced lifespan example with lifespan_example.py (fixed type safety)
  • Updated "Writing MCP Clients" to use stdio_client.py
  • Replaced completion client fragment with full completion_client.py
  • Removed redundant "## Examples" section

Follow up:

  • replace all of the examples
  • re-write README (only after we re-do the docs section in modelcontextprotocol repo)

@ihrpr ihrpr requested review from Kludex and bhosmer-ant July 14, 2025 09:29
Kludex
Kludex previously approved these changes Jul 14, 2025
server_params = StdioServerParameters(
command="uv", # Using uv to run the server
args=["run", "server", "completion", "stdio"], # Server with completion support
env=os.environ.copy(), # Pass environment variables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dangerous, I think we should be more conscious about it.

Can you pass a single environment variable instead to show the point?

server = "servers:run_server" No newline at end of file
server = "servers:run_server"
client = "clients.stdio_client:main"
completion-client = "clients.completion_client:main" No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
completion-client = "clients.completion_client:main"
completion-client = "clients.completion_client:main"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.