Skip to content

Commit

Permalink
add query params to mcp url examples (#224)
Browse files Browse the repository at this point in the history
this is necessary to connect multiple MCP servers and not have duplicate
keys
  • Loading branch information
alexromano authored Feb 24, 2025
1 parent 2fe038e commit f56e789
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions provider/modelcontextprotocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ Currently, only MCP over stdio is supported (HTTP is not yet supported).
```json
"openctx.providers": {
// ...other providers...
"https://openctx.org/npm/@openctx/provider-modelcontextprotocol": {
"https://openctx.org/npm/@openctx/provider-modelcontextprotocol?everything": {
"nodeCommand": "node",
"mcp.provider.uri": "file:///path/to/servers/root/build/everything/index.js",
}
}
```
1. Reload the VS Code window. You should see `servers/everything` in the `@`-mention dropdown.

You may use query params in the key url to differentiate between MCP providers.

To hook up to the Postgres MCP provider, use:

```json
"openctx.providers": {
// ...other providers...
"https://openctx.org/npm/@openctx/provider-modelcontextprotocol": {
"https://openctx.org/npm/@openctx/provider-modelcontextprotocol?postgres": {
"nodeCommand": "node",
"mcp.provider.uri": "file:///path/to/servers/root/build/postgres/index.js",
"mcp.provider.args": [
Expand All @@ -52,4 +54,4 @@ The following MCP servers are available in the [modelcontextprotocol/servers](ht

## Creating your own MCP server

See the [MCP docs](https://modelcontextprotocol.io) for how to create your own MCP servers.
See the [MCP docs](https://modelcontextprotocol.io) for how to create your own MCP servers.

0 comments on commit f56e789

Please sign in to comment.