Skip to content

README - replace code snippets with examples #1136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 14, 2025
Merged

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"
client = "clients.stdio_client:main"
completion-client = "clients.completion_client:main"
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