@varun-ai07/covenant-mcp 1.0.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 +1078 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +195 -0
- package/dist/cli.js.map +1 -0
- package/dist/colors.d.ts +14 -0
- package/dist/colors.d.ts.map +1 -0
- package/dist/colors.js +14 -0
- package/dist/colors.js.map +1 -0
- package/dist/config.d.ts +396 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +191 -0
- package/dist/config.js.map +1 -0
- package/dist/handlers/transactions.d.ts +5 -0
- package/dist/handlers/transactions.d.ts.map +1 -0
- package/dist/handlers/transactions.js +82 -0
- package/dist/handlers/transactions.js.map +1 -0
- package/dist/handlers/wallet.d.ts +24 -0
- package/dist/handlers/wallet.d.ts.map +1 -0
- package/dist/handlers/wallet.js +264 -0
- package/dist/handlers/wallet.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +11 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +31 -0
- package/dist/logger.js.map +1 -0
- package/dist/postinstall.d.ts +3 -0
- package/dist/postinstall.d.ts.map +1 -0
- package/dist/postinstall.js +38 -0
- package/dist/postinstall.js.map +1 -0
- package/dist/schemas.d.ts +48 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +114 -0
- package/dist/schemas.js.map +1 -0
- package/dist/server.d.ts +23 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +51 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/batches.d.ts +3 -0
- package/dist/tools/batches.d.ts.map +1 -0
- package/dist/tools/batches.js +167 -0
- package/dist/tools/batches.js.map +1 -0
- package/dist/tools/collectives.d.ts +3 -0
- package/dist/tools/collectives.d.ts.map +1 -0
- package/dist/tools/collectives.js +168 -0
- package/dist/tools/collectives.js.map +1 -0
- package/dist/tools/disputes.d.ts +3 -0
- package/dist/tools/disputes.d.ts.map +1 -0
- package/dist/tools/disputes.js +129 -0
- package/dist/tools/disputes.js.map +1 -0
- package/dist/tools/escrow.d.ts +3 -0
- package/dist/tools/escrow.d.ts.map +1 -0
- package/dist/tools/escrow.js +238 -0
- package/dist/tools/escrow.js.map +1 -0
- package/dist/tools/insurance.d.ts +3 -0
- package/dist/tools/insurance.d.ts.map +1 -0
- package/dist/tools/insurance.js +101 -0
- package/dist/tools/insurance.js.map +1 -0
- package/dist/tools/market.d.ts +3 -0
- package/dist/tools/market.d.ts.map +1 -0
- package/dist/tools/market.js +303 -0
- package/dist/tools/market.js.map +1 -0
- package/dist/tools/protocol.d.ts +3 -0
- package/dist/tools/protocol.d.ts.map +1 -0
- package/dist/tools/protocol.js +121 -0
- package/dist/tools/protocol.js.map +1 -0
- package/dist/tools/receipts.d.ts +3 -0
- package/dist/tools/receipts.d.ts.map +1 -0
- package/dist/tools/receipts.js +88 -0
- package/dist/tools/receipts.js.map +1 -0
- package/dist/tools/registry.d.ts +3 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +136 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/transports/http.d.ts +3 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +121 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/stdio.d.ts +7 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +9 -0
- package/dist/transports/stdio.js.map +1 -0
- package/dist/types.d.ts +89 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +24 -0
- package/dist/types.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReceiptVerifier MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* get_receipts — Fetch all receipts for an address
|
|
5
|
+
* verify_receipt — Verify a specific receipt on-chain
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { isAddress } from "viem";
|
|
9
|
+
import { loadAbi, CONTRACTS } from "../config.js";
|
|
10
|
+
import { readContract } from "../handlers/wallet.js";
|
|
11
|
+
import { formatReadResult, formatError } from "../handlers/transactions.js";
|
|
12
|
+
import { RECEIPT_TYPE } from "../types.js";
|
|
13
|
+
const ABI = loadAbi("ReceiptVerifier");
|
|
14
|
+
// Input validation schemas
|
|
15
|
+
const getReceiptsSchema = z.object({
|
|
16
|
+
address: z.string().refine(isAddress, { message: "Invalid Ethereum address" })
|
|
17
|
+
});
|
|
18
|
+
const verifyReceiptSchema = z.object({
|
|
19
|
+
receiptId: z.number().int().positive()
|
|
20
|
+
});
|
|
21
|
+
export function registerReceiptTools(server) {
|
|
22
|
+
// ──────────────────────────────────────────────────────────────
|
|
23
|
+
// get_receipts
|
|
24
|
+
// ──────────────────────────────────────────────────────────────
|
|
25
|
+
server.registerTool("get_receipts", {
|
|
26
|
+
title: "Get Receipts for Address",
|
|
27
|
+
description: "Retrieve all ERC-8004 attestation receipts issued to or by an address. " +
|
|
28
|
+
"Returns receipt IDs, issuers, counterparty, type, task reference, and validity.",
|
|
29
|
+
inputSchema: {
|
|
30
|
+
address: z.string().describe("Ethereum address to look up receipts for"),
|
|
31
|
+
},
|
|
32
|
+
}, async ({ address }) => {
|
|
33
|
+
try {
|
|
34
|
+
// Validate input
|
|
35
|
+
const validationResult = getReceiptsSchema.safeParse({ address });
|
|
36
|
+
if (!validationResult.success) {
|
|
37
|
+
return formatError(new Error(`Invalid input: ${validationResult.error.issues.map((e) => e.message).join(", ")}`));
|
|
38
|
+
}
|
|
39
|
+
// Use validated address
|
|
40
|
+
const validatedAddress = validationResult.data.address;
|
|
41
|
+
// Read receipts for this address from the ReceiptVerifier contract
|
|
42
|
+
const data = await readContract(CONTRACTS.ReceiptVerifier, ABI, "getReceipts", [validatedAddress]);
|
|
43
|
+
// Enrich receipt types with human-readable labels
|
|
44
|
+
const receipts = Array.isArray(data)
|
|
45
|
+
? data.map((r) => ({
|
|
46
|
+
...r,
|
|
47
|
+
typeLabel: RECEIPT_TYPE[r.interactionType] ?? `Unknown(${r.interactionType})`,
|
|
48
|
+
}))
|
|
49
|
+
: data;
|
|
50
|
+
return formatReadResult({ address, count: Array.isArray(data) ? data.length : 0, receipts }, `Receipts for ${address}`);
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
return formatError(e);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
// ──────────────────────────────────────────────────────────────
|
|
57
|
+
// verify_receipt
|
|
58
|
+
// ──────────────────────────────────────────────────────────────
|
|
59
|
+
server.registerTool("verify_receipt", {
|
|
60
|
+
title: "Verify a Receipt",
|
|
61
|
+
description: "Check whether a specific ERC-8004 receipt is valid on-chain. " +
|
|
62
|
+
"Returns the receipt details and validity status.",
|
|
63
|
+
inputSchema: {
|
|
64
|
+
receiptId: z.number().describe("Numeric receipt ID"),
|
|
65
|
+
},
|
|
66
|
+
}, async ({ receiptId }) => {
|
|
67
|
+
try {
|
|
68
|
+
// Validate input
|
|
69
|
+
const validationResult = verifyReceiptSchema.safeParse({ receiptId });
|
|
70
|
+
if (!validationResult.success) {
|
|
71
|
+
return formatError(new Error(`Invalid input: ${validationResult.error.issues.map((e) => e.message).join(", ")}`));
|
|
72
|
+
}
|
|
73
|
+
// Use validated receiptId
|
|
74
|
+
const validatedReceiptId = validationResult.data.receiptId;
|
|
75
|
+
const data = await readContract(CONTRACTS.ReceiptVerifier, ABI, "getReceipt", [BigInt(receiptId)]);
|
|
76
|
+
const enriched = {
|
|
77
|
+
...data,
|
|
78
|
+
typeLabel: RECEIPT_TYPE[data.interactionType] ??
|
|
79
|
+
`Unknown(${data.interactionType})`,
|
|
80
|
+
};
|
|
81
|
+
return formatReadResult(enriched, `Receipt #${receiptId}`);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
return formatError(e);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=receipts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipts.js","sourceRoot":"","sources":["../../src/tools/receipts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAgB,SAAS,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,2BAA2B;AAC3B,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;CAC/E,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,iEAAiE;IACjE,eAAe;IACf,iEAAiE;IACjE,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,yEAAyE;YACzE,iFAAiF;QACnF,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;SACzE;KACF,EACD,KAAK,EA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AO,WAAW,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuBzE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA8J1D"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentRegistry MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* register_agent — Register a new agent on-chain
|
|
5
|
+
* get_agent — Look up an agent's profile by address
|
|
6
|
+
* find_workers — Find agents by capability string
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { parseEther, isAddress } from "viem";
|
|
10
|
+
import { loadAbi, CONTRACTS, getAccount } from "../config.js";
|
|
11
|
+
import { executeOrPrepare, readContract } from "../handlers/wallet.js";
|
|
12
|
+
import { formatTxResult, formatReadResult, formatError } from "../handlers/transactions.js";
|
|
13
|
+
const ABI = loadAbi("AgentRegistry");
|
|
14
|
+
// Input validation schemas
|
|
15
|
+
const registerAgentSchema = z.object({
|
|
16
|
+
name: z.string().min(1).max(100).regex(/^[a-zA-Z0-9\s\-_]+$/, "Agent name can only contain letters, numbers, spaces, hyphens, and underscores"),
|
|
17
|
+
capabilities: z.array(z.string().min(1).max(50)).max(10, "Maximum 10 capabilities allowed"),
|
|
18
|
+
stake: z.string().regex(/^\d+\.\d{1,18}$/, "Invalid ETH amount format").optional().default("0.001")
|
|
19
|
+
.refine(val => {
|
|
20
|
+
const stakeAmount = parseFloat(val);
|
|
21
|
+
return stakeAmount >= 0.001 && stakeAmount <= 100;
|
|
22
|
+
}, { message: "Stake must be between 0.001 and 100 ETH" })
|
|
23
|
+
});
|
|
24
|
+
const getAgentSchema = z.object({
|
|
25
|
+
address: z.string().refine(isAddress, { message: "Invalid Ethereum address" })
|
|
26
|
+
});
|
|
27
|
+
const findWorkersSchema = z.object({
|
|
28
|
+
capability: z.string().min(1).max(50)
|
|
29
|
+
});
|
|
30
|
+
export function registerAgentTools(server) {
|
|
31
|
+
// ──────────────────────────────────────────────────────────────
|
|
32
|
+
// register_agent
|
|
33
|
+
// ──────────────────────────────────────────────────────────────
|
|
34
|
+
server.registerTool("register_agent", {
|
|
35
|
+
title: "Register Agent",
|
|
36
|
+
description: "Register a new AI agent on the AgentRegistry contract. " +
|
|
37
|
+
"Requires a name, array of capabilities, and a minimum stake of 0.001 ETH.",
|
|
38
|
+
inputSchema: {
|
|
39
|
+
name: z.string().describe("Agent display name"),
|
|
40
|
+
capabilities: z
|
|
41
|
+
.array(z.string())
|
|
42
|
+
.describe('Capability tags, e.g. ["data-analysis", "code-review"]'),
|
|
43
|
+
stake: z
|
|
44
|
+
.string()
|
|
45
|
+
.optional()
|
|
46
|
+
.describe("Stake amount in ETH (default 0.001)"),
|
|
47
|
+
},
|
|
48
|
+
}, async ({ name, capabilities, stake }) => {
|
|
49
|
+
try {
|
|
50
|
+
// Validate input
|
|
51
|
+
const validationResult = registerAgentSchema.safeParse({ name, capabilities, stake });
|
|
52
|
+
if (!validationResult.success) {
|
|
53
|
+
return formatError(new Error(`Invalid input: ${validationResult.error.issues.map((e) => e.message).join(", ")}`));
|
|
54
|
+
}
|
|
55
|
+
// Use validated values
|
|
56
|
+
const validatedName = validationResult.data.name;
|
|
57
|
+
const validatedCapabilities = validationResult.data.capabilities;
|
|
58
|
+
const validatedStake = validationResult.data.stake;
|
|
59
|
+
const account = getAccount();
|
|
60
|
+
if (!account) {
|
|
61
|
+
return formatError(new Error("No private key configured — cannot send transactions"));
|
|
62
|
+
}
|
|
63
|
+
const stakeAmount = parseEther(validatedStake);
|
|
64
|
+
const result = await executeOrPrepare(CONTRACTS.AgentRegistry, ABI, "register", [validatedName, validatedCapabilities], stakeAmount);
|
|
65
|
+
return formatTxResult(result);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
return formatError(e);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
// ──────────────────────────────────────────────────────────────
|
|
72
|
+
// get_agent
|
|
73
|
+
// ──────────────────────────────────────────────────────────────
|
|
74
|
+
server.registerTool("get_agent", {
|
|
75
|
+
title: "Get Agent Profile",
|
|
76
|
+
description: "Retrieve the full on-chain profile for a registered agent by address. " +
|
|
77
|
+
"Returns name, DID, reputation, staked amount, capabilities, task counts.",
|
|
78
|
+
inputSchema: {
|
|
79
|
+
address: z.string().describe("Agent's Ethereum address (0x...)"),
|
|
80
|
+
},
|
|
81
|
+
}, async ({ address }) => {
|
|
82
|
+
try {
|
|
83
|
+
// Validate input
|
|
84
|
+
const validationResult = getAgentSchema.safeParse({ address });
|
|
85
|
+
if (!validationResult.success) {
|
|
86
|
+
return formatError(new Error(`Invalid input: ${validationResult.error.issues.map((e) => e.message).join(", ")}`));
|
|
87
|
+
}
|
|
88
|
+
// Use validated address
|
|
89
|
+
const validatedAddress = validationResult.data.address;
|
|
90
|
+
const data = await readContract(CONTRACTS.AgentRegistry, ABI, "getAgent", [validatedAddress]);
|
|
91
|
+
return formatReadResult(data, `Agent profile for ${address}`);
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
return formatError(e);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
// ──────────────────────────────────────────────────────────────
|
|
98
|
+
// find_workers
|
|
99
|
+
// ──────────────────────────────────────────────────────────────
|
|
100
|
+
server.registerTool("find_workers", {
|
|
101
|
+
title: "Find Workers by Capability",
|
|
102
|
+
description: "Discover agents that have a specific capability tag. " +
|
|
103
|
+
"Returns addresses and profiles sorted by reputation (highest first).",
|
|
104
|
+
inputSchema: {
|
|
105
|
+
capability: z
|
|
106
|
+
.string()
|
|
107
|
+
.describe('Capability to search for, e.g. "data-analysis"'),
|
|
108
|
+
},
|
|
109
|
+
}, async ({ capability }) => {
|
|
110
|
+
try {
|
|
111
|
+
// Validate input
|
|
112
|
+
const validationResult = findWorkersSchema.safeParse({ capability });
|
|
113
|
+
if (!validationResult.success) {
|
|
114
|
+
return formatError(new Error(`Invalid input: ${validationResult.error.issues.map((e) => e.message).join(", ")}`));
|
|
115
|
+
}
|
|
116
|
+
// Use validated capability
|
|
117
|
+
const validatedCapability = validationResult.data.capability;
|
|
118
|
+
const addresses = (await readContract(CONTRACTS.AgentRegistry, ABI, "getAgentsByCapability", [capability]));
|
|
119
|
+
if (addresses.length === 0) {
|
|
120
|
+
return formatReadResult({ capability, count: 0, workers: [] }, `No workers found for "${capability}"`);
|
|
121
|
+
}
|
|
122
|
+
// Fetch full profiles
|
|
123
|
+
const workers = await Promise.all(addresses.map(async (addr) => {
|
|
124
|
+
const profile = await readContract(CONTRACTS.AgentRegistry, ABI, "getAgent", [addr]);
|
|
125
|
+
return { address: addr, ...profile };
|
|
126
|
+
}));
|
|
127
|
+
// Sort by reputation descending
|
|
128
|
+
workers.sort((a, b) => Number(b.reputation ?? 0) - Number(a.reputation ?? 0));
|
|
129
|
+
return formatReadResult({ capability, count: workers.length, workers }, `Workers with capability "${capability}"`);
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
return formatError(e);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAgB,SAAS,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,uBA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,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CA4Ef"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP (Streamable) transport for COVENANT MCP Server.
|
|
3
|
+
* Runs an Express server accepting MCP requests over HTTP.
|
|
4
|
+
*
|
|
5
|
+
* Uses the SDK's createMcpExpressApp for DNS rebinding protection,
|
|
6
|
+
* and StreamableHTTPServerTransport for session management.
|
|
7
|
+
*
|
|
8
|
+
* Security features:
|
|
9
|
+
* - API key authentication (required for HTTP)
|
|
10
|
+
* - Rate limiting (100 req/15min per IP)
|
|
11
|
+
* - Binds to localhost by default (override via MCP_HOST)
|
|
12
|
+
*/
|
|
13
|
+
import { randomUUID, timingSafeEqual } from "node:crypto";
|
|
14
|
+
import { createMcpExpressApp } from "@modelcontextprotocol/sdk/server/express.js";
|
|
15
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
16
|
+
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
17
|
+
import rateLimit from "express-rate-limit";
|
|
18
|
+
// ============================================================
|
|
19
|
+
// API Key Authentication Middleware
|
|
20
|
+
// ============================================================
|
|
21
|
+
function createApiKeyMiddleware() {
|
|
22
|
+
const expectedKey = process.env.MCP_API_KEY;
|
|
23
|
+
return (req, res, next) => {
|
|
24
|
+
// Skip auth for health endpoint
|
|
25
|
+
if (req.path === "/health") {
|
|
26
|
+
return next();
|
|
27
|
+
}
|
|
28
|
+
if (!expectedKey) {
|
|
29
|
+
console.error("[SECURITY] MCP_API_KEY not configured - rejecting request");
|
|
30
|
+
return res.status(500).json({ error: "Server misconfigured" });
|
|
31
|
+
}
|
|
32
|
+
const providedKey = req.headers["x-mcp-api-key"];
|
|
33
|
+
if (!providedKey) {
|
|
34
|
+
return res.status(401).json({ error: "Missing API key" });
|
|
35
|
+
}
|
|
36
|
+
// Timing-safe comparison to prevent timing attacks
|
|
37
|
+
try {
|
|
38
|
+
const providedBuf = Buffer.from(providedKey, "utf-8");
|
|
39
|
+
const expectedBuf = Buffer.from(expectedKey, "utf-8");
|
|
40
|
+
if (providedBuf.length !== expectedBuf.length) {
|
|
41
|
+
return res.status(401).json({ error: "Unauthorized" });
|
|
42
|
+
}
|
|
43
|
+
if (!timingSafeEqual(providedBuf, expectedBuf)) {
|
|
44
|
+
return res.status(401).json({ error: "Unauthorized" });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return res.status(401).json({ error: "Unauthorized" });
|
|
49
|
+
}
|
|
50
|
+
next();
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// ============================================================
|
|
54
|
+
// HTTP Server Startup
|
|
55
|
+
// ============================================================
|
|
56
|
+
export async function startHttpServer(serverFactory, port) {
|
|
57
|
+
// createMcpExpressApp provides DNS rebinding protection for localhost
|
|
58
|
+
const app = createMcpExpressApp();
|
|
59
|
+
// API key authentication (applies to all /mcp endpoints)
|
|
60
|
+
const apiKeyMiddleware = createApiKeyMiddleware();
|
|
61
|
+
app.use("/mcp", apiKeyMiddleware);
|
|
62
|
+
// Rate limiting: 100 requests per 15 minutes per IP
|
|
63
|
+
const rateLimiter = rateLimit({
|
|
64
|
+
windowMs: 15 * 60 * 1000, // 15 minutes
|
|
65
|
+
max: 100, // limit each IP to 100 requests per window
|
|
66
|
+
standardHeaders: true,
|
|
67
|
+
legacyHeaders: false,
|
|
68
|
+
});
|
|
69
|
+
app.use("/mcp", rateLimiter);
|
|
70
|
+
// Store transports by session ID (stateful mode)
|
|
71
|
+
const transports = new Map();
|
|
72
|
+
app.post("/mcp", async (req, res) => {
|
|
73
|
+
const sessionId = req.headers["mcp-session-id"];
|
|
74
|
+
if (sessionId && transports.has(sessionId)) {
|
|
75
|
+
// Reuse existing session transport
|
|
76
|
+
await transports.get(sessionId).handleRequest(req, res, req.body);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (!sessionId && isInitializeRequest(req.body)) {
|
|
80
|
+
// New session initialization
|
|
81
|
+
const transport = new StreamableHTTPServerTransport({
|
|
82
|
+
sessionIdGenerator: () => randomUUID(),
|
|
83
|
+
onsessioninitialized: (sid) => {
|
|
84
|
+
transports.set(sid, transport);
|
|
85
|
+
console.error(`[HTTP] Session initialized: ${sid}`);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
transport.onclose = () => {
|
|
89
|
+
if (transport.sessionId) {
|
|
90
|
+
transports.delete(transport.sessionId);
|
|
91
|
+
console.error(`[HTTP] Session closed: ${transport.sessionId}`);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const server = serverFactory();
|
|
95
|
+
await server.connect(transport);
|
|
96
|
+
await transport.handleRequest(req, res, req.body);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
res.status(400).json({
|
|
100
|
+
jsonrpc: "2.0",
|
|
101
|
+
error: { code: -32000, message: "Bad Request: invalid session" },
|
|
102
|
+
id: null,
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
// Health check endpoint (no auth required, minimal info)
|
|
106
|
+
app.get("/health", (_req, res) => {
|
|
107
|
+
res.json({ status: "ok", transport: "http" });
|
|
108
|
+
});
|
|
109
|
+
// Bind to localhost by default (security: don't expose to network)
|
|
110
|
+
const host = process.env.MCP_HOST || "127.0.0.1";
|
|
111
|
+
return new Promise((resolve) => {
|
|
112
|
+
app.listen(port, host, () => {
|
|
113
|
+
console.error(`[HTTP] COVENANT MCP Server listening on http://${host}:${port}/mcp`);
|
|
114
|
+
if (!process.env.MCP_API_KEY) {
|
|
115
|
+
console.error("[SECURITY] Warning: MCP_API_KEY not set. Server will reject all requests.");
|
|
116
|
+
}
|
|
117
|
+
resolve();
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.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AAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,8BAA8B,EAAE;YAChE,EAAE,EAAE,IAAI;SACT,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,yDAAyD;IACzD,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,IAAS,EAAE,GAAQ,EAAE,EAAE;QACzC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,mEAAmE;IACnE,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,WAAW,CAAC;IAEjD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE;YAC1B,OAAO,CAAC,KAAK,CAAC,kDAAkD,IAAI,IAAI,IAAI,MAAM,CAAC,CAAC;YACpF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBAC7B,OAAO,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAC;YAC7F,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stdio transport for COVENANT MCP Server.
|
|
3
|
+
* Used when running as a subprocess (e.g., Claude Code, Cursor, Windsurf).
|
|
4
|
+
*/
|
|
5
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
export declare function createStdioTransport(): StdioServerTransport;
|
|
7
|
+
//# sourceMappingURL=stdio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/transports/stdio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,wBAAgB,oBAAoB,IAAI,oBAAoB,CAE3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stdio transport for COVENANT MCP Server.
|
|
3
|
+
* Used when running as a subprocess (e.g., Claude Code, Cursor, Windsurf).
|
|
4
|
+
*/
|
|
5
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
export function createStdioTransport() {
|
|
7
|
+
return new StdioServerTransport();
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/transports/stdio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,oBAAoB,EAAE,CAAC;AACpC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Address, Hash } from "viem";
|
|
2
|
+
export type WalletMode = "autonomous" | "prepare-only";
|
|
3
|
+
export interface TxSuccess {
|
|
4
|
+
status: "success";
|
|
5
|
+
txHash: Hash;
|
|
6
|
+
blockNumber: bigint;
|
|
7
|
+
gasUsed: bigint;
|
|
8
|
+
}
|
|
9
|
+
export interface TxPrepared {
|
|
10
|
+
status: "prepared";
|
|
11
|
+
to: Address;
|
|
12
|
+
data: `0x${string}`;
|
|
13
|
+
value: bigint;
|
|
14
|
+
chainId: number;
|
|
15
|
+
nonce: number;
|
|
16
|
+
expiresAt: number;
|
|
17
|
+
}
|
|
18
|
+
export interface TxError {
|
|
19
|
+
status: "error";
|
|
20
|
+
error: string;
|
|
21
|
+
reason?: string;
|
|
22
|
+
}
|
|
23
|
+
export type TxResult = TxSuccess | TxPrepared | TxError;
|
|
24
|
+
export interface AgentInfo {
|
|
25
|
+
address: Address;
|
|
26
|
+
name: string;
|
|
27
|
+
did: string;
|
|
28
|
+
reputation: number;
|
|
29
|
+
stakedAmount: string;
|
|
30
|
+
capabilities: string[];
|
|
31
|
+
isRegistered: boolean;
|
|
32
|
+
tasksCompleted: number;
|
|
33
|
+
tasksFailed: number;
|
|
34
|
+
registeredAt: number;
|
|
35
|
+
}
|
|
36
|
+
export interface TaskInfo {
|
|
37
|
+
taskId: number;
|
|
38
|
+
client: Address;
|
|
39
|
+
worker: Address;
|
|
40
|
+
payment: string;
|
|
41
|
+
deadline: number;
|
|
42
|
+
status: number;
|
|
43
|
+
descriptionHash: string;
|
|
44
|
+
deliverableHash: string;
|
|
45
|
+
createdAt: number;
|
|
46
|
+
completedAt: number;
|
|
47
|
+
isFunded: boolean;
|
|
48
|
+
priorityLevel: number;
|
|
49
|
+
}
|
|
50
|
+
export declare const TASK_STATUS: Record<number, string>;
|
|
51
|
+
export declare const PRIORITY_LEVEL: Record<number, string>;
|
|
52
|
+
export interface ReceiptInfo {
|
|
53
|
+
receiptId: number;
|
|
54
|
+
issuer: Address;
|
|
55
|
+
counterparty: Address;
|
|
56
|
+
interactionType: number;
|
|
57
|
+
taskId: number;
|
|
58
|
+
dataHash: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
isValid: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare const RECEIPT_TYPE: Record<number, string>;
|
|
63
|
+
export interface ProtocolStats {
|
|
64
|
+
totalAgents: number;
|
|
65
|
+
totalTasks: number;
|
|
66
|
+
completedTasks: number;
|
|
67
|
+
totalVolume: string;
|
|
68
|
+
totalFees: string;
|
|
69
|
+
activeAgents: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ContractConfig {
|
|
72
|
+
AgentRegistry: Address;
|
|
73
|
+
TaskEscrow: Address;
|
|
74
|
+
ReceiptVerifier: Address;
|
|
75
|
+
OpenTaskMarket: Address;
|
|
76
|
+
ParallelTaskBatch: Address;
|
|
77
|
+
AgentCollective: Address;
|
|
78
|
+
AgentInsurance: Address;
|
|
79
|
+
DisputeArbitration: Address;
|
|
80
|
+
}
|
|
81
|
+
export interface ToolResult {
|
|
82
|
+
[key: string]: unknown;
|
|
83
|
+
content: Array<{
|
|
84
|
+
type: "text";
|
|
85
|
+
text: string;
|
|
86
|
+
}>;
|
|
87
|
+
isError?: boolean;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAO,MAAM,MAAM,CAAC;AAM/C,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,cAAc,CAAC;AAEvD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,IAAI,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAMxD,MAAM,WAAW,SAAS;IACxB,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AAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAMD,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAMD,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const TASK_STATUS = {
|
|
2
|
+
0: "Created",
|
|
3
|
+
1: "Funded",
|
|
4
|
+
2: "InProgress",
|
|
5
|
+
3: "Submitted",
|
|
6
|
+
4: "Completed",
|
|
7
|
+
5: "Failed",
|
|
8
|
+
6: "Disputed",
|
|
9
|
+
7: "Cancelled",
|
|
10
|
+
};
|
|
11
|
+
export const PRIORITY_LEVEL = {
|
|
12
|
+
0: "Low (0.5% fee)",
|
|
13
|
+
1: "Medium (1% fee)",
|
|
14
|
+
2: "High (2% fee)",
|
|
15
|
+
3: "Urgent (5% fee)",
|
|
16
|
+
};
|
|
17
|
+
export const RECEIPT_TYPE = {
|
|
18
|
+
0: "TaskCompletion",
|
|
19
|
+
1: "PaymentReceived",
|
|
20
|
+
2: "DisputeResolved",
|
|
21
|
+
3: "ReputationUpdate",
|
|
22
|
+
4: "CapabilityVerified",
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAqEA,MAAM,CAAC,MAAM,WAAW,GAA2B;IACjD,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,WAAW;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAA2B;IACpD,CAAC,EAAE,gBAAgB;IACnB,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,eAAe;IAClB,CAAC,EAAE,iBAAiB;CACrB,CAAC;AAiBF,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,CAAC,EAAE,gBAAgB;IACnB,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,kBAAkB;IACrB,CAAC,EAAE,oBAAoB;CACxB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@varun-ai07/covenant-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "COVENANT Protocol MCP Server — AI agent access to on-chain task marketplace",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"covenant-mcp": "dist/index.js",
|
|
9
|
+
"covenant": "dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"start": "node dist/index.js",
|
|
14
|
+
"start:stdio": "node dist/index.js --stdio",
|
|
15
|
+
"start:http": "node dist/index.js --http",
|
|
16
|
+
"dev": "tsx src/index.ts --stdio",
|
|
17
|
+
"dev:http": "tsx src/index.ts --http",
|
|
18
|
+
"postinstall": "node dist/postinstall.js || echo 'COVENANT MCP Server installed. Run: npx covenant add'"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
22
|
+
"dotenv": "^17.3.1",
|
|
23
|
+
"express": "^5.2.1",
|
|
24
|
+
"express-rate-limit": "^8.5.1",
|
|
25
|
+
"pino": "^10.3.1",
|
|
26
|
+
"viem": "^2.23.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/express": "^5.0.0",
|
|
30
|
+
"@types/node": "^25.6.0",
|
|
31
|
+
"tsx": "^4.19.0",
|
|
32
|
+
"typescript": "^6.0.2"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"covenant",
|
|
36
|
+
"mcp",
|
|
37
|
+
"model-context-protocol",
|
|
38
|
+
"ai-agent",
|
|
39
|
+
"blockchain",
|
|
40
|
+
"base",
|
|
41
|
+
"sepolia",
|
|
42
|
+
"erc-8004",
|
|
43
|
+
"autonomous-agents",
|
|
44
|
+
"smart-contracts",
|
|
45
|
+
"task-escrow",
|
|
46
|
+
"agent-registry"
|
|
47
|
+
],
|
|
48
|
+
"author": "COVENANT Protocol",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "https://github.com/Varun-ai07/COVENANT.git",
|
|
53
|
+
"directory": "mcp"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/Varun-ai07/COVENANT#readme",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/Varun-ai07/COVENANT/issues"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=18.0.0"
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist",
|
|
64
|
+
"README.md",
|
|
65
|
+
"LICENSE"
|
|
66
|
+
],
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"access": "public"
|
|
69
|
+
}
|
|
70
|
+
}
|