Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions CORPUS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Corpus — US law search and US company formation

This extension connects you to Corpus (https://corpuslaw.us), a hosted MCP server at
`https://corpuslaw.us/api/mcp`. It needs no API key to start.

- **US law questions** (legality, permits, zoning, licensing, compliance, filing rules):
call `law.search` before answering from memory, and cite the returned `citation`
verbatim. `law.get_node` returns the full official text; `law.list_coverage` says
which jurisdictions are covered. If a jurisdiction is not covered, say so.
- **Forming a US LLC or nonprofit**: follow the `corpus-business-formation` skill. You
run the intake with `formation.requirements` and `formation.lookup_naics`, then
`formation.handoff` returns one prefilled link the founder finishes themselves.
Every filing is reviewed by a person before it goes to the state.
- Never collect a Social Security Number. Corpus is not a law firm; what it returns is
legal information, not legal advice.

## Founders outside the United States

Corpus forms **US** entities only. It cannot form a company in mainland China, Hong Kong
or anywhere else outside the US.

- A founder does not need US citizenship, residency or a visa to own a US LLC. The
first year of registered-agent service is included.
- Corpus currently needs a **US street address** for the principal office; many founders
abroad use a US mail-forwarding address. The registered agent's address cannot double
as the business address.
- Collect every name for the filing in Latin letters (romanized), as it should appear on
the state record.
- The website and checkout are in English, payment is by bank card, and sign-in works
with an emailed code (no Google account needed).
- Corpus does not obtain EINs, open bank accounts or prepare Form 5472 or other tax
filings today. Say so plainly rather than implying otherwise.
- If the user writes in Chinese, answer in Chinese. A Chinese-language guide:
https://corpuslaw.us/guides/form-a-us-llc-from-china/zh

## 中文说明

Corpus 提供美国联邦、州及市级法律的检索(附官方原文逐字引用),并可为身在美国境外的创业者办理美国
LLC 或非营利公司注册(仅限美国实体,不办理中国境内公司),包含第一年的注册代理服务,每份文件提交州政府前都有专人审核。
主要办公地址目前需要填写美国街道地址;注册信息中的姓名请使用拼音或英文。网站与付款页面为英文,支付方式为银行卡。
暂不能做:代办 EIN、开设银行账户、准备 Form 5472 或其他报税文件。本服务提供法律信息,不构成法律或税务建议。
48 changes: 37 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
**Give your AI agent real US law — and let it form a company.**

Open-source connectors for the [Corpus legal platform](https://corpuslaw.us):
search 571,582 provisions of federal, state, and municipal law with verbatim
search 700,000+ provisions of federal, state, and municipal law with verbatim
citations, and run a complete LLC or nonprofit formation intake end to end.
Every filing still stops at a human approval gate.

[![Winner — Qwen Cloud Hackathon, Track 4](https://img.shields.io/badge/Winner-Qwen%20Cloud%20Hackathon%20·%20Track%204-6f42c1)](https://qwencloud-hackathon.devpost.com/)
[![Winner — Qwen Cloud Hackathon, Track 4](https://img.shields.io/badge/Winner-Qwen%20Cloud%20Hackathon%20·%20Track%204-6f42c1)](https://devpost.com/software/corpus-mcp)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
[![smithery badge](https://smithery.ai/badge/renaissanceaisolutions/corpus-legal)](https://smithery.ai/servers/renaissanceaisolutions/corpus-legal)

Expand Down Expand Up @@ -105,6 +105,34 @@ hermes plugins doctor corpus --ci
Portable packages install **disabled** in Hermes; enable is a separate consent
step.

**Qwen Code**, **Gemini CLI** and **Kimi Code** install the repository itself
(`qwen-extension.json`, `gemini-extension.json` and `kimi.plugin.json` at the
root load both skills, the hosted MCP URL and the [`CORPUS.md`](CORPUS.md)
context):

```bash
qwen extensions install https://github.com/teakesdev/corpus-agent-kit:corpus
gemini extensions install https://github.com/teakesdev/corpus-agent-kit
```

(The `:corpus` suffix picks the plugin without a prompt; Qwen Code also reads
this repo as a Claude Code marketplace.) In Kimi Code:
`/plugins install https://github.com/teakesdev/corpus-agent-kit`, then `/reload`.

### 中文:给身在中国的创业者和开发者

Corpus 提供美国联邦、州及市级法律检索(来自官方来源,每条结果附逐字引用),并可为身在美国境外的创业者办理美国
LLC 或非营利公司注册。**仅办理美国实体**,不办理中国境内公司。本项目(Corpus Formation Autopilot / Corpus Agent Kit)获得
Global AI Hackathon Series with Qwen Cloud(通义千问)Track 4(Autopilot Agent)赛道奖项,
[在 Devpost 查看](https://devpost.com/software/corpus-mcp)。

- **接入方式:** 任何支持 MCP 的客户端,填入 `https://corpuslaw.us/api/mcp`(Streamable HTTP,无需 API 密钥即可开始);
Qwen Code / Gemini CLI / Kimi Code 用上面的一条命令安装。
- **能做:** 法律检索与引用;向州政府提交 LLC 注册(全美 50 个州及华盛顿特区),含第一年注册代理服务,每份文件提交前都有专人审核。
- **暂不能做:** 代办 EIN、接受美国境外的主要办公地址(目前需要美国街道地址)、开设银行账户、准备 Form 5472 或其他报税文件、提供法律或税务建议。
网站与付款页面为英文,支付方式为银行卡。
- **中文指南:** [在中国可以注册美国 LLC 吗?](https://corpuslaw.us/guides/form-a-us-llc-from-china/zh)

### 4. Run it yourself

Clone and build — see [Quickstart](#quickstart) below.
Expand All @@ -115,7 +143,7 @@ Clone and build — see [Quickstart](#quickstart) below.

| Tool | What it does |
|---|---|
| `law.search` | Hybrid semantic + keyword search over 571,582 provisions |
| `law.search` | Hybrid semantic + keyword search over 700,000+ provisions |
| `law.get_node` | Full official text of one provision |
| `law.list_coverage` | Which jurisdictions are indexed, and how deeply |
| `formation.requirements` | A state's exact field checklist, quirks, live pricing |
Expand All @@ -130,13 +158,11 @@ Formation tools are **never metered** — they stay free with or without a key.

## Coverage

18 jurisdictions, 16 fully searchable — federal (154,667 provisions),
California (181,312), Texas (119,923), Washington (51,487), Florida (24,848),
Mississippi (25,288), Wyoming, Delaware, Nevada, plus San Francisco, Seattle,
San Jose, Los Angeles, San Diego, Jackson and Philadelphia at the municipal
level (8 with published GIS zoning layers). Call `law.list_coverage` for the
live list — it reports honestly when a jurisdiction is not covered rather than
guessing.
700,000+ provisions across 20 jurisdictions (18 fully searchable) — federal,
state and municipal law, ingested from official sources. Coverage grows, so
this README does not pin per-jurisdiction counts: call `law.list_coverage` for
the live list with provision counts and GIS status. It reports honestly when a
jurisdiction is not covered rather than guessing.

## What's in this repo

Expand Down Expand Up @@ -169,7 +195,7 @@ See [docs/architecture.md](docs/architecture.md) for the Mermaid source.
| Two-lane Qwen routing | ✅ `autopilot/src/` | — |
| MCP stdio bridge (`corpus-mcp`) | ✅ `mcp-server/` | — |
| Embeddable widget | ✅ `widget/` | — |
| Law database (571,582 provisions, Aurora) | — | ✅ |
| Law database (700,000+ provisions, Aurora) | — | ✅ |
| Hybrid search engine + `/api/mcp` | — | ✅ |
| `/formation` checkout + GATE 2 | — | ✅ |
| Stripe payment + state filing execution | — | ✅ |
Expand Down
11 changes: 11 additions & 0 deletions gemini-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "corpus",
"version": "0.1.0",
"description": "Search and cite US law from official sources, and form a US LLC or nonprofit through the hosted Corpus MCP server. 美国法律检索(官方原文逐字引用)+ 美国 LLC/非营利公司注册。Winner, Track 4 (Autopilot Agent), Global AI Hackathon Series with Qwen Cloud.",
"contextFileName": "CORPUS.md",
"mcpServers": {
"corpus": {
"httpUrl": "https://corpuslaw.us/api/mcp"
}
}
}
26 changes: 26 additions & 0 deletions kimi.plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "corpus",
"version": "0.1.0",
"description": "Search and cite US law from official sources, and form a US LLC or nonprofit through the hosted Corpus MCP server. 美国法律检索(官方原文逐字引用)+ 美国 LLC/非营利公司注册。Winner, Track 4 (Autopilot Agent), Global AI Hackathon Series with Qwen Cloud.",
"keywords": ["legal", "law", "formation", "llc", "nonprofit", "compliance", "mcp", "美国公司注册", "美国法律"],
"author": {
"name": "Corpus",
"url": "https://corpuslaw.us"
},
"homepage": "https://corpuslaw.us/agents",
"license": "Apache-2.0",
"interface": {
"displayName": "Corpus",
"shortDescription": "US law search with verbatim citations, and US LLC formation. 美国法律检索与美国公司注册。",
"longDescription": "Corpus searches US federal, state and municipal law ingested from official sources and returns a verbatim citation for every answer. It also runs the intake to form a US LLC or nonprofit corporation for founders anywhere, including outside the US; every filing is reviewed by a person before it goes to the state. Corpus forms US entities only. Winner, Track 4 (Autopilot Agent), Global AI Hackathon Series with Qwen Cloud: https://devpost.com/software/corpus-mcp\n\nCorpus 检索美国联邦、州及市级法律(来自官方来源),每条回答附逐字引用;并可为全球创始人(包括美国境外)办理美国 LLC 或非营利公司注册,每份申请提交到州政府前均经人工审核。仅办理美国实体。Qwen Cloud 全球 AI 黑客松 Track 4(Autopilot Agent)获奖项目。",
"developerName": "Corpus",
"websiteURL": "https://corpuslaw.us/agents"
},
"skills": "./skills/",
"systemPromptPath": "./CORPUS.md",
"mcpServers": {
"corpus": {
"url": "https://corpuslaw.us/api/mcp"
}
}
}
2 changes: 1 addition & 1 deletion mcp-server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @corpuslaw/mcp-server

MCP server giving any AI agent **571,582 provisions of US federal, state and
MCP server giving any AI agent **700,000+ provisions of US federal, state and
municipal law** with verbatim citations — plus a complete LLC / nonprofit
formation intake.

Expand Down
2 changes: 1 addition & 1 deletion mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@corpuslaw/mcp-server",
"version": "0.1.0",
"description": "MCP server giving any AI agent 571,582 provisions of US federal, state and municipal law with verbatim citations \u2014 plus LLC/nonprofit formation intake. Thin client of corpuslaw.us.",
"description": "MCP server giving any AI agent 700,000+ provisions of US federal, state and municipal law with verbatim citations \u2014 plus LLC/nonprofit formation intake. Thin client of corpuslaw.us.",
"keywords": [
"mcp",
"model-context-protocol",
Expand Down
1 change: 1 addition & 0 deletions plugins/corpus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ the canonical skill trees at the repo root (`SKILL.md` plus any
| Claude Code (`.claude-plugin/`) | Yes | Yes |
| Grok Bot / Cursor | Yes (`.cursor-plugin/`) | Yes — marketplace package or add `https://corpuslaw.us/api/mcp` (see [docs/GROK_BOT.md](../../docs/GROK_BOT.md)) |
| OpenAI Codex | Yes (`.codex-plugin/` + `.mcp.json`) | Yes — hosted MCP plus both skills |
| Qwen Code / Gemini CLI / Kimi Code | Yes — the repo root (`qwen-extension.json`, `gemini-extension.json`, `kimi.plugin.json`) | Yes — root `skills/` + `CORPUS.md` context |
| ChatGPT | No ChatGPT catalog listing claimed | Hosted MCP, where custom connectors are supported |
| Any MCP-capable harness | No | Yes — same Streamable HTTP URL |

Expand Down
11 changes: 11 additions & 0 deletions qwen-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "corpus",
"version": "0.1.0",
"description": "Search and cite US law from official sources, and form a US LLC or nonprofit through the hosted Corpus MCP server. 美国法律检索(官方原文逐字引用)+ 美国 LLC/非营利公司注册。Winner, Track 4 (Autopilot Agent), Global AI Hackathon Series with Qwen Cloud.",
"contextFileName": "CORPUS.md",
"mcpServers": {
"corpus": {
"httpUrl": "https://corpuslaw.us/api/mcp"
}
}
}
19 changes: 19 additions & 0 deletions scripts/check-plugin-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,23 @@ assert.deepEqual(openaiMarket.plugins, [{
category: 'Productivity',
}]);
assert.ok(existsSync(root + 'skills/corpus-business-formation/references/intake.md'));

// Repo-root extension manifests: `gemini extensions install`, `qwen extensions install`
// and Kimi Code `/plugins install` all take the repository URL, so these live at the
// root and load the canonical skills/ tree. Gemini and Qwen spell Streamable HTTP as
// `httpUrl` (their `url` means SSE, which Corpus does not serve); Kimi spells it `url`.
for (const [file, key] of [['gemini-extension.json', 'httpUrl'], ['qwen-extension.json', 'httpUrl'], ['kimi.plugin.json', 'url']]) {
const ext = read(file);
assert.equal(ext.name, portable.name, file + ' name');
assert.match(ext.name, /^[a-z0-9][a-z0-9_-]{0,63}$/, file + ' name');
assert.equal(ext.version, portable.version, file + ' version');
assert.deepEqual(ext.mcpServers, { corpus: { [key]: url } }, file + ' must be headerless Streamable HTTP');
assert.ok(ext.description.includes('Qwen Cloud'), file + ' must name the hackathon win');
const context = ext.contextFileName ?? ext.systemPromptPath?.replace(/^\.\//, '');
assert.ok(context && existsSync(context), file + ' context file');
}
assert.equal(read('kimi.plugin.json').skills, './skills/');
for (const name of ['corpus-business-formation', 'corpus-legal-research']) {
assert.ok(existsSync('skills/' + name + '/SKILL.md'));
}
console.log('Plugin manifests, transports, marketplace entries, skills and assets agree.');
Loading