MCP proxy for OpenCtx
This is a context provider for OpenCtx that fetches contents from a MCP provider for use as context.
Currently, only MCP over stdio is supported (HTTP is not yet supported).
Development
- Clone the modelcontextprotocol/servers repository. Follow the instructions there to build the example providers. This should generate output files of the form
build/${example_name}/index.js
. - Run
pnpm watch
in this directory. - Add the following to your VS Code settings:
"openctx.providers": {// ...other providers..."https://openctx.org/npm/@openctx/provider-modelcontextprotocol": {"nodeCommand": "node","mcp.provider.uri": "file:///path/to/servers/root/build/everything/index.js",}}
- Reload the VS Code window. You should see
servers/everything
in the@
-mention dropdown.
To hook up to the Postgres MCP provider, use:
"openctx.providers": { // ...other providers... "https://openctx.org/npm/@openctx/provider-modelcontextprotocol": { "nodeCommand": "node", "mcp.provider.uri": "file:///path/to/servers/root/build/postgres/index.js", "mcp.provider.args": [ "postgresql://sourcegraph:sourcegraph@localhost:5432/sourcegraph" ] }}
More MCP Servers
The following MCP servers are available in the modelcontextprotocol/servers repository:
- Brave Search - Search the Brave search API
- Postgres - Connect to your Postgres databases to query schema information and write optimized SQL
- Filesystem - Access files on your local machine
- Everything - A demo server showing MCP capabilities
- Google Drive - Search and access your Google Drive documents
- Google Maps - Get directions and information about places
- Memo - Access your Memo notes
- Git - Get git history and commit information
- Puppeteer - Control headless Chrome for web automation
- SQLite - Query SQLite databases
Creating your own MCP server
See the MCP docs for how to create your own MCP servers.