Sources before assumptions
Small workflows that keep native results and provenance intact.
Hosted MCP endpoint
Streamable HTTPhttps://beta.argand.org/api/mcp No local install needed. Configure your own instance URL to self-host.
Discover, then retrieve
List tools to confirm connectivity. Call search with the query you choose. Inspect its source URLs and collection identity; a score represents ranking, not the probability that a source is correct.
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search",
"arguments": {
"query": "rust async runtime",
"page": 1,
"num_results": 10,
"vertical": "web"
}
}
} Read structured evidence
Use a native resource when processing source metadata. Store collection identity with document IDs and capture coordinates so exports remain traceable to the generation that returned them.
{
"jsonrpc": "2.0",
"id": 3,
"method": "resources/read",
"params": {
"uri": "argand://search?query=rust&page=1&vertical=web&num_results=10"
}
} Check a package without installing it
Call package_lookup with the exact registry and name. Inspect the declared license and source repository. A successful lookup does not establish maintainer trust or vulnerability status.
{
"name": "package_lookup",
"arguments": {
"registry": "crates",
"name": "tokio"
}
} Keep your integration portable
Choose a standard MCP library or the private native SDK for your language. Configure a base URL rather than hardcoding the hosted instance.
Native client examples
Choose your language. These are the actual private SDK examples, with native collection and source evidence retained. Install from the corresponding private SDK guide first.
Native client examples
"""Query the actual serving collection using both public Python clients."""
from __future__ import annotations
import asyncio
import json
import os
import sys
from argand import ArgandClient, AsyncArgandClient, SearchResponse
def summary(response: SearchResponse) -> dict:
if not response.collection_id or not response.results:
raise RuntimeError("Live retrieval did not provide a collection and source results")
return {
"collection_id": response.collection_id,
"page": response.page,
"has_more": response.has_more,
"sources": [
{"doc_id": hit.doc_id, "url": hit.url, "title": hit.title, "provenance": hit.provenance}
for hit in response.results
],
}
async def main() -> None:
query = sys.argv[1] if len(sys.argv) > 1 else "rust"
base = os.environ.get("ARGAND_API_BASE", "https://beta.argand.org")
with ArgandClient(base_url=base) as client:
sync = summary(client.search(query))
async with AsyncArgandClient(base_url=base) as client:
asynchronous = summary(await client.search(query))
print(json.dumps({"sync": sync, "async": asynchronous}, indent=2))
if __name__ == "__main__":
asyncio.run(main())
import { ArgandClient } from "../dist/index.js";
const client = new ArgandClient({
baseUrl: process.env.ARGAND_API_BASE ?? "https://beta.argand.org",
retry: { maxAttempts: 1 },
});
const response = await client.search(process.argv[2] ?? "rust", { vertical: "web" });
if (!response.collection_id || response.results.length === 0) {
throw new Error("Native Search returned no collection identity or source results");
}
console.log(JSON.stringify({
collection_id: response.collection_id,
source_count: response.results.length,
total_results: response.total_results,
sources: response.results.map(hit => ({
doc_id: hit.doc_id, url: hit.url, title: hit.title,
score: hit.score, provenance: hit.provenance,
})),
}, (_key, value) => typeof value === "bigint" ? value.toString() : value, 2));
//! Read public source evidence through the real SDK. No credentials are required.
#![forbid(unsafe_code)]
use argand_client::ArgandClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let query = std::env::args().nth(1).unwrap_or_else(|| "rust".into());
let base =
std::env::var("ARGAND_API_BASE").unwrap_or_else(|_| "https://beta.argand.org".into());
let result = ArgandClient::builder()
.base_url(base)
.build()?
.search(&query, 1, 10)
.await?;
if result
.collection_id
.as_ref()
.is_none_or(|identity| identity.trim().is_empty())
{
return Err("the instance did not return a serving collection identity".into());
}
println!("{}", serde_json::to_string_pretty(&result)?);
Ok(())
}