QuickContract MCP

QuickContract MCP

Enables AI agents to sign contracts, release escrow, query portfolios, and verify on-chain proofs via QuickContract.

Category
访问服务器

README

@quickcontract/mcp

MCP server for QuickContract — sign contracts, release escrow, query portfolios, and verify on-chain proofs from any MCP-aware AI agent.

Drops into Claude Desktop, Cursor, Anthropic Agents SDK, and OpenAI Agents in under a minute.

Install

npx @quickcontract/mcp --help
# or install globally:
npm i -g @quickcontract/mcp
quickcontract-mcp

Requires Node 18+.

Configure

Generate an API key at https://quickcontract.io/settings/api-keys. Raw org keys start with qc_live_; agent-bound keys (with a server- enforced mandate) start with qc_agnt_.

Set the env var:

export QC_API_KEY="qc_live_..."   # or qc_agnt_...

That's it. The server defaults to https://api.quickcontract.io. Override with QC_BASE_URL for staging or local dev.

Wire it into your AI client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "quickcontract": {
      "command": "npx",
      "args": ["-y", "@quickcontract/mcp"],
      "env": {
        "QC_API_KEY": "qc_live_..."
      }
    }
  }
}

Restart Claude Desktop. Type @quickcontract in any conversation to invoke tools.

Cursor

In .cursor/mcp.json at the workspace root:

{
  "mcpServers": {
    "quickcontract": {
      "command": "npx",
      "args": ["-y", "@quickcontract/mcp"],
      "env": { "QC_API_KEY": "qc_live_..." }
    }
  }
}

Anthropic Agents SDK (TypeScript)

import { Agent } from '@anthropic-ai/sdk/agents';
import { StdioMcpTransport } from '@anthropic-ai/sdk/mcp';

const agent = new Agent({
  mcpServers: {
    quickcontract: new StdioMcpTransport({
      command: 'npx',
      args: ['-y', '@quickcontract/mcp'],
      env: { QC_API_KEY: process.env.QC_API_KEY! },
    }),
  },
});

OpenAI Agents SDK (Python)

from openai.agents import Agent, MCPServerStdio

qc = MCPServerStdio(
    name="quickcontract",
    command="npx",
    args=["-y", "@quickcontract/mcp"],
    env={"QC_API_KEY": os.environ["QC_API_KEY"]},
)
agent = Agent(name="contract-agent", mcp_servers=[qc])

What's exposed

Tools — READ (works with any API key)

  • list_contracts — paginated list with filters.
  • get_contract — full structured contract.
  • get_contract_status — lightweight status / signed-party flags.
  • verify_hash — public verify by SHA-256 content hash; includes signedBy[] with agent DIDs for external Ed25519 verification.
  • list_templates / get_template — 62 base templates + your custom.
  • get_organization — your plan tier + rate limit.
  • get_audit_log — tamper-evident hash-chained events.
  • get_obligations — extracted payment terms + dates via Claude.

Tools — WRITE (mandate-gated for agent keys)

  • create_contract — instantiate a draft from a template. Agent callers: template must be in mandate.limits.allowedTemplateIds.
  • update_contract — edit a draft.
  • send_contract — move draft → sent_for_review. Agent callers: recipient domain must be in allowedCounterpartyDomains.
  • add_recipient — register a human (kind=human) or agent (kind=agent) recipient.
  • sign_as_agent — produce an Ed25519 signature on a contract. Requires a qc_agnt_* key. Server enforces capability + the full 9-code mandate envelope.
  • release_milestone — release escrow. Non-custodial in both rails.
  • add_machine_term — attach an IF/THEN to a contract (when payload.delivered + schemaMatch then escrow.release).
  • report_event — fire a signed event into a contract's machine terms. Optional Ed25519 signature provides non-repudiation.

Resources

  • contract://{id-or-permalink} — full contract.
  • template://{id} — template body.
  • audit://{contractId} — hash-chained log.
  • agent://{didIdentifier} — public DID Document JSON-LD.

Prompts

  • negotiate_clause, draft_counter_offer, risk_assessment, summarize_contract, extract_obligations — pre-canned scripts that chain the AI tools.

Mandate reject codes

When an agent attempts an action that violates its mandate, the backend returns a typed envelope. The MCP tool surfaces it as a single error string with reason: line:

Reason Trigger
mandate_revoked Mandator revoked the mandate.
mandate_expired Past expiresAt.
capability_not_granted Action's capability missing from capabilities[].
mandate_exceeded_value_cap Contract value > maxContractValueCents.
mandate_exceeded_day_cap Daily signed-count > perDayCap.
mandate_exceeded_month_cap Monthly signed-count > perMonthCap.
template_not_allowed Template not in allowedTemplateIds[].
counterparty_not_allowed Recipient domain not in allowedCounterpartyDomains[].
jurisdiction_not_allowed Jurisdiction not in allowedJurisdictions[].

A calling agent can switch on reason to plan an alternative path (e.g. propose a smaller contract value, or hand off to a human via request_approval).

Environment variables

Var Required Default Notes
QC_API_KEY yes qc_live_* for org or qc_agnt_* for agent.
QC_BASE_URL no https://api.quickcontract.io Override for staging.
QC_PUBLIC_HOST no quickcontract.io Host used to resolve agent:// DID URIs.
QC_DEBUG no Set to any truthy value to stream request log to stderr.

License

MIT — see LICENSE.

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选