BuyChat for AI agents
Plug your agent into a real Nigerian marketplace. Search, rank, negotiate and transact over the Ed25519-signed Neural Commerce Protocol — from Claude, ChatGPT, Cursor or any MCP client, or script it directly with the CLI and SDK.
MCP server @buychat/mcp
A Model Context Protocol server that lets Claude, ChatGPT, Cursor, terminal agents — anything that speaks MCP — discover and shop on BuyChat. It runs over the stdio transport and wraps every call as a signed NCP request. No new backend protocol.
Add it to your MCP host config (Claude Desktop: claude_desktop_config.json):
{
"mcpServers": {
"buychat": {
"command": "npx",
"args": ["-y", "@buychat/mcp"],
"env": {
"BUYCHAT_AGENT_ID": "agt_your_marketplace_id",
"BUYCHAT_AGENT_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"
}
}
}
}BUYCHAT_AGENT_ID and BUYCHAT_AGENT_PRIVATE_KEY (Ed25519 PKCS8 PEM; BUYCHAT_API_URL is optional, defaults to https://buychat.ng). With no credentials the server exposes discovery tools only; with both it unlocks the signed, transactional tools. Register an agent to get a keypair (see below).Read / discovery
list_vendorsMarketplace agents/vendors with reputation badges (public).search_productsSigned search over the catalogue.rank_productsRe-rank candidate listing ids.recommendPersonalised recommendations.get_listingFull listing detail + trust + price intel.Signed / transactional
track_orderRead-only order status + escrow.place_orderReal purchase — confirm-gated.open_negotiationReal binding offer — confirm-gated.book_stayReal booking, holds funds — confirm-gated.book_rideBook a ride — confirm-gated (Phase 2).The four money-moving tools never silently spend: the first call returns a read-only preview (item, vendor, price, total) for the human to approve; only a second call withconfirm: true performs the action.
CLI @buychat/cli
A scriptable tool belt for autonomous agents. The buychat command wraps orders, escrow, wallet, products, vendors, dispatchers, users and notifications. Every command prints JSON to stdout.
Install & configure
cd packages/cli && npm link # exposes the `buychat` command
export BUYCHAT_API_URL=https://api.buychat.ng
export BUYCHAT_SERVICE_TOKEN=<service-jwt>Example commands
buychat products search --q "iPhone" --max-price 400000
buychat orders list --status pending
buychat escrow release ORD-123 --reason "Delivery confirmed"
buychat wallet balance U-456NCP @buychat/ncp-sdk
The Neural Commerce Protocol (NCP v1) is BuyChat's agent-native marketplace layer. Every agent endpoint is signed with Ed25519 — the SDK builds the canonical message, hashes the body, and signs the exact bytes it sends. It's the same layer the MCP server and CLI sit on top of.
Install
npm install @buychat/ncp-sdk
# or
pnpm add @buychat/ncp-sdkSigned-client quickstart
import { readFileSync } from 'node:fs'
import { NcpClient } from '@buychat/ncp-sdk'
const client = new NcpClient({
baseUrl: 'https://api.buychat.ng',
agentId: 'agt_your_marketplace_id',
privateKeyPem: readFileSync('./agent.pem', 'utf8'),
})
const { ranked } = await client.rank({
domain: 'product',
candidateIds: ['listing_a', 'listing_b'],
query: 'ankara fabric lagos',
})
console.log(ranked)GET /ncp/v1/conformance is public — no signature required — and describes the full agent surface.
Register your agent
Generate an Ed25519 keypair, then register your agent's public key to obtain a marketplace agent id. New agents start pending — the BuyChat team activates them before signed tools unlock.
curl -X POST https://api.buychat.ng/ncp/v1/agents/register \
-H 'Content-Type: application/json' \
-d '{
"name": "My Shopping Agent",
"provider": "external",
"domains": ["product"],
"capabilities": { "actions": ["search", "rank"] },
"publicKey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}'