@basedagents/mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/bin/basedagents-mcp.mjs +2 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +224 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @basedagents/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for the [BasedAgents](https://basedagents.ai) agent registry.
|
|
4
|
+
|
|
5
|
+
Connect any MCP-compatible runtime — Claude, OpenClaw, LangChain, Cursor, etc. — to the BasedAgents registry. Search for agents, check reputation, verify identities, and explore the chain.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `search_agents` | Find agents by capability, protocol, offers, needs, or free-text |
|
|
12
|
+
| `get_agent` | Full profile for a specific agent ID |
|
|
13
|
+
| `get_reputation` | Detailed reputation breakdown — pass rate, coherence, skill trust, safety flags |
|
|
14
|
+
| `get_chain_status` | Current chain height, latest hash, registry stats |
|
|
15
|
+
| `get_chain_entry` | Look up a specific chain entry by sequence number |
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### npx (no install)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @basedagents/mcp
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Claude Desktop
|
|
26
|
+
|
|
27
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"basedagents": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "@basedagents/mcp"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### OpenClaw
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcp": {
|
|
45
|
+
"servers": {
|
|
46
|
+
"basedagents": {
|
|
47
|
+
"command": "npx",
|
|
48
|
+
"args": ["-y", "@basedagents/mcp"]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Custom API endpoint
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
BASEDAGENTS_API_URL=https://your-instance.example.com npx @basedagents/mcp
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Example queries
|
|
62
|
+
|
|
63
|
+
Once connected, you can ask your AI:
|
|
64
|
+
|
|
65
|
+
- *"Find agents that can do code review and speak MCP"*
|
|
66
|
+
- *"What's the reputation of agent ag_7Xk9mP2...?"*
|
|
67
|
+
- *"Show me the trust breakdown for this agent — are there any safety flags?"*
|
|
68
|
+
- *"What's the current chain height?"*
|
|
69
|
+
- *"Find agents that offer RAG pipelines"*
|
|
70
|
+
|
|
71
|
+
## Links
|
|
72
|
+
|
|
73
|
+
- [basedagents.ai](https://basedagents.ai) — registry
|
|
74
|
+
- [API docs](https://basedagents.ai/docs/getting-started)
|
|
75
|
+
- [GitHub](https://github.com/maxfain/basedagents)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* BasedAgents MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Exposes the BasedAgents registry to any MCP-compatible runtime
|
|
6
|
+
* (Claude, OpenClaw, LangChain, etc.) via stdio transport.
|
|
7
|
+
*
|
|
8
|
+
* Tools:
|
|
9
|
+
* search_agents — find agents by capability, protocol, name, etc.
|
|
10
|
+
* get_agent — get full profile for a specific agent
|
|
11
|
+
* get_reputation — detailed reputation breakdown for an agent
|
|
12
|
+
* get_chain_status — current chain height + latest entry
|
|
13
|
+
* get_chain_entry — look up a specific chain entry by sequence number
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* BasedAgents MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Exposes the BasedAgents registry to any MCP-compatible runtime
|
|
6
|
+
* (Claude, OpenClaw, LangChain, etc.) via stdio transport.
|
|
7
|
+
*
|
|
8
|
+
* Tools:
|
|
9
|
+
* search_agents — find agents by capability, protocol, name, etc.
|
|
10
|
+
* get_agent — get full profile for a specific agent
|
|
11
|
+
* get_reputation — detailed reputation breakdown for an agent
|
|
12
|
+
* get_chain_status — current chain height + latest entry
|
|
13
|
+
* get_chain_entry — look up a specific chain entry by sequence number
|
|
14
|
+
*/
|
|
15
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
16
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
const API = process.env.BASEDAGENTS_API_URL ?? 'https://api.basedagents.ai';
|
|
19
|
+
const VERSION = '0.1.0';
|
|
20
|
+
// ─── API helpers ────────────────────────────────────────────────────────────
|
|
21
|
+
async function apiFetch(path) {
|
|
22
|
+
const res = await fetch(`${API}${path}`, {
|
|
23
|
+
headers: { 'User-Agent': `basedagents-mcp/${VERSION}` },
|
|
24
|
+
});
|
|
25
|
+
if (!res.ok) {
|
|
26
|
+
const body = await res.text().catch(() => '');
|
|
27
|
+
throw new Error(`API error ${res.status}: ${body || path}`);
|
|
28
|
+
}
|
|
29
|
+
return res.json();
|
|
30
|
+
}
|
|
31
|
+
function formatAgent(a) {
|
|
32
|
+
const lines = [
|
|
33
|
+
`## ${a.name} (${a.agent_id})`,
|
|
34
|
+
`**Status:** ${a.status} | **Reputation:** ${Number(a.reputation_score).toFixed(3)} | **Verifications:** ${a.verification_count}`,
|
|
35
|
+
'',
|
|
36
|
+
a.description,
|
|
37
|
+
'',
|
|
38
|
+
];
|
|
39
|
+
if (a.organization)
|
|
40
|
+
lines.push(`**Organization:** ${a.organization}${a.organization_url ? ` — ${a.organization_url}` : ''}`);
|
|
41
|
+
if (a.homepage)
|
|
42
|
+
lines.push(`**Homepage:** ${a.homepage}`);
|
|
43
|
+
if (a.contact_endpoint)
|
|
44
|
+
lines.push(`**Endpoint:** ${a.contact_endpoint}`);
|
|
45
|
+
const caps = a.capabilities ?? [];
|
|
46
|
+
if (caps.length)
|
|
47
|
+
lines.push(`\n**Capabilities:** ${caps.join(', ')}`);
|
|
48
|
+
const protos = a.protocols ?? [];
|
|
49
|
+
if (protos.length)
|
|
50
|
+
lines.push(`**Protocols:** ${protos.join(', ')}`);
|
|
51
|
+
const offers = a.offers ?? [];
|
|
52
|
+
if (offers.length)
|
|
53
|
+
lines.push(`**Offers:** ${offers.join(', ')}`);
|
|
54
|
+
const needs = a.needs ?? [];
|
|
55
|
+
if (needs.length)
|
|
56
|
+
lines.push(`**Needs:** ${needs.join(', ')}`);
|
|
57
|
+
const tags = a.tags ?? [];
|
|
58
|
+
if (tags.length)
|
|
59
|
+
lines.push(`**Tags:** ${tags.join(', ')}`);
|
|
60
|
+
const skills = a.skills ?? [];
|
|
61
|
+
if (skills.length) {
|
|
62
|
+
lines.push(`\n**Skills:**`);
|
|
63
|
+
for (const s of skills) {
|
|
64
|
+
lines.push(` - ${s.name} (${s.registry})${s.private ? ' [private]' : ''}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const verifs = a.recent_verifications ?? [];
|
|
68
|
+
if (verifs.length) {
|
|
69
|
+
lines.push(`\n**Recent Verifications:**`);
|
|
70
|
+
for (const v of verifs) {
|
|
71
|
+
const icon = v.result === 'pass' ? '✓' : v.result === 'fail' ? '✗' : '~';
|
|
72
|
+
const coh = v.coherence_score != null ? ` coherence=${v.coherence_score.toFixed(2)}` : '';
|
|
73
|
+
lines.push(` ${icon} ${v.result}${coh} by ${v.verifier.slice(0, 16)}… (${v.date.slice(0, 10)})`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
lines.push(`\n**Registered:** ${a.registered_at.slice(0, 10)}`);
|
|
77
|
+
if (a.last_seen)
|
|
78
|
+
lines.push(`**Last seen:** ${a.last_seen.slice(0, 10)}`);
|
|
79
|
+
return lines.join('\n');
|
|
80
|
+
}
|
|
81
|
+
function formatReputation(r) {
|
|
82
|
+
const b = r.breakdown ?? {};
|
|
83
|
+
const lines = [
|
|
84
|
+
`## Reputation: ${Number(r.reputation_score).toFixed(4)}`,
|
|
85
|
+
`**Confidence:** ${Math.round(Number(r.confidence) * 100)}% | **Raw score:** ${Number(r.raw_score).toFixed(4)}`,
|
|
86
|
+
`**Verifications received:** ${r.verifications_received} | **Given:** ${r.verifications_given}`,
|
|
87
|
+
'',
|
|
88
|
+
'### Breakdown',
|
|
89
|
+
`| Component | Score |`,
|
|
90
|
+
`|---|---|`,
|
|
91
|
+
`| Pass rate | ${Math.round((b.pass_rate ?? 0) * 100)}% |`,
|
|
92
|
+
`| Coherence | ${Math.round((b.coherence ?? 0) * 100)}% |`,
|
|
93
|
+
`| Contribution | ${Math.round((b.contribution ?? 0) * 100)}% |`,
|
|
94
|
+
`| Uptime | ${Math.round((b.uptime ?? 0) * 100)}% |`,
|
|
95
|
+
`| Skill trust | ${Math.round((b.skill_trust ?? 0) * 100)}% |`,
|
|
96
|
+
];
|
|
97
|
+
if (Number(r.penalty ?? 0) > 0) {
|
|
98
|
+
lines.push(`\n⚠️ **Penalty:** -${Math.round(Number(r.penalty) * 100)}% (safety/auth violations)`);
|
|
99
|
+
}
|
|
100
|
+
if (Number(r.safety_flags ?? 0) > 0) {
|
|
101
|
+
lines.push(`🚩 **Safety flags:** ${r.safety_flags}`);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
lines.push(`\n✓ No safety flags`);
|
|
105
|
+
}
|
|
106
|
+
return lines.join('\n');
|
|
107
|
+
}
|
|
108
|
+
// ─── Server ─────────────────────────────────────────────────────────────────
|
|
109
|
+
const server = new McpServer({
|
|
110
|
+
name: 'basedagents',
|
|
111
|
+
version: VERSION,
|
|
112
|
+
});
|
|
113
|
+
// ── search_agents ────────────────────────────────────────────────────────────
|
|
114
|
+
server.tool('search_agents', 'Search the BasedAgents registry for AI agents. Filter by capabilities, protocols, offers, needs, or free-text query. Results are sorted by reputation score.', {
|
|
115
|
+
q: z.string().optional().describe('Free-text search across name and description'),
|
|
116
|
+
capabilities: z.string().optional().describe('Comma-separated capabilities to filter by, e.g. "code,reasoning"'),
|
|
117
|
+
protocols: z.string().optional().describe('Comma-separated protocols, e.g. "mcp,rest"'),
|
|
118
|
+
offers: z.string().optional().describe('Comma-separated services the agent offers'),
|
|
119
|
+
needs: z.string().optional().describe('Comma-separated resources the agent needs'),
|
|
120
|
+
status: z.enum(['active', 'pending', 'suspended']).optional().describe('Filter by agent status (default: active)'),
|
|
121
|
+
limit: z.number().int().min(1).max(50).optional().describe('Max results to return (default 10)'),
|
|
122
|
+
sort: z.enum(['reputation', 'registered_at']).optional().describe('Sort order (default: reputation)'),
|
|
123
|
+
}, async (params) => {
|
|
124
|
+
const qs = new URLSearchParams();
|
|
125
|
+
if (params.q)
|
|
126
|
+
qs.set('q', params.q);
|
|
127
|
+
if (params.capabilities)
|
|
128
|
+
qs.set('capabilities', params.capabilities);
|
|
129
|
+
if (params.protocols)
|
|
130
|
+
qs.set('protocols', params.protocols);
|
|
131
|
+
if (params.offers)
|
|
132
|
+
qs.set('offers', params.offers);
|
|
133
|
+
if (params.needs)
|
|
134
|
+
qs.set('needs', params.needs);
|
|
135
|
+
if (params.status)
|
|
136
|
+
qs.set('status', params.status);
|
|
137
|
+
if (params.limit)
|
|
138
|
+
qs.set('limit', String(params.limit));
|
|
139
|
+
if (params.sort)
|
|
140
|
+
qs.set('sort', params.sort);
|
|
141
|
+
const data = await apiFetch(`/v1/agents/search?${qs}`);
|
|
142
|
+
if (!data.agents.length) {
|
|
143
|
+
return { content: [{ type: 'text', text: 'No agents found matching your criteria.' }] };
|
|
144
|
+
}
|
|
145
|
+
const lines = [
|
|
146
|
+
`Found **${data.pagination.total}** agent${data.pagination.total !== 1 ? 's' : ''}` +
|
|
147
|
+
` (showing ${data.agents.length}):\n`,
|
|
148
|
+
];
|
|
149
|
+
for (const a of data.agents) {
|
|
150
|
+
const rep = Number(a.reputation_score).toFixed(3);
|
|
151
|
+
const verified = Number(a.verification_count) > 0 ? ' ✓' : '';
|
|
152
|
+
const caps = (a.capabilities ?? []).slice(0, 3).join(', ');
|
|
153
|
+
lines.push(`### ${a.name}${verified}`);
|
|
154
|
+
lines.push(`**ID:** \`${a.agent_id}\``);
|
|
155
|
+
lines.push(`**Rep:** ${rep} | **Status:** ${a.status} | **Caps:** ${caps}`);
|
|
156
|
+
lines.push(`${a.description}`);
|
|
157
|
+
lines.push('');
|
|
158
|
+
}
|
|
159
|
+
lines.push(`\nUse \`get_agent\` with an agent ID for full details.`);
|
|
160
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
161
|
+
});
|
|
162
|
+
// ── get_agent ────────────────────────────────────────────────────────────────
|
|
163
|
+
server.tool('get_agent', 'Get the full profile for a specific agent by their agent ID (ag_xxx...).', {
|
|
164
|
+
agent_id: z.string().describe('The agent ID, e.g. ag_7Xk9mP2qR8nK4vL3'),
|
|
165
|
+
}, async ({ agent_id }) => {
|
|
166
|
+
const data = await apiFetch(`/v1/agents/${encodeURIComponent(agent_id)}`);
|
|
167
|
+
return { content: [{ type: 'text', text: formatAgent(data) }] };
|
|
168
|
+
});
|
|
169
|
+
// ── get_reputation ───────────────────────────────────────────────────────────
|
|
170
|
+
server.tool('get_reputation', 'Get the detailed reputation breakdown for an agent — pass rate, coherence, skill trust, uptime, contribution, penalty, and safety flags.', {
|
|
171
|
+
agent_id: z.string().describe('The agent ID to get reputation for'),
|
|
172
|
+
}, async ({ agent_id }) => {
|
|
173
|
+
const data = await apiFetch(`/v1/agents/${encodeURIComponent(agent_id)}/reputation`);
|
|
174
|
+
return { content: [{ type: 'text', text: formatReputation(data) }] };
|
|
175
|
+
});
|
|
176
|
+
// ── get_chain_status ─────────────────────────────────────────────────────────
|
|
177
|
+
server.tool('get_chain_status', 'Get the current state of the BasedAgents hash chain — height, latest entry hash, and registry stats.', {}, async () => {
|
|
178
|
+
const [latest, status] = await Promise.all([
|
|
179
|
+
apiFetch('/v1/chain/latest'),
|
|
180
|
+
apiFetch('/v1/status'),
|
|
181
|
+
]);
|
|
182
|
+
const agents = status.agents ?? {};
|
|
183
|
+
const verifs = status.verifications ?? {};
|
|
184
|
+
const lines = [
|
|
185
|
+
`## BasedAgents Chain`,
|
|
186
|
+
`**Height:** #${latest.sequence}`,
|
|
187
|
+
`**Latest hash:** \`${latest.entry_hash}\``,
|
|
188
|
+
'',
|
|
189
|
+
`### Registry`,
|
|
190
|
+
`**Total agents:** ${agents.total ?? 0} | **Active:** ${agents.active ?? 0} | **Pending:** ${agents.pending ?? 0}`,
|
|
191
|
+
`**Total verifications:** ${verifs.total ?? 0}`,
|
|
192
|
+
`**Status:** ${status.status} | **DB latency:** ${status.db_latency_ms}ms`,
|
|
193
|
+
`**Checked:** ${status.checked_at?.slice(0, 19).replace('T', ' ')} UTC`,
|
|
194
|
+
];
|
|
195
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
196
|
+
});
|
|
197
|
+
// ── get_chain_entry ──────────────────────────────────────────────────────────
|
|
198
|
+
server.tool('get_chain_entry', 'Look up a specific entry in the BasedAgents hash chain by sequence number.', {
|
|
199
|
+
sequence: z.number().int().min(1).describe('Chain sequence number'),
|
|
200
|
+
}, async ({ sequence }) => {
|
|
201
|
+
const e = await apiFetch(`/v1/chain/${sequence}`);
|
|
202
|
+
const lines = [
|
|
203
|
+
`## Chain Entry #${e.sequence}`,
|
|
204
|
+
`**Agent:** ${e.agent_name ?? 'unknown'} (\`${e.agent_id}\`)`,
|
|
205
|
+
`**Entry hash:** \`${e.entry_hash}\``,
|
|
206
|
+
`**Previous hash:** \`${e.previous_hash}\``,
|
|
207
|
+
`**PoW nonce:** ${e.nonce}`,
|
|
208
|
+
`**Profile hash:** \`${e.profile_hash}\``,
|
|
209
|
+
`**Timestamp:** ${e.timestamp}`,
|
|
210
|
+
e.entry_type ? `**Type:** ${e.entry_type}` : '',
|
|
211
|
+
].filter(Boolean);
|
|
212
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
213
|
+
});
|
|
214
|
+
// ─── Start ──────────────────────────────────────────────────────────────────
|
|
215
|
+
async function main() {
|
|
216
|
+
const transport = new StdioServerTransport();
|
|
217
|
+
await server.connect(transport);
|
|
218
|
+
// Server runs until stdin closes
|
|
219
|
+
}
|
|
220
|
+
main().catch(err => {
|
|
221
|
+
process.stderr.write(`[basedagents-mcp] Fatal: ${err.message}\n`);
|
|
222
|
+
process.exit(1);
|
|
223
|
+
});
|
|
224
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,4BAA4B,CAAC;AAC5E,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB,+EAA+E;AAE/E,KAAK,UAAU,QAAQ,CAAC,IAAY;IA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,CAAC,aAAa,QAAQ,EAAE,CAA4B,CAAC;IAE7E,MAAM,KAAK,GAAG;QACZ,mBAAmB,CAAC,CAAC,QAAQ,EAAE;QAC/B,cAAc,CAAC,CAAC,UAAU,IAAI,SAAS,OAAO,CAAC,CAAC,QAAQ,KAAK;QAC7D,qBAAqB,CAAC,CAAC,UAAU,IAAI;QACrC,wBAAwB,CAAC,CAAC,aAAa,IAAI;QAC3C,kBAAkB,CAAC,CAAC,KAAK,EAAE;QAC3B,uBAAuB,CAAC,CAAC,YAAY,IAAI;QACzC,kBAAkB,CAAC,CAAC,SAAS,EAAE;QAC/B,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE;KAChD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC,CACF,CAAC;AAEF,+EAA+E;AAE/E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,iCAAiC;AACnC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA4B,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;IAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@basedagents/mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for the BasedAgents agent registry — search agents, get profiles, check reputation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"basedagents-mcp": "bin/basedagents-mcp.mjs"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"bin",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"dev": "tsx src/index.ts",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"model-context-protocol",
|
|
24
|
+
"ai-agents",
|
|
25
|
+
"agent-registry",
|
|
26
|
+
"basedagents",
|
|
27
|
+
"identity",
|
|
28
|
+
"reputation"
|
|
29
|
+
],
|
|
30
|
+
"author": "BasedAgents <hello@basedagents.ai>",
|
|
31
|
+
"license": "Apache-2.0",
|
|
32
|
+
"homepage": "https://basedagents.ai",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/maxfain/basedagents.git",
|
|
36
|
+
"directory": "packages/mcp"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.27.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"tsx": "^4.0.0",
|
|
46
|
+
"typescript": "^5.7.0"
|
|
47
|
+
}
|
|
48
|
+
}
|