Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ jobs:
${{ runner.os }}-cargo-

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.91.1
override: true
components: clippy, rustfmt
run: |
rustup toolchain install 1.91.1
rustup default 1.91.1
rustup component add clippy rustfmt

- name: Show rustc & cargo versions
run: |
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Authenticate to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -40,7 +40,7 @@ jobs:
echo "ref_name=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT

- name: Build and push multi-arch Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -73,10 +73,14 @@ jobs:
strip target/x86_64-unknown-linux-gnu/release/cratedocs || true

- name: Build aarch64-unknown-linux-gnu release binary
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar
run: |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
cargo build --locked --release --target aarch64-unknown-linux-gnu
strip target/aarch64-unknown-linux-gnu/release/cratedocs || true
aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/cratedocs || true

- name: Upload x86_64 binary to release
uses: softprops/action-gh-release@v1
Expand Down
94 changes: 93 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,99 @@ in `mcp_settings.json`:
}
```

---
### Using Docker with MCP

You can use the Docker image directly in your MCP configuration:

```json
{
"mcpServers": {
"rust-crate-docs-docker": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"ghcr.io/promptexecution/rust-cargo-docs-rag-mcp:latest",
"stdio"
]
}
}
}
```

Or if you want to run the HTTP/SSE server in Docker and connect via mcp-remote:

```bash
# Start the HTTP server in Docker
docker run --rm -p 8080:8080 ghcr.io/promptexecution/rust-cargo-docs-rag-mcp:latest
```

Then in `mcp_settings.json`:
```json
{
"mcpServers": {
"rust-crate-docs-docker-http": {
"command": "bunx",
"args": [
"-y",
"mcp-remote@latest",
"http://localhost:8080/sse",
"--allow-http",
"--transport", "sse-only"
]
}
}
}
```

### Using pkgx with MCP

If you have [pkgx](https://pkgx.dev) installed, you can run the server without a system-wide Rust installation:

```json
{
"mcpServers": {
"rust-crate-docs-pkgx": {
"command": "pkgx",
"args": [
"+rust",
"+cargo",
"cargo",
"run",
"--manifest-path",
"/path/to/rust-cargo-docs-rag-mcp/Cargo.toml",
"--bin",
"cratedocs",
"--",
"stdio"
]
}
}
}
```

Or use pkgx to install and run directly:

```bash
# Clone and install with pkgx
git clone https://github.com/promptexecution/rust-cargo-docs-rag-mcp.git
cd rust-cargo-docs-rag-mcp
pkgx +rust +cargo cargo install --path .
```

Then reference it normally in `mcp_settings.json`:
```json
{
"mcpServers": {
"rust-crate-docs": {
"command": "cratedocs",
"args": ["stdio"]
}
}
}
```


## Implementation Notes

Expand Down
Loading