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
22 changes: 10 additions & 12 deletions packages/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ Edit `~/Library/Application\ Support/Claude/claude_desktop_config.json`:
}
```

### VS Code / Codex
### VS Code

Published package:
Add the published package to `.vscode/mcp.json`:

```json
{
"mcpServers": {
"servers": {
"microlink": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@microlink/mcp"],
"env": {
Expand All @@ -78,18 +79,15 @@ Published package:
}
```

Local repository:
For a local repository checkout, replace the server command with:

```json
{
"mcpServers": {
"microlink": {
"command": "node",
"args": ["/absolute/path/to/mcp/src/index.js"],
"env": {
"MICROLINK_API_KEY": "YOUR_MICROLINK_API_KEY"
}
}
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/mcp/src/index.js"],
"env": {
"MICROLINK_API_KEY": "YOUR_MICROLINK_API_KEY"
}
}
```
Expand Down
36 changes: 36 additions & 0 deletions packages/mcp/test/readme-client-config.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'

const readme = await readFile(new URL('../README.md', import.meta.url), 'utf8')

function section (start, end) {
return readme.slice(readme.indexOf(start), readme.indexOf(end))
}

test('VS Code examples use its native MCP configuration shape', () => {
const vscode = section('### VS Code\n', '### Cursor\n')
const published = section(
'Add the published package to `.vscode/mcp.json`:',
'For a local repository checkout'
)
const local = section('For a local repository checkout', '### Cursor\n')

assert.match(vscode, /\.vscode\/mcp\.json/)
assert.doesNotMatch(vscode, /"mcpServers":/)
Comment thread
coderabbitai[bot] marked this conversation as resolved.

assert.match(published, /"servers":/)
assert.match(published, /"type": "stdio"/)
assert.match(published, /"command": "npx"/)
assert.match(published, /"MICROLINK_API_KEY"/)

assert.match(local, /"type": "stdio"/)
assert.match(local, /"command": "node"/)
assert.match(local, /"args": \["\/absolute\/path\/to\/mcp\/src\/index\.js"\]/)
assert.match(local, /"MICROLINK_API_KEY"/)
})

test('Cursor example keeps the portable mcpServers shape', () => {
const cursor = section('### Cursor\n', '## Usage\n')
assert.match(cursor, /"mcpServers":/)
})