Skip to content

Commit 55aaa93

Browse files
authored
docs: add MCP server page (#137)
## Summary - Add `docs/mcp/index.html` — documents the Pathfinder-powered MCP server for aimock docs and source code - Covers available tools (search-docs, search-code, explore-docs, explore-code, submit-feedback) - Client setup configs for Claude Code, Claude Desktop, Cursor, Codex, VS Code (Continue), and generic HTTP - Add "MCP Server" link to sidebar under Getting Started ## Test plan - [x] Verify page renders at `/mcp` on the docs site - [x] Confirm sidebar link highlights correctly - [ ] Test MCP connection with `claude mcp add aimock-docs --transport http https://mcp.aimock.copilotkit.dev/mcp`
2 parents c7e190b + f68ff77 commit 55aaa93

2 files changed

Lines changed: 239 additions & 0 deletions

File tree

docs/mcp/index.html

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>MCP Server — aimock</title>
7+
<link rel="icon" type="image/svg+xml" href="../favicon.svg" />
8+
<meta
9+
name="description"
10+
content="Connect AI agents to aimock documentation via MCP — Claude Code, Claude Desktop, Cursor, Codex, and any Streamable HTTP client."
11+
/>
12+
<link rel="preconnect" href="https://fonts.googleapis.com" />
13+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
14+
<link
15+
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Instrument+Sans:wght@400;500;600;700&display=swap"
16+
rel="stylesheet"
17+
/>
18+
<link rel="stylesheet" href="../style.css" />
19+
</head>
20+
<body>
21+
<nav class="top-nav">
22+
<div class="nav-inner">
23+
<div style="display: flex; align-items: center; gap: 1rem">
24+
<button
25+
class="sidebar-toggle"
26+
onclick="document.querySelector('.sidebar').classList.toggle('open')"
27+
aria-label="Toggle sidebar"
28+
>
29+
&#9776;
30+
</button>
31+
<a href="/" class="nav-brand"> <span class="prompt">$</span> aimock </a>
32+
</div>
33+
<ul class="nav-links">
34+
<li><a href="/">Home</a></li>
35+
<li><a href="/docs" style="color: var(--accent)">Docs</a></li>
36+
<li>
37+
<a href="https://github.com/CopilotKit/aimock" class="gh-link" target="_blank"
38+
><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
39+
<path
40+
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
41+
/>
42+
</svg>
43+
GitHub</a
44+
>
45+
</li>
46+
</ul>
47+
</div>
48+
</nav>
49+
50+
<div class="docs-layout">
51+
<aside class="sidebar" id="sidebar"></aside>
52+
53+
<main class="docs-content">
54+
<h1>MCP Server</h1>
55+
<p class="lead">
56+
aimock's documentation and source code are indexed by a
57+
<a href="https://github.com/CopilotKit/pathfinder" target="_blank">Pathfinder</a>
58+
instance, giving AI agents semantic search and file exploration via MCP.
59+
</p>
60+
61+
<h2>Available Tools</h2>
62+
<p>
63+
The MCP server exposes five tools that agents can use to find information about aimock:
64+
</p>
65+
66+
<table class="endpoint-table">
67+
<thead>
68+
<tr>
69+
<th>Tool</th>
70+
<th>Description</th>
71+
</tr>
72+
</thead>
73+
<tbody>
74+
<tr>
75+
<td><code>search-docs</code></td>
76+
<td>
77+
Semantic search over aimock documentation — guides, API references, provider configs
78+
</td>
79+
</tr>
80+
<tr>
81+
<td><code>search-code</code></td>
82+
<td>Semantic search over aimock's TypeScript source — routers, handlers, builders</td>
83+
</tr>
84+
<tr>
85+
<td><code>explore-docs</code></td>
86+
<td>Browse documentation files with bash commands (find, grep, cat, ls, head)</td>
87+
</tr>
88+
<tr>
89+
<td><code>explore-code</code></td>
90+
<td>Browse source code files with bash commands</td>
91+
</tr>
92+
<tr>
93+
<td><code>submit-feedback</code></td>
94+
<td>Report whether search results were helpful to improve quality</td>
95+
</tr>
96+
</tbody>
97+
</table>
98+
99+
<h2>Connect Your Agent</h2>
100+
101+
<h3>Claude Code</h3>
102+
<p>Add via the CLI:</p>
103+
<div class="code-block">
104+
<div class="code-block-header">Terminal <span class="lang-tag">bash</span></div>
105+
<pre><code>claude mcp add aimock-docs --transport http https://mcp.aimock.copilotkit.dev/mcp</code></pre>
106+
</div>
107+
<p>Or add to <code>~/.claude/mcp.json</code>:</p>
108+
<div class="code-block">
109+
<div class="code-block-header">~/.claude/mcp.json <span class="lang-tag">json</span></div>
110+
<pre><code>{
111+
<span class="prop">"mcp-servers"</span>: {
112+
<span class="prop">"aimock-docs"</span>: {
113+
<span class="prop">"type"</span>: <span class="str">"http"</span>,
114+
<span class="prop">"url"</span>: <span class="str">"https://mcp.aimock.copilotkit.dev/mcp"</span>
115+
}
116+
}
117+
}</code></pre>
118+
</div>
119+
120+
<h3>Claude Desktop</h3>
121+
<div class="code-block">
122+
<div class="code-block-header">
123+
~/Library/Application Support/Claude/claude_desktop_config.json
124+
<span class="lang-tag">json</span>
125+
</div>
126+
<pre><code>{
127+
<span class="prop">"mcpServers"</span>: {
128+
<span class="prop">"aimock-docs"</span>: {
129+
<span class="prop">"type"</span>: <span class="str">"http"</span>,
130+
<span class="prop">"url"</span>: <span class="str">"https://mcp.aimock.copilotkit.dev/mcp"</span>
131+
}
132+
}
133+
}</code></pre>
134+
</div>
135+
136+
<h3>Cursor</h3>
137+
<div class="code-block">
138+
<div class="code-block-header">.cursor/mcp.json <span class="lang-tag">json</span></div>
139+
<pre><code>{
140+
<span class="prop">"mcpServers"</span>: {
141+
<span class="prop">"aimock-docs"</span>: {
142+
<span class="prop">"type"</span>: <span class="str">"http"</span>,
143+
<span class="prop">"url"</span>: <span class="str">"https://mcp.aimock.copilotkit.dev/mcp"</span>
144+
}
145+
}
146+
}</code></pre>
147+
</div>
148+
149+
<h3>OpenAI Codex</h3>
150+
<div class="code-block">
151+
<div class="code-block-header">codex-mcp.json <span class="lang-tag">json</span></div>
152+
<pre><code>{
153+
<span class="prop">"mcpServers"</span>: {
154+
<span class="prop">"aimock-docs"</span>: {
155+
<span class="prop">"type"</span>: <span class="str">"http"</span>,
156+
<span class="prop">"url"</span>: <span class="str">"https://mcp.aimock.copilotkit.dev/mcp"</span>
157+
}
158+
}
159+
}</code></pre>
160+
</div>
161+
<p>Then run: <code>codex --mcp-config codex-mcp.json</code></p>
162+
163+
<h3>VS Code (Continue)</h3>
164+
<div class="code-block">
165+
<div class="code-block-header">
166+
~/.continue/config.json <span class="lang-tag">json</span>
167+
</div>
168+
<pre><code>{
169+
<span class="prop">"mcpServers"</span>: [
170+
{
171+
<span class="prop">"name"</span>: <span class="str">"aimock-docs"</span>,
172+
<span class="prop">"transport"</span>: {
173+
<span class="prop">"type"</span>: <span class="str">"http"</span>,
174+
<span class="prop">"url"</span>: <span class="str">"https://mcp.aimock.copilotkit.dev/mcp"</span>
175+
}
176+
}
177+
]
178+
}</code></pre>
179+
</div>
180+
181+
<h3>Generic (Streamable HTTP)</h3>
182+
<p>Any MCP-compatible client can connect via Streamable HTTP:</p>
183+
<div class="code-block">
184+
<div class="code-block-header">Endpoint <span class="lang-tag">text</span></div>
185+
<pre><code>URL: https://mcp.aimock.copilotkit.dev/mcp
186+
Transport: Streamable HTTP
187+
Method: POST</code></pre>
188+
</div>
189+
190+
<h2>What Gets Indexed</h2>
191+
<p>
192+
The MCP server indexes two sources from the
193+
<a href="https://github.com/CopilotKit/aimock" target="_blank">aimock repository</a>:
194+
</p>
195+
<ul>
196+
<li>
197+
<strong>Documentation</strong> — all HTML pages from <code>docs/</code>, chunked for
198+
semantic search with source URLs back to
199+
<a href="https://aimock.copilotkit.dev">aimock.copilotkit.dev</a>
200+
</li>
201+
<li>
202+
<strong>Source code</strong> — TypeScript files from <code>src/</code>, excluding tests,
203+
chunked by logical code blocks
204+
</li>
205+
</ul>
206+
<p>
207+
The index auto-refreshes daily and on push via GitHub webhooks, so agents always search
208+
against the latest content.
209+
</p>
210+
211+
<h2>Verifying the Connection</h2>
212+
<p>
213+
Once connected, your agent should see the aimock tools in its available tools list. Try
214+
asking your agent:
215+
</p>
216+
<ul>
217+
<li><em>"Search aimock docs for how to mock streaming responses"</em></li>
218+
<li><em>"Explore the aimock source code for the router implementation"</em></li>
219+
<li><em>"How do I use fixtures with aimock?"</em></li>
220+
</ul>
221+
</main>
222+
<aside class="page-toc" id="page-toc"></aside>
223+
</div>
224+
<footer class="docs-footer">
225+
<div class="footer-inner">
226+
<div class="footer-left"><span>$</span> aimock &middot; MIT License</div>
227+
<ul class="footer-links">
228+
<li><a href="https://github.com/CopilotKit/aimock" target="_blank">GitHub</a></li>
229+
<li>
230+
<a href="https://www.npmjs.com/package/@copilotkit/aimock" target="_blank">npm</a>
231+
</li>
232+
</ul>
233+
</div>
234+
</footer>
235+
<script src="../sidebar.js"></script>
236+
<script src="../cli-tabs.js"></script>
237+
</body>
238+
</html>

docs/sidebar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{ label: "Quick Start: LLM", href: "/chat-completions" },
1111
{ label: "Quick Start: aimock", href: "/aimock-cli" },
1212
{ label: "Examples", href: "/examples" },
13+
{ label: "MCP Server", href: "/mcp" },
1314
],
1415
},
1516
{

0 commit comments

Comments
 (0)