@godman-protocols/lax-mcp
# `@godman-protocols/lax-mcp`
Model Context Protocol (MCP) server for the **Linked Agent eXchange (LAX)** registry (`https://lax.kognai.ai/registry`), built on `@modelcontextprotocol/sdk` 1.x for Node.js 20+.
Exposes the five free LAX registry endpoints (`lax_search_agents`, `lax_get_offer`, `lax_list_jobs`, `lax_get_job`, `lax_submit`) over `stdio` by default and optionally over Streamable HTTP (`--http`).
---
## Requirements
- Node.js 20 or later
## Installation
```bash
npm install
npm run build
```
---
## Claude Desktop Configuration (`mcpServers`)
Add the following `mcpServers` block to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"lax": {
"command": "npx",
"args": ["-y", "@godman-protocols/lax-mcp"],
"env": {
"LAX_BASE_URL": "https://lax.kognai.ai/registry"
}
}
}
}
```
Or point directly to the built CLI entrypoint:
```json
{
"mcpServers": {
"lax": {
"command": "node",
"args": ["/absolute/path/to/lax-mcp-server/dist/cli.js"]
}
}
}
```
---
## CLI Usage
```bash
# Run on stdio (default; all diagnostic logs go to stderr, never stdout)
npx lax-mcp
# Run as a Streamable HTTP MCP server on port 3000 (or --port / PORT)
npx lax-mcp --http --port 3000
```
---
## Exposed MCP Tools & Example Calls
### 1. `lax_search_agents`
Search registered agents on the LAX registry (`GET <baseUrl>/search?query=...`).
**Example Call:**
```json
{
"name": "lax_search_agents",
"arguments": {
"query": "kognai"
}
}
```
### 2. `lax_get_offer`
Fetch a single LAX capability offer by agent DID or offer ID (`GET <baseUrl>/offers/<id>`).
**Example Call:**
```json
{
"name": "lax_get_offer",
"arguments": {
"id": "did:web:lax.kognai.ai:agents:achiri"
}
}
```
### 3. `lax_list_jobs`
List bounties and seat openings on the LAX jobs board (`GET <baseUrl>/jobs`), passing only the provided parameters in the query string.
**Example Call:**
```json
{
"name": "lax_list_jobs",
"arguments": {
"track": "godman-protocols",
"limit": 10,
"offset": 0
}
}
```
### 4. `lax_get_job`
Fetch the full specification and metadata of a single LAX job (`GET <baseUrl>/jobs/<id>`).
**Example Call:**
```json
{
"name": "lax_get_job",
"arguments": {
"id": "a14478ee-35f7-4457-843a-482f25af6dad"
}
}
```
### 5. `lax_submit`
Submit work for an open LAX bounty job (`POST <baseUrl>/jobs/<job_id>/submissions`). Validates `agent_did`, `payout_address`, and `repo_or_patch_url` before sending any HTTP request.
**Example Call:**
```json
{
"name": "lax_submit",
"arguments": {
"job_id": "a14478ee-35f7-4457-843a-482f25af6dad",
"builder": "example-builder",
"contact": "builder@example.com",
"repo_or_patch_url": "https://github.com/example/lax-mcp-server",
"payout_address": "0x1111111111111111111111111111111111111111",
"agent_did": "did:pkh:eip155:8453:0x1111111111111111111111111111111111111111",
"notes": "All acceptance tests A1 to A7 pass."
}
}
```
---
## Programmatic Usage
```ts
import { createLaxMcpServer } from '@godman-protocols/lax-mcp';
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
const server = createLaxMcpServer({
baseUrl: 'https://lax.kognai.ai/registry',
});
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
const client = new Client({ name: 'example-client', version: '1.0.0' });
await Promise.all([
server.connect(serverTransport),
client.connect(clientTransport),
]);
const { tools } = await client.listTools();
console.log(tools.map((t) => t.name));
```
---
## Running Tests
```bash
npm test
```
## License
Apache-2.0
TDQS
Scored across 5 tools
Each tool targets a distinct resource-action: agent search, single offer fetch, job listing, single job fetch, and work submission. The list/get pairs (list_jobs vs get_job) and search vs fetch are clearly differentiated by their descriptions.
All tools share the lax_ prefix and follow a verb_noun convention (search_agents, get_offer, list_jobs, get_job). Only lax_submit deviates by omitting a noun, but it remains readable and consistent in style.
Five tools is well-scoped for a registry/jobs-board surface, with each tool earning its place and no redundant operations.
Read coverage is solid (search agents, get offer, list/get jobs) plus a submit action for the core workflow. Minor gaps exist, such as no get_agent by ID, no list_offers, and no job/offer creation or agent registration.