0.0.13 • Published 11 months ago

@openctx/provider-mcp v0.0.13

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

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

  1. 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.
  2. Run pnpm watch in this directory.
  3. Add the following to your VS Code settings:
    "openctx.providers": {
        // ...other providers...
        "https://openctx.org/npm/@openctx/modelcontextprotocol": {
            "nodeCommand": "node",
            "mcp.provider.uri": "file:///path/to/servers/root/build/everything/index.js",
        }
    }
  4. 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/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:

  • Postgres - Connect to your Postgres databases to query schema information and write optimized SQL
  • Everything - A demo server showing MCP capabilities
  • Google Drive - Search and access your Google Drive documents
  • Giphy - Search gifs
  • Git - Get git history and commit information
  • HubSpot - Access your HubSpot CRM data
  • OSAScript - Execute AppleScript commands on macOS
  • Puppeteer - Control headless Chrome for web automation
  • Spotify - Access Spotify music data and playlists

Creating your own MCP server

See the MCP docs for how to create your own MCP servers.

0.0.13

11 months ago

0.0.12

11 months ago