| Crates.io | kontext-dev |
| lib.rs | kontext-dev |
| version | 0.1.1 |
| created_at | 2025-12-27 06:44:37.818807+00 |
| updated_at | 2025-12-27 17:16:11.688146+00 |
| description | Rust SDK for accessing Kontext-Dev MCP servers. |
| homepage | |
| repository | https://github.com/kontext-dev/kontext-dev-sdk-rs |
| max_upload_size | |
| id | 2006773 |
| size | 45,088 |
Rust SDK for accessing Kontext-Dev MCP servers.
Add the SDK and runtime dependencies:
[dependencies]
kontext-dev = "0.1.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
Use the SDK:
use kontext_dev::{build_mcp_url, request_access_token, KontextDevConfig};
#[tokio::main]
async fn main() -> Result<(), kontext_dev::KontextDevError> {
let config = KontextDevConfig {
mcp_url: "https://mcp.example.com/mcp".to_string(),
token_url: "https://auth.example.com/oauth2/token".to_string(),
client_id: "client".to_string(),
client_secret: "secret".to_string(),
scope: kontext_dev::DEFAULT_SCOPE.to_string(),
server_name: kontext_dev::DEFAULT_SERVER_NAME.to_string(),
};
let token = request_access_token(&config).await?;
let url = build_mcp_url(&config, token.access_token.as_str())?;
println!("{url}");
Ok(())
}