Skip to content

Commit 5d9f4f0

Browse files
committed
docs: add startup note
1 parent 46d5f9e commit 5d9f4f0

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ If you prefer to build from source, you will need the
9090

9191
## Usage
9292

93+
**Important Note for New Crates:**
94+
95+
When using the server with a crate for the first time (or with a new version/feature set), it needs to download the documentation and generate embeddings. This process can take some time, especially for crates with extensive documentation, and requires an active internet connection and OpenAI API key.
96+
97+
It is recommended to run the server once directly from your command line for any new crate configuration *before* adding it to your AI coding assistant (like Roo Code, Cursor, etc.). This allows the initial embedding generation and caching to complete. Once you see the server startup messages indicating it's ready (e.g., "MCP Server listening on stdio"), you can shut it down (Ctrl+C). Subsequent launches, including those initiated by your coding assistant, will use the cached data and start much faster.
98+
99+
93100
### Running the Server
94101

95102
The server is launched from the command line and requires the **Package ID
@@ -109,19 +116,19 @@ necessary for crates that require specific features to be enabled for
109116
export OPENAI_API_KEY="sk-..."
110117

111118
# Example: Run server for the latest 1.x version of serde
112-
./target/release/rustdocs_mcp_server "serde@^1.0"
119+
rustdocs_mcp_server "serde@^1.0"
113120

114121
# Example: Run server for a specific version of reqwest
115-
./target/release/rustdocs_mcp_server "[email protected]"
122+
rustdocs_mcp_server "[email protected]"
116123

117124
# Example: Run server for the latest version of tokio
118-
./target/release/rustdocs_mcp_server tokio
125+
rustdocs_mcp_server tokio
119126

120127
# Example: Run server for async-stripe, enabling a required runtime feature
121-
./target/release/rustdocs_mcp_server "[email protected]" -F runtime-tokio-hyper-rustls
128+
rustdocs_mcp_server "[email protected]" -F runtime-tokio-hyper-rustls
122129

123130
# Example: Run server for another crate with multiple features
124-
./target/release/rustdocs_mcp_server "[email protected]" --features feat1,feat2
131+
rustdocs_mcp_server "[email protected]" --features feat1,feat2
125132
```
126133

127134
On the first run for a specific crate version _and feature set_, the server

0 commit comments

Comments
 (0)