Skip to content

Commit b4ac470

Browse files
committed
improve le claude again
1 parent fe4a5c1 commit b4ac470

File tree

5 files changed

+64
-285
lines changed

5 files changed

+64
-285
lines changed

CLAUDE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,36 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1313
- Instruct your subagents to use their respective task plans to complete the tasks from the plans directory if they are available.
1414
- Instead of assuming bun commands look up the bun documentation: https://bun.sh/docs/cli/(run, init, add, update, publish, etc.), https://bun.sh/docs/api/(http, fetch, etc.) and https://bun.sh/docs/bundler
1515

16+
## Development Process for New Features
17+
18+
When developing a new feature, follow this test-driven development approach:
19+
20+
1. **Plan and Research Phase**
21+
- Create a rough plan and concept for the feature
22+
- Think deeply about the implementation approach
23+
- Use web search extensively to research:
24+
- Appropriate libraries to use
25+
- Best practices for the feature domain
26+
- API documentation for chosen libraries
27+
- Similar implementations for reference
28+
- Document your findings and decisions
29+
30+
2. **Test Implementation Phase**
31+
- Write thorough unit and integration tests FIRST based on:
32+
- The API documentation of chosen libraries
33+
- Expected behavior of the feature
34+
- Edge cases and error scenarios
35+
- Ensure tests are comprehensive and cover all planned functionality
36+
- Tests should be written to match our existing test suite patterns
37+
38+
3. **Feature Implementation Phase**
39+
- Only after tests are complete, start writing the actual implementation
40+
- Write code to satisfy the tests you've created
41+
- Let the tests guide your implementation
42+
- **Never write software first and then tests later**
43+
44+
This test-driven approach ensures better design, more reliable code, and easier maintenance.
45+
1646
## Project Overview
1747

1848
This is an MCP server implementation that provides access to Rust crate documentation via the docs.rs JSON API. The project enables AI assistants to fetch and parse Rust documentation, making it easier to provide accurate information about Rust crates, their APIs, and usage. The server includes intelligent caching and supports fetching documentation for specific crate versions and items.

README-new.md

Lines changed: 0 additions & 279 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ docker run --rm -i ghcr.io/vexxvakan/mcp-docsrs:latest \
6969
```
7070

7171
Available tags:
72+
7273
- `latest` - Latest stable release (multi-arch)
7374
- `v1.0.0` - Specific version (multi-arch)
7475
- `x64` - Latest x64/AMD64 build
@@ -158,6 +159,29 @@ Fetches documentation for a specific item within a crate.
158159
}
159160
```
160161

162+
#### `search_crates`
163+
164+
Search for Rust crates on crates.io with fuzzy/partial name matching.
165+
166+
**Parameters:**
167+
168+
| Parameter | Type | Required | Description |
169+
|-----------|------|----------|-------------|
170+
| `query` | string || Search query for crate names (supports partial matches) |
171+
| `limit` | number || Maximum number of results to return (default: 10) |
172+
173+
**Example:**
174+
175+
```json
176+
{
177+
"tool": "search_crates",
178+
"arguments": {
179+
"query": "serde",
180+
"limit": 5
181+
}
182+
}
183+
```
184+
161185
### 📊 Resources
162186

163187
The server provides resources for querying and inspecting the cache database:
@@ -476,10 +500,16 @@ Contributions are welcome! Please feel free to submit a Pull Request.
476500

477501
<a id="license"></a>
478502

503+
## 🙏 Acknowledgments
504+
505+
- [docs.rs](https://docs.rs) for providing the Rust documentation API
506+
- [Model Context Protocol](https://github.com/modelcontextprotocol) for the MCP specification
507+
- The Rust community for excellent documentation standards
508+
479509
## 📄 License
480510
<a id="license"></a>
481511

482-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
512+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
483513

484514
---
485515

0 commit comments

Comments
 (0)