Skip to content

Commit

Permalink
chore: update pnpm lockfile for modelcontextprotocoltools dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arafatkatze committed Jan 12, 2025
1 parent 83a7c16 commit 4fbd130
Showing 1 changed file with 10 additions and 48 deletions.
58 changes: 10 additions & 48 deletions provider/modelcontextprotocoltools/README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,17 @@
# MCP proxy for OpenCtx
# MCP Tools Provider for OpenCtx (Work in Progress)

This is a context provider for [OpenCtx](https://openctx.org) that fetches contents from a [MCP](https://modelcontextprotocol.io) provider for use as context.
This is a context provider for [OpenCtx](https://openctx.org) that enables access to tools exposed by [MCP](https://modelcontextprotocol.io) providers. This provider specifically handles tool interactions - it does not support MCP resources.

Currently, only MCP over stdio is supported (HTTP is not yet supported).

## Development
## What This Provider Does
- Connects to MCP providers to expose their available tools
- Validates tool inputs against their schemas
- Executes tool calls and returns results
- Supports tool discovery and filtering via mentions

1. Clone the [modelcontextprotocol/servers](https://github.com/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`.
1. Run `pnpm watch` in this directory.
1. Add the following to your VS Code settings:
```json
"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",
}
}
```
1. Reload the VS Code window. You should see `servers/everything` in the `@`-mention dropdown.
## Creating MCP Tools

To hook up to the Postgres MCP provider, use:
To create tools that can be used with this provider, see the [MCP documentation](https://modelcontextprotocol.io) on implementing tool endpoints in your MCP server.

```json
"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](https://github.com/modelcontextprotocol/servers) repository:

- [Brave Search](https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search) - Search the Brave search API
- [Postgres](https://github.com/modelcontextprotocol/servers/tree/main/src/postgres) - Connect to your Postgres databases to query schema information and write optimized SQL
- [Filesystem](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) - Access files on your local machine
- [Everything](https://github.com/modelcontextprotocol/servers/tree/main/src/everything) - A demo server showing MCP capabilities
- [Google Drive](https://github.com/modelcontextprotocol/servers/tree/main/src/gdrive) - Search and access your Google Drive documents
- [Google Maps](https://github.com/modelcontextprotocol/servers/tree/main/src/google-maps) - Get directions and information about places
- [Memo](https://github.com/modelcontextprotocol/servers/tree/main/src/memo) - Access your Memo notes
- [Git](https://github.com/modelcontextprotocol/servers/tree/main/src/git) - Get git history and commit information
- [Puppeteer](https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer) - Control headless Chrome for web automation
- [SQLite](https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite) - Query SQLite databases

## Creating your own MCP server

See the [MCP docs](https://modelcontextprotocol.io) for how to create your own MCP servers.
> Note: This provider is under active development. Additional documentation and features will be added once design decisions are finalized.

0 comments on commit 4fbd130

Please sign in to comment.