Skip to content

docs(readme): add -p mcp-server-examples to build command#706

Open
tanish111 wants to merge 1 commit intomodelcontextprotocol:mainfrom
tanish111:patch-1
Open

docs(readme): add -p mcp-server-examples to build command#706
tanish111 wants to merge 1 commit intomodelcontextprotocol:mainfrom
tanish111:patch-1

Conversation

@tanish111
Copy link
Contributor

Updated the build command to specify the package for the MCP server examples.

Motivation and Context

The cargo build --release --example servers_counter_stdio command in the README failed when run from either the workspace root or the examples/ directory. This is because the workspace's default-members only includes crates/rmcp and crates/rmcp-macros, so Cargo cannot resolve the example without an explicit package target. The fix adds -p mcp-server-examples to correctly scope the build command.

How Has This Been Tested?

Ran the original command (cargo build --release --example servers_counter_stdio) from both the workspace root and examples/ — confirmed it fails with error: no example target named.
Ran the updated command (cargo build --release -p mcp-server-examples --example servers_counter_stdio) from the workspace root — confirmed it builds successfully and produces the binary at target/release/examples/servers_counter_stdio.

Breaking Changes

NA

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

NA

Updated the build command to specify the package for the MCP server examples.
@tanish111 tanish111 requested a review from a team as a code owner February 27, 2026 20:37
@github-actions github-actions bot added T-documentation Documentation improvements T-examples Example code changes labels Feb 27, 2026
@tanish111
Copy link
Contributor Author

@alexhancock docs change.

@tanish111 tanish111 changed the title Modify build command in Example README docs(readme): add -p mcp-server-examples to build command Feb 27, 2026
Copy link
Contributor

@alexhancock alexhancock left a comment

Choose a reason for hiding this comment

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

you'll need to adjust the commit message to adhere to conventional commit format

i've also added a linter in main for this

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

Labels

T-documentation Documentation improvements T-examples Example code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants