Skip to content

Commit 9dcb224

Browse files
Merge pull request #1673 from oasisprotocol/uniyalabhishek/feature/1665-llms-docs-mcp
docs: add llms usage docs
2 parents 2b12b06 + 9971281 commit 9dcb224

5 files changed

Lines changed: 148 additions & 0 deletions

File tree

docs/build/tools/README.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Oasis.
1818
## See also
1919

2020
<DocCardList items={[
21+
findSidebarItem('/build/tools/llms'),
2122
findSidebarItem('/build/tools/abi-playground'),
2223
findSidebarItem('/build/tools/verification'),
2324
findSidebarItem('/build/tools/localnet'),

docs/build/tools/llms.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
description: Use Oasis documentation with AI coding assistants via llms.txt or Context7 MCP
3+
---
4+
5+
# AI-Assisted Development
6+
7+
Oasis documentation is available in LLM-optimized formats so AI coding
8+
assistants can reference accurate, up-to-date Oasis docs instead of relying on
9+
training data. There are two approaches: feed raw `llms.txt` files directly, or
10+
set up the [Context7] MCP server for persistent IDE integration.
11+
12+
## llms.txt
13+
14+
The [llms.txt] standard provides a structured, Markdown-based summary of the
15+
entire Oasis documentation site optimized for LLM consumption.
16+
17+
Two files are available:
18+
19+
| File | Description |
20+
|----------------------------------------|------------------------------------------------------------|
21+
| [`llms.txt`][llms.txt-file] | Curated index with page titles, descriptions, and URLs |
22+
| [`llms-full.txt`][llms-full.txt-file] | Complete documentation content inlined into a single file |
23+
24+
### Usage
25+
26+
Paste the URLs directly into any LLM chat or you can also add the URL as project
27+
context in tools that support it (e.g. Cursor's `@docs` feature, or Claude/Codex
28+
project knowledge, CLAUDE.md/AGENTS.md).
29+
30+
:::tip
31+
32+
Use `llms.txt` when you need a quick overview or are working within tight
33+
context limits. Use `llms-full.txt` when you need the agent to have access to
34+
the complete documentation.
35+
36+
:::
37+
38+
## Context7 MCP
39+
40+
[Context7] is an MCP server that indexes documentation and serves it on demand
41+
to AI coding assistants. It supports [40+ clients][all-clients] including Claude
42+
Code, Cursor, VS Code, and JetBrains.
43+
44+
The Oasis documentation is indexed and available at:
45+
46+
```
47+
Library ID: llmstxt/oasis_io_llms_txt
48+
```
49+
50+
:::info
51+
52+
Use the library ID `llmstxt/oasis_io_llms_txt` in your prompts to ensure you
53+
get the complete Oasis documentation. Other Oasis-related libraries on Context7
54+
may be incomplete.
55+
56+
:::
57+
58+
### Claude Code
59+
60+
Add the Context7 MCP server:
61+
62+
```shell
63+
claude mcp add --transport http context7 https://mcp.context7.com/mcp
64+
```
65+
66+
Verify the server is registered:
67+
68+
```shell
69+
claude mcp list
70+
```
71+
72+
### Cursor
73+
74+
Add the following to your `.cursor/mcp.json`:
75+
76+
```json
77+
{
78+
"mcpServers": {
79+
"context7": {
80+
"url": "https://mcp.context7.com/mcp"
81+
}
82+
}
83+
}
84+
```
85+
86+
### Other Clients
87+
88+
Context7 supports 40+ clients including VS Code, JetBrains, Windsurf, Zed,
89+
and more. See the [full client list][all-clients] for setup instructions
90+
specific to your tool.
91+
92+
### Example Prompts
93+
94+
Once the MCP server is configured, use prompts like:
95+
96+
```
97+
Use context7 MCP to fetch Oasis Sapphire quickstart docs.
98+
Use library ID: llmstxt/oasis_io_llms_txt
99+
```
100+
101+
```
102+
Using context7, show me how to implement encrypted events on Sapphire.
103+
Use library ID: llmstxt/oasis_io_llms_txt
104+
```
105+
106+
### Auto-Invocation
107+
108+
To avoid specifying "use context7" in every prompt, add a rule to your agent's
109+
configuration:
110+
111+
- **Claude Code:** Add to your project's `CLAUDE.md`:
112+
113+
```
114+
Always use Context7 MCP with library ID llmstxt/oasis_io_llms_txt when you
115+
need Oasis documentation.
116+
```
117+
118+
- **Cursor:** Add to Settings → Rules for AI:
119+
120+
```
121+
Always use Context7 MCP with library ID llmstxt/oasis_io_llms_txt when you
122+
need Oasis documentation.
123+
```
124+
125+
[Context7]: https://context7.com
126+
[all-clients]: https://context7.com/docs/resources/all-clients
127+
[llms.txt]: https://llmstxt.org
128+
[llms.txt-file]: https://docs.oasis.io/llms.txt
129+
[llms-full.txt-file]: https://docs.oasis.io/llms-full.txt

docusaurus.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ const config: Config = {
112112
],
113113
themeConfig:
114114
{
115+
announcementBar: {
116+
id: 'ai_assisted_dev',
117+
content: 'Use Oasis docs with AI coding assistants — <a href="/build/tools/llms">llms.txt and Context7 MCP now available</a>!',
118+
backgroundColor: '#18181B',
119+
textColor: '#ffffff',
120+
isCloseable: true,
121+
},
115122
navbar: {
116123
logo: {
117124
alt: 'Oasis Docs',

sidebarBuild.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ export const sidebarBuild: SidebarsConfig = {
198198
'build/tools/cli/rofl',
199199
]
200200
},
201+
'build/tools/llms',
201202
'build/tools/abi-playground',
202203
'build/tools/verification',
203204
'build/tools/band',

src/css/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {
161161
font-size: 14px;
162162
}
163163

164+
/* Announcement bar has a dark bg in both themes; use cyan for visible border */
165+
.theme-announcement-bar {
166+
border-bottom: 2px solid #00ffff !important;
167+
}
168+
169+
/* Buttons don't inherit color from parent; fix close button visibility on dark bg */
170+
.theme-announcement-bar .close {
171+
color: #ffffff;
172+
}
173+
164174
/* Make the search field more Oasis-like */
165175
.navbar__search-input {
166176
border-radius: 0;

0 commit comments

Comments
 (0)