@vapi-network/mcp 0.8.0 → 0.9.2
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 +24 -21
- package/dist/actions/call.d.ts +3 -3
- package/dist/actions/register.d.ts +5 -3
- package/dist/agent/guards.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9370 -2367
- package/dist/index.js.map +3 -3
- package/dist/server.d.ts +11 -4
- package/dist/tools/call.d.ts +12 -2
- package/dist/tools/docs.d.ts +36 -0
- package/dist/tools/tasks.d.ts +383 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# `@vapi-network/mcp`
|
|
2
2
|
|
|
3
3
|
The stdio MCP server behind `vapi mcp`: namespaced tools that let an agent
|
|
4
|
-
search the vAPI catalogue, read a listing's request contract, pay an x402 API
|
|
4
|
+
search and read the public vAPI documentation, search the vAPI catalogue, read a listing's request contract, pay an x402 API
|
|
5
5
|
from a local wallet, read paid origins during an agent run, and read balances, receipts and the status screen
|
|
6
6
|
(`vapi.status`, `vapi.accounts`, `vapi.siblings`). It can derive an account and lower its caps,
|
|
7
7
|
but it never renames, removes, backs up or exports one, and no tool returns a
|
|
8
8
|
recovery phrase, private key or passphrase.
|
|
9
9
|
|
|
10
|
+
`docs.search` and `docs.read` are read-only and work without an account, vault
|
|
11
|
+
or payment. Returned documentation text is reference material, not instructions.
|
|
12
|
+
|
|
10
13
|
One entry point, `@vapi-network/mcp`, exporting `createVapiServer`,
|
|
11
14
|
`startStdioServer`, `loadServerConfig`, `WalletSession` and the individual
|
|
12
15
|
`callService`, `inspectService`, `searchMarketplace` and `getWallet` tools.
|
|
@@ -21,7 +24,7 @@ One entry point, `@vapi-network/mcp`, exporting `createVapiServer`,
|
|
|
21
24
|
| `callService` | function (args: CallServiceArgs): Promise<CallToolResult> | 0.5.0 or earlier |
|
|
22
25
|
| `callRead` | action `call.read`: GET an HTTPS URL from an origin paid in the current agent run; SIWX sign-in is allowed, but it never pays | 0.8.0 |
|
|
23
26
|
| `createAgentRunDeps` | function (input: { profile: AgentProfile; config: VapiConfig; home: string; account: VapiPaymentAccount; wallet: WalletName; spendCaps: SpendCaps; chat: (req: ChatRequest) => Promise<ChatResult>; approve: RunAgentDeps["approve"]; onEvent?: (event: AgentEven... | 0.5.0 or earlier |
|
|
24
|
-
| `createVapiServer` | function (options
|
|
27
|
+
| `createVapiServer` | function (options?: VapiServerOptions): unknown; without account/config it registers the wallet-free docs tools only | 0.5.0 or earlier |
|
|
25
28
|
| `decidePayment` | function (input: { ref: string; priceUsd: number \| null; verification: string; seenRefs: ReadonlySet<string>; verifiedOnly: boolean; approveAboveUsd: number; maxPerCallUsd: number; }): PayDecision | 0.5.0 or earlier |
|
|
26
29
|
| `getWallet` | function (account: Address \| WalletAddresses \| VapiPaymentAccount, config: VapiConfig, options: { fetchImpl?: typeof fetch; lookup?: LookupFn } = {}): Promise<{ address: Address; balances: WalletBalance[] }> | 0.5.0 or earlier |
|
|
27
30
|
| `inspectService` | function (input: InspectToolInput, config: VapiConfig, fetchImpl?: typeof fetch): Promise<InspectToolResult> | 0.5.0 or earlier |
|
|
@@ -39,25 +42,25 @@ One entry point, `@vapi-network/mcp`, exporting `createVapiServer`,
|
|
|
39
42
|
|
|
40
43
|
### Types
|
|
41
44
|
|
|
42
|
-
| Name | What it is
|
|
43
|
-
| ------------------------ |
|
|
44
|
-
| `AgentEvent` | type AgentEvent = \| { type: "step"; n: number } \| { type: "tool"; name: string; summary: string } \| { type: "paid"; ref: string; amountUsd: number; network: string } \| { type: "declined"; ref: string; reason: string } \| { type: "stopped"; reason: "finished"...
|
|
45
|
-
| `CallToolInput` | type CallToolInput = { id?: string; url?: string; method?: string; endpoint?: string; body?: unknown; maxPriceUsd?: number \| string; network?: string; expectedPayTo?: string; contentType?: string; }
|
|
46
|
-
| `CallToolResult` | type CallToolResult = { status: number; body: unknown; verification?: ListingVerification; outcome?: "signed_in"; payment: null \| { network: string; amountAtomic: string; amountUsd: string; asset: string; payTo: string; settlement: unknown \| null; proof: st...
|
|
47
|
-
| `CallReadInput` | type CallReadInput = { url: string }
|
|
48
|
-
| `CallReadOutput` | type CallReadOutput = { status: number; contentType: string \| null; body: unknown }
|
|
49
|
-
| `InspectToolInput` | type InspectToolInput = { id: string; endpoint?: string; }
|
|
50
|
-
| `InspectToolResult` | type InspectToolResult = Omit< Pick< DiscoveryEndpoint, \| "name" \| "method" \| "url" \| "price" \| "description" \| "operationId" \| "requestContentType" \| "requestSchema" \| "responseContentType" >, "method" > & { method: string \| null; network?: string; group?:...
|
|
51
|
-
| `MarketplaceSearchInput` | type MarketplaceSearchInput = { query?: string; kinds?: MarketplaceKind[]; network?: string; limit?: number; cursor?: string; includeUnverified?: boolean; }
|
|
52
|
-
| `PayDecision` | type PayDecision = { action: "pay" } \| { action: "ask"; reason: string } \| { action: "refuse"; reason: string }
|
|
53
|
-
| `RunAgentDeps` | type RunAgentDeps = { profile: AgentProfile; config: VapiConfig; home: string; chat: (req: ChatRequest) => Promise<ChatResult>; search: (q: { query: string; network?: string; includeUnverified: boolean }) => Promise< Array<{ ref: string; name: string; price...
|
|
54
|
-
| `RunAgentResult` | type RunAgentResult = { answer: string \| null; stoppedBecause: AgentEvent & { type: "stopped" }; paidUsd: number; steps: number; }
|
|
55
|
-
| `SessionWallet` | type SessionWallet = { name: WalletName; path?: string; }
|
|
56
|
-
| `SessionWalletInfo` | type SessionWalletInfo = { name: WalletName; address?: string; solanaAddress?: string; label?: string; isDefault: boolean; isActive: boolean; spendCaps?: SpendCaps; }
|
|
57
|
-
| `VapiServerOptions` | type VapiServerOptions = { account
|
|
58
|
-
| `WalletAddresses` | type WalletAddresses = { address: Address; solana?: { address: string } \| undefined; }
|
|
59
|
-
| `WalletBalance` | type WalletBalance = { network: string; name: string; usdcAtomic: string \| null; usdc: string \| null; error?: string; }
|
|
60
|
-
| `WalletSessionOptions` | type WalletSessionOptions = { account: VapiPaymentAccount; store?: WalletStore \| undefined; wallet?: string \| undefined; env?: NodeJS.ProcessEnv \| undefined; passphrase?: (() => string \| Promise<string>) \| undefined; secretStore?: SecretStore \| undefined; n...
|
|
45
|
+
| Name | What it is | Since |
|
|
46
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
|
|
47
|
+
| `AgentEvent` | type AgentEvent = \| { type: "step"; n: number } \| { type: "tool"; name: string; summary: string } \| { type: "paid"; ref: string; amountUsd: number; network: string } \| { type: "declined"; ref: string; reason: string } \| { type: "stopped"; reason: "finished"... | 0.5.0 or earlier |
|
|
48
|
+
| `CallToolInput` | type CallToolInput = { id?: string; url?: string; method?: string; endpoint?: string; body?: unknown; maxPriceUsd?: number \| string; network?: string; expectedPayTo?: string; contentType?: string; } | 0.5.0 or earlier |
|
|
49
|
+
| `CallToolResult` | type CallToolResult = { status: number; body: unknown; verification?: ListingVerification; outcome?: "signed_in"; payment: null \| { network: string; amountAtomic: string; amountUsd: string; asset: string; payTo: string; settlement: unknown \| null; proof: st... | 0.5.0 or earlier |
|
|
50
|
+
| `CallReadInput` | type CallReadInput = { url: string } | 0.8.0 |
|
|
51
|
+
| `CallReadOutput` | type CallReadOutput = { status: number; contentType: string \| null; body: unknown } | 0.8.0 |
|
|
52
|
+
| `InspectToolInput` | type InspectToolInput = { id: string; endpoint?: string; } | 0.5.0 or earlier |
|
|
53
|
+
| `InspectToolResult` | type InspectToolResult = Omit< Pick< DiscoveryEndpoint, \| "name" \| "method" \| "url" \| "price" \| "description" \| "operationId" \| "requestContentType" \| "requestSchema" \| "responseContentType" >, "method" > & { method: string \| null; network?: string; group?:... | 0.5.0 or earlier |
|
|
54
|
+
| `MarketplaceSearchInput` | type MarketplaceSearchInput = { query?: string; kinds?: MarketplaceKind[]; network?: string; limit?: number; cursor?: string; includeUnverified?: boolean; } | 0.5.0 or earlier |
|
|
55
|
+
| `PayDecision` | type PayDecision = { action: "pay" } \| { action: "ask"; reason: string } \| { action: "refuse"; reason: string } | 0.5.0 or earlier |
|
|
56
|
+
| `RunAgentDeps` | type RunAgentDeps = { profile: AgentProfile; config: VapiConfig; home: string; chat: (req: ChatRequest) => Promise<ChatResult>; search: (q: { query: string; network?: string; includeUnverified: boolean }) => Promise< Array<{ ref: string; name: string; price... | 0.5.0 or earlier |
|
|
57
|
+
| `RunAgentResult` | type RunAgentResult = { answer: string \| null; stoppedBecause: AgentEvent & { type: "stopped" }; paidUsd: number; steps: number; } | 0.5.0 or earlier |
|
|
58
|
+
| `SessionWallet` | type SessionWallet = { name: WalletName; path?: string; } | 0.5.0 or earlier |
|
|
59
|
+
| `SessionWalletInfo` | type SessionWalletInfo = { name: WalletName; address?: string; solanaAddress?: string; label?: string; isDefault: boolean; isActive: boolean; spendCaps?: SpendCaps; } | 0.5.0 or earlier |
|
|
60
|
+
| `VapiServerOptions` | type VapiServerOptions = { account?: VapiPaymentAccount; config?: VapiConfig; fetchImpl?: typeof fetch; ledgerPath?: string; receiptsPath?: string; searchesPath?: string; reportsDirectory?: string; store?: WalletStore \| undefined; wallet?: string \| undefined; status?: StatusCoreOverrides;... | 0.5.0 or earlier |
|
|
61
|
+
| `WalletAddresses` | type WalletAddresses = { address: Address; solana?: { address: string } \| undefined; } | 0.5.0 or earlier |
|
|
62
|
+
| `WalletBalance` | type WalletBalance = { network: string; name: string; usdcAtomic: string \| null; usdc: string \| null; error?: string; } | 0.5.0 or earlier |
|
|
63
|
+
| `WalletSessionOptions` | type WalletSessionOptions = { account: VapiPaymentAccount; store?: WalletStore \| undefined; wallet?: string \| undefined; env?: NodeJS.ProcessEnv \| undefined; passphrase?: (() => string \| Promise<string>) \| undefined; secretStore?: SecretStore \| undefined; n... | 0.5.0 or earlier |
|
|
61
64
|
|
|
62
65
|
See the [root README](https://github.com/vAPI-Network/vapi-network/blob/main/docs/mcp.md) for the editor configuration, the full tool table and the deprecated aliases.
|
|
63
66
|
|
package/dist/actions/call.d.ts
CHANGED
|
@@ -126,6 +126,9 @@ export declare const callSearch: import("./define.js").Action<{
|
|
|
126
126
|
}, {
|
|
127
127
|
[x: string]: unknown;
|
|
128
128
|
protocol: "vapi.marketplace.discovery/1";
|
|
129
|
+
nextCursor: string | null;
|
|
130
|
+
unavailableKinds: ("api" | "service_offer" | "open_request")[];
|
|
131
|
+
rankingVersion: "marketplace-ranking-v1";
|
|
129
132
|
items: ({
|
|
130
133
|
[x: string]: unknown;
|
|
131
134
|
kind: "api";
|
|
@@ -364,9 +367,6 @@ export declare const callSearch: import("./define.js").Action<{
|
|
|
364
367
|
} | undefined;
|
|
365
368
|
} | undefined;
|
|
366
369
|
})[];
|
|
367
|
-
nextCursor: string | null;
|
|
368
|
-
unavailableKinds: ("api" | "service_offer" | "open_request")[];
|
|
369
|
-
rankingVersion: "marketplace-ranking-v1";
|
|
370
370
|
}>;
|
|
371
371
|
export declare const callInspect: import("./define.js").Action<{
|
|
372
372
|
id: string;
|
|
@@ -17,6 +17,9 @@ export declare const actions: readonly [Action<{
|
|
|
17
17
|
}, {
|
|
18
18
|
[x: string]: unknown;
|
|
19
19
|
protocol: "vapi.marketplace.discovery/1";
|
|
20
|
+
nextCursor: string | null;
|
|
21
|
+
unavailableKinds: ("api" | "service_offer" | "open_request")[];
|
|
22
|
+
rankingVersion: "marketplace-ranking-v1";
|
|
20
23
|
items: ({
|
|
21
24
|
[x: string]: unknown;
|
|
22
25
|
kind: "api";
|
|
@@ -255,9 +258,6 @@ export declare const actions: readonly [Action<{
|
|
|
255
258
|
} | undefined;
|
|
256
259
|
} | undefined;
|
|
257
260
|
})[];
|
|
258
|
-
nextCursor: string | null;
|
|
259
|
-
unavailableKinds: ("api" | "service_offer" | "open_request")[];
|
|
260
|
-
rankingVersion: "marketplace-ranking-v1";
|
|
261
261
|
}>, Action<{
|
|
262
262
|
id: string;
|
|
263
263
|
endpoint?: string | undefined;
|
|
@@ -903,6 +903,8 @@ export declare const registeredAgentProfileSchema: import("zod").ZodObject<{
|
|
|
903
903
|
instructions: import("zod").ZodString;
|
|
904
904
|
verifiedOnly: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
905
905
|
approveAboveUsd: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
906
|
+
maxPerTaskUsd: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
907
|
+
autoReleaseBelowUsd: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
906
908
|
maxSteps: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
907
909
|
paused: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
908
910
|
grants: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{
|
package/dist/agent/guards.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { decideFunding, decideRelease, type FundingDecision, type ReleaseDecision, } from "@vapi-network/core";
|
|
1
2
|
export declare const UNTRUSTED_NOTICE: string;
|
|
2
3
|
/** Wraps tool output so the model can tell data from instructions. */
|
|
3
4
|
export declare function wrapUntrusted(tool: string, value: unknown): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { callService, createVapiServer, loadServerConfig, startStdioServer, type CallToolInput, type CallToolResult, type VapiServerOptions, } from "./server.js";
|
|
2
2
|
export { inspectService, type InspectToolInput, type InspectToolResult } from "./tools/inspect.js";
|
|
3
|
+
export { VapiCallError } from "./tools/call.js";
|
|
3
4
|
export { resolveServiceEndpoint, resolveServiceListing, searchMarketplace, type MarketplaceSearchInput, } from "./tools/search.js";
|
|
4
5
|
export { getWallet, type WalletAddresses, type WalletBalance } from "./tools/wallet.js";
|
|
5
6
|
export { WalletSession, type SessionWallet, type SessionWalletInfo, type WalletSessionOptions, } from "./wallet-session.js";
|
|
6
7
|
export { buildSIWxProof, parseSIWxResponse } from "./siwx.js";
|
|
7
|
-
export { UNTRUSTED_NOTICE, decidePayment, wrapUntrusted, type PayDecision, } from "./agent/guards.js";
|
|
8
|
+
export { UNTRUSTED_NOTICE, decideFunding, decidePayment, decideRelease, wrapUntrusted, type FundingDecision, type PayDecision, type ReleaseDecision, } from "./agent/guards.js";
|
|
8
9
|
export { createAgentRunDeps } from "./agent/deps.js";
|
|
9
10
|
export { assessSwarmMembers, memberBudgetAtomic, runSwarm, selectLead, SwarmRunError, type MemberAssessment, type MemberRunOptions, type RunSwarmDeps, type RunSwarmOptions, type SwarmMemberTarget, type SwarmRunInput, type SwarmRunMemberResult, type SwarmRunMode, type SwarmRunResult, } from "./agent/swarm-run.js";
|
|
10
11
|
export { listRunRecords, readRunRecord, redactRunText, redactRunValue, refreshRunRecord, runLogPath, runRecordPath, runRecordSchema, runResultPath, runsDirectory, STARTING_RECONCILIATION_TIMEOUT_MS, RuntimeError, startDetachedRun, startDetachedSwarmRun, stopRun, summarizeRunRecord, writeRunRecord, type DetachedRunSummary, type DetachedSwarmRunResult, type RunRecord, type RunState, type Runtime, type RuntimeHandle, type RuntimeKind, type RuntimeMember, type RuntimeRun, type RuntimeStatus, } from "./agent/runtime.js";
|