@vapi-network/mcp 0.8.0 → 0.9.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 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: VapiServerOptions): unknown | 0.5.0 or earlier |
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 | Since |
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"... | 0.5.0 or earlier |
45
- | `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 |
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... | 0.5.0 or earlier |
47
- | `CallReadInput` | type CallReadInput = { url: string } | 0.8.0 |
48
- | `CallReadOutput` | type CallReadOutput = { status: number; contentType: string \| null; body: unknown } | 0.8.0 |
49
- | `InspectToolInput` | type InspectToolInput = { id: string; endpoint?: string; } | 0.5.0 or earlier |
50
- | `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 |
51
- | `MarketplaceSearchInput` | type MarketplaceSearchInput = { query?: string; kinds?: MarketplaceKind[]; network?: string; limit?: number; cursor?: string; includeUnverified?: boolean; } | 0.5.0 or earlier |
52
- | `PayDecision` | type PayDecision = { action: "pay" } \| { action: "ask"; reason: string } \| { action: "refuse"; reason: string } | 0.5.0 or earlier |
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... | 0.5.0 or earlier |
54
- | `RunAgentResult` | type RunAgentResult = { answer: string \| null; stoppedBecause: AgentEvent & { type: "stopped" }; paidUsd: number; steps: number; } | 0.5.0 or earlier |
55
- | `SessionWallet` | type SessionWallet = { name: WalletName; path?: string; } | 0.5.0 or earlier |
56
- | `SessionWalletInfo` | type SessionWalletInfo = { name: WalletName; address?: string; solanaAddress?: string; label?: string; isDefault: boolean; isActive: boolean; spendCaps?: SpendCaps; } | 0.5.0 or earlier |
57
- | `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 |
58
- | `WalletAddresses` | type WalletAddresses = { address: Address; solana?: { address: string } \| undefined; } | 0.5.0 or earlier |
59
- | `WalletBalance` | type WalletBalance = { network: string; name: string; usdcAtomic: string \| null; usdc: string \| null; error?: string; } | 0.5.0 or earlier |
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... | 0.5.0 or earlier |
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
 
@@ -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<{
@@ -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
@@ -4,7 +4,7 @@ export { resolveServiceEndpoint, resolveServiceListing, searchMarketplace, type
4
4
  export { getWallet, type WalletAddresses, type WalletBalance } from "./tools/wallet.js";
5
5
  export { WalletSession, type SessionWallet, type SessionWalletInfo, type WalletSessionOptions, } from "./wallet-session.js";
6
6
  export { buildSIWxProof, parseSIWxResponse } from "./siwx.js";
7
- export { UNTRUSTED_NOTICE, decidePayment, wrapUntrusted, type PayDecision, } from "./agent/guards.js";
7
+ export { UNTRUSTED_NOTICE, decideFunding, decidePayment, decideRelease, wrapUntrusted, type FundingDecision, type PayDecision, type ReleaseDecision, } from "./agent/guards.js";
8
8
  export { createAgentRunDeps } from "./agent/deps.js";
9
9
  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
10
  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";