Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
4597d1f
Server wasm compatibility (#15)
4t145 Mar 14, 2025
b1ed4e7
add missing license (#35)
niebayes Mar 18, 2025
042299f
pin transport once, use project in write_message (#28)
xuorig Mar 18, 2025
989453d
docs: add installation instructions for uv (#37)
situ2001 Mar 18, 2025
9c33eed
fix: update transport command to use the correct example server (#36)
situ2001 Mar 20, 2025
b3d655d
add an actix-web server sse example (#33)
xring Mar 20, 2025
31493cf
chore: decrease log level (#41)
Ma1oneZhang Mar 21, 2025
0be6067
Move whole rmcp crate to offcial rust sdk (#44)
4t145 Mar 27, 2025
0e5cf68
doc: fix a typo in Cargo.toml (#45)
ramnivas Mar 27, 2025
595c4b8
docs: fix the branch name for git dependency (#46)
ramnivas Mar 27, 2025
ac01c4e
docs: update the chinese doc (#48)
jokemanfire Mar 28, 2025
4e6b222
docs: fix broken link (#53)
TaKO8Ki Mar 28, 2025
b9e1922
ci: add commit-lint in CI (#50)
jokemanfire Mar 28, 2025
59bfb6e
refactor(sse_server): separate router and server startup (#52)
Ronbb Mar 28, 2025
0a2f13a
style: fmt the project (#54)
jokemanfire Mar 28, 2025
50fadfb
[Example] Small fix on incorrect counter logic and improve prompt han…
sandrohanea Mar 29, 2025
0e2b115
fix(server): add error enum while deal server info (#51)
jokemanfire Mar 29, 2025
cc3f299
ci: use `rust-cache` (#60)
TaKO8Ki Mar 30, 2025
d6fb12b
chore: format code correctly (#66)
jefrydco Mar 30, 2025
ac1b8c6
test: add test with js server (#65)
jefrydco Mar 30, 2025
0eea9aa
fix(test): fix tool deserialization error (#68)
4t145 Mar 31, 2025
b91fe54
ci: add documentation generation job (#59)
jokemanfire Mar 31, 2025
145b5de
fix(notification): fix wrongly error report in notification (#70)
4t145 Mar 31, 2025
59c9758
docs: format and fix typo (#72)
katopz Mar 31, 2025
588a013
feat(transport): Sse client transport trait (#67)
EItanya Mar 31, 2025
923e87a
feat: Sse server auto ping (#74)
4t145 Apr 1, 2025
2c0cafd
feat(tool): allow tool call return a serializable value in json forma…
4t145 Apr 1, 2025
4ca00c2
fix(client): add error enum while deal client info (#76)
jokemanfire Apr 1, 2025
6a648b8
chore: fix typos (#79)
Akagi201 Apr 1, 2025
d5c4bf0
Adopt Devcontainer for Development Environment (#81)
Z9RTM Apr 2, 2025
c30d806
ci: add spell check (#82)
jokemanfire Apr 2, 2025
af51779
fix(typo): s/marcos/macros/ (#85)
akesling Apr 3, 2025
6a74451
fix: fix rig chat agent output format (#86)
Akagi201 Apr 3, 2025
2744cde
fix(typo): nit language corrections (#90)
Hendler Apr 4, 2025
57f2ba2
Add Claude desktop quick start and update Cargo.toml of examples/serv…
Rayato159 Apr 5, 2025
72e7533
test(logging): Add tests for logging (#96)
Hendler Apr 5, 2025
cced5e9
chore: fix broken wasi example link (#100)
AbdelStark Apr 7, 2025
6837546
feat: revision-2025-03-26 without streamable http (#84)
4t145 Apr 7, 2025
36834f3
fix(macro): add generics marco types support (#98)
jokemanfire Apr 7, 2025
910d3b3
test(context): test context request handling and refactor for reusabl…
Hendler Apr 7, 2025
d6a26fc
fix(rig-integration): implement ToolEmbeddingDyn trait for McpToolAda…
byeblack Apr 7, 2025
b9be979
fix(test): fix test introduced by #97 (#101)
4t145 Apr 7, 2025
938ecbe
fix(server): schemars compilation errors (#104)
ssddOnTop Apr 8, 2025
6a42304
feat: extensions to context (#102)
EItanya Apr 8, 2025
fdfb527
docs: give macOS link and clarify missing UI (#110)
rikhuijzer Apr 9, 2025
a1112bc
ci: add code coverage job to CI workflow (#111)
Z9RTM Apr 9, 2025
7ae2728
fix(macros): add error deal (#109)
jokemanfire Apr 9, 2025
feb224c
Fix typo for Claude desktop config file path correction and add more …
Rayato159 Apr 9, 2025
583a513
fix: fix 2 cargo warnings (#112)
rikhuijzer Apr 9, 2025
1fc5be6
ci: harden release action (#113)
rikhuijzer Apr 10, 2025
d0962ec
docs: add an overview to `rmcp/src/lib.rs` (#116)
rikhuijzer Apr 10, 2025
31da5ff
fix(handler): do call handler methods when initialize server (#118)
4t145 Apr 10, 2025
2125698
docs: add a simple chat client for example (#119)
jokemanfire Apr 10, 2025
19e6d45
docs: fix the url (#120)
jokemanfire Apr 10, 2025
dffae27
docs: update calculator example description (#115)
look Apr 10, 2025
8223958
docs: fix typo and clarify instructions (#124)
vim-zz Apr 11, 2025
9fc1cc0
chore: remove un-used tower.rs (#125)
nora-coder-dot Apr 11, 2025
04a0a2c
docs: fix doc in simple-chat (#129)
jokemanfire Apr 14, 2025
9d6f9a2
ci: security (#133)
Z9RTM Apr 15, 2025
3a97917
feat(rmcp-macro): generate description from docs (#141)
ssddOnTop Apr 18, 2025
b6fabc8
chore: make proxy in simple-chat configure (#134)
jokemanfire Apr 20, 2025
18346b9
fix(rmcp-macros): fix extract_doc_line code (#142)
jokemanfire Apr 20, 2025
6c2c024
chore: disable unix_socket example on windows (#146)
EluvK Apr 26, 2025
5e4d447
chore: make cli command in simple-chat (#145)
jokemanfire Apr 27, 2025
b1542a6
fix: fix resource leak (#136)
Paul-E Apr 28, 2025
afb8a90
chore: add oauth2 support (#130)
jokemanfire Apr 29, 2025
09474d4
fix(test): skip serialize tool's annotation if empty (#160)
4t145 May 7, 2025
52c0651
feat: allow use of reqwest without ring provider (#155)
msardara May 7, 2025
6c2e6e2
feat(oauth): fixes + cache client credentials (#157)
the-rooster May 8, 2025
0847c17
feat: add clippy config (#162)
jokemanfire May 8, 2025
57e14c5
feat(transport): support streamable http server (#152)
4t145 May 8, 2025
546490a
fix: build errors for WASI target (#151)
denniskawurek May 8, 2025
f9a32b0
Merge branch 'main' into spiceai
Jeadie May 9, 2025
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
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.10",
"toolsToInstall": "uv"
}
},
// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"editor.formatOnSave": true,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
}
}
}
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "uv venv"
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
// "source": "devcontainer-cargo-cache-${devcontainerId}",
// "target": "/usr/local/cargo",
// "type": "volume"
// }
// ]
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
209 changes: 209 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
name: CI

on:
push:
branches: [ main, release ]
tags:
- 'release-*'
pull_request:
branches: [ main, release ]

env:
CARGO_TERM_COLOR: always
ARTIFACT_DIR: release-artifacts

jobs:
commit-lint:
name: Lint Commit Messages
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install commitlint
run: |
npm install --save-dev @commitlint/cli @commitlint/config-conventional
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

- name: Lint commit messages
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

fmt:
name: Code Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust fmt
run: rustup toolchain install nightly --component rustfmt

- name: Check formatting
run: cargo +nightly fmt --all -- --check

clippy:
name: Lint with Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

spelling:
name: spell check with typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Spell Check Repo
uses: crate-ci/typos@master

test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# install nodejs
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Python
run: uv python install

- name: Create venv for python
run: uv venv

- uses: Swatinem/rust-cache@v2

- name: Run tests
run: cargo test --all-features

coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# install nodejs
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Python
run: uv python install

- name: Create venv for python
run: uv venv

- uses: Swatinem/rust-cache@v2

- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov

- name: Install llvm-tools-preview
run: rustup component add llvm-tools-preview

- name: Run tests with coverage
run: cargo llvm-cov --all-features

security_audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Install cargo-audit
run: cargo install cargo-audit

- name: Run cargo-audit
run: cargo audit

doc:
name: Generate Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2

- name: Generate documentation
run: |
cargo doc --no-deps -p rmcp -p rmcp-macros
env:
RUSTDOCFLAGS: -Dwarnings

release:
name: Release crates
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/release')
needs: [fmt, clippy, test]
steps:
# Since this job has access to the `CRATES_TOKEN`, it's probably a good
# idea to be extra careful about what Actions are being called. The reason
# is that if an attacker gains access to other actions such as
# `Swatinem/rust-cache`, they could use that to steal the `CRATES_TOKEN`.
# This happened recently in the attack on `tj-actions/changed-files`, but
# has happened many times before as well.

- uses: actions/checkout@v4

- name: Update Rust
run: |
rustup update stable
rustup default stable

- name: Cargo login
run: cargo login ${{ secrets.CRATES_TOKEN }}

- name: Publish macros dry run
run: cargo publish -p rmcp-macros --dry-run
continue-on-error: true

- name: Publish rmcp dry run
run: cargo publish -p rmcp --dry-run
continue-on-error: true

- name: Publish macro
if: ${{ startsWith(github.ref, 'refs/tags/release') }}
continue-on-error: true
run: cargo publish -p rmcp-macros

- name: Publish rmcp
if: ${{ startsWith(github.ref, 'refs/tags/release') }}
continue-on-error: true
run: cargo publish -p rmcp
33 changes: 0 additions & 33 deletions .github/workflows/clippy.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/fmt.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/test.yml

This file was deleted.

30 changes: 17 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@


[workspace]
members = [
"crates/*",
"examples/clients",
"examples/servers",
"examples/macros"
]
members = ["crates/rmcp", "crates/rmcp-macros", "examples/*"]
resolver = "2"

[workspace.dependencies]
mcp-core = { path = "./crates/mcp-core" }
mcp-macros = { path = "./crates/mcp-macros" }
rmcp = { version = "0.1.5", path = "./crates/rmcp" }
rmcp-macros = { version = "0.1.5", path = "./crates/rmcp-macros" }

[workspace.package]
edition = "2021"
version = "1.0.7"
authors = ["Block <ai-oss-tools@block.xyz>"]
license = "MIT"
edition = "2024"
version = "0.1.5"
authors = ["4t145 <u4t145@163.com>"]
license = "MIT/Apache-2.0"
repository = "https://github.com/modelcontextprotocol/rust-sdk/"
description = "Rust SDK for the Model Context Protocol"
description = "Rust SDK for Model Context Protocol"
keywords = ["mcp", "sdk", "tokio", "modelcontextprotocol"]
homepage = "https://github.com/modelcontextprotocol/rust-sdk"
categories = [
"network-programming",
"asynchronous",
]
readme = "README.md"
Loading