For more detailed documentation, please reference the below links:
This SDK is updated frequently to keep up with any changes to the actual Clerk API. If you see anything that needs updated or is not inline with the official Clerk api, please open an issue!
Checkout examples in the
/examplesdirectory
use tokio;
use clerk_rs::{clerk::Clerk, ClerkConfiguration, endpoints::ClerkGetEndpoint};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = ClerkConfiguration::new(None, None, Some("sk_test_key".to_string()), None);
let client = Clerk::new(config);
let res = client.get(ClerkGetEndpoint::GetUserList).await?;
Ok(())
}
use tokio;
use clerk_rs::{clerk::Clerk, ClerkConfiguration, apis::emails_api::Email};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = ClerkConfiguration::new(None, None, Some("sk_test_key".to_string()), None);
let client = Clerk::new(config);
Email::create(&client, Some(your_clerk_email));
Ok(())
}
use actix_web::{web, App, HttpServer, Responder};
use clerk_rs::{ClerkConfiguration, validators::actix::ClerkMiddleware};
async fn index() -> impl Responder {
"Hello world!"
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
let config = ClerkConfiguration::new(None, None, Some("sk_test_key".to_string()), None);
App::new().service(
web::scope("/app")
.wrap(ClerkMiddleware::new(config, None, false))
.route("/index", web::get().to(index)),
)
})
.bind(("127.0.0.1", 8080))?
.run()
.await
}
Note: This SDK is completely maintained by the Rust community and is by no means affiliated with Clerk.dev.
$ claude mcp add clerk-rs \
-- python -m otcore.mcp_server <graph>