From 4785a973127d9c836654cba19d963c68048137ad Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 21 Nov 2024 19:24:54 +0000 Subject: [PATCH 1/2] Don't publish umbrella package anymore --- README.md | 21 +++++++++++++-------- package.json | 5 +++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 782a827..25cd74b 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,23 @@ Example servers for the Model Context Protocol, to demonstrate the kinds of thin ## Getting started -Install from npm: +The servers in this repository can be used directly with `npx`. For example: ```sh -npm install -g @modelcontextprotocol/servers +npx -y @modelcontextprotocol/server-memory ``` -Then, the servers will be globally available on your PATH: +This will start the memory server. However, this isn't very useful on its own, and should instead be configured into an MCP client. For example, here's the Claude Desktop configuration to use the above server: -```sh -mcp-server-everything -mcp-server-postgres -# ... +```json +{ + "mcpServers": { + "memory": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-memory"] + } + } +} ``` -Each server will operate differently. See the READMEs within [src](src/) for more information. \ No newline at end of file +Individual servers may require additional arguments or environment variables to be set. See the READMEs within [src](src/) for more information. diff --git a/package.json b/package.json index cb2c06d..cde4116 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "@modelcontextprotocol/servers", - "version": "0.2.0", + "private": true, + "version": "0.3.0", "description": "Model Context Protocol servers", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -14,7 +15,7 @@ "scripts": { "build": "npm run build --workspaces", "watch": "npm run watch --workspaces", - "publish-all": "npm publish --workspaces --access public && npm publish --access public", + "publish-all": "npm publish --workspaces --access public", "link-all": "npm link --workspaces" }, "dependencies": { From 7238146c2a3bf12f355f24db741d203b47fbf559 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 21 Nov 2024 19:41:32 +0000 Subject: [PATCH 2/2] Update all example configs --- src/brave-search/README.md | 11 +++++++---- src/filesystem/README.md | 6 +++--- src/gdrive/README.md | 8 +++++--- src/github/README.md | 22 ++++++++++++---------- src/google-maps/README.md | 18 +++++++++++------- src/memory/README.md | 7 ++++--- src/postgres/README.md | 8 +++++--- src/slack/README.md | 29 ++++++++++++++++------------- 8 files changed, 63 insertions(+), 46 deletions(-) diff --git a/src/brave-search/README.md b/src/brave-search/README.md index 0c118e2..6ec4651 100644 --- a/src/brave-search/README.md +++ b/src/brave-search/README.md @@ -37,10 +37,13 @@ An MCP server implementation that integrates the Brave Search API, providing bot Add this to your `claude_desktop_config.json`: ```json -"mcp-server-brave-search": { - "command": "mcp-server-brave-search", - "env": { - "BRAVE_API_KEY": "YOUR_API_KEY_HERE" +{ + "brave-search": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-brave-search"], + "env": { + "BRAVE_API_KEY": "YOUR_API_KEY_HERE" + } } } ``` diff --git a/src/filesystem/README.md b/src/filesystem/README.md index e72019f..913c1c8 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -82,8 +82,8 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio Add this to your `claude_desktop_config.json`: ```json { - "mcp-server-filesystem": { - "command": "mcp-server-filesystem", - "args": ["Users/username/Desktop", "/path/to/other/allowed/dir"] + "filesystem": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/path/to/other/allowed/dir"] } } diff --git a/src/gdrive/README.md b/src/gdrive/README.md index 5fd0e0d..c4dd4f2 100644 --- a/src/gdrive/README.md +++ b/src/gdrive/README.md @@ -51,7 +51,9 @@ To integrate this server with the desktop app, add the following to your app's s ```json { - "mcp-server-gdrive": { - "command": "mcp-server-gdrive" + "gdrive": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-gdrive"] } -} \ No newline at end of file +} +``` diff --git a/src/github/README.md b/src/github/README.md index aedba32..3f73557 100644 --- a/src/github/README.md +++ b/src/github/README.md @@ -114,13 +114,15 @@ MCP Server for the GitHub API, enabling file operations, repository management, ### Usage with Claude Desktop To use this with Claude Desktop, add the following to your `claude_desktop_config.json`: - ```json - { - "mcp-server-github": { - "command": "mcp-server-github", - "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "" - } - } - } - ``` + +```json +{ + "github": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-github"], + "env": { + "GITHUB_PERSONAL_ACCESS_TOKEN": "" + } + } +} +``` diff --git a/src/google-maps/README.md b/src/google-maps/README.md index 8af6dd2..bd39638 100644 --- a/src/google-maps/README.md +++ b/src/google-maps/README.md @@ -55,11 +55,15 @@ MCP Server for the Google Maps API. 1. Get a Google Maps API key by following the instructions [here](https://developers.google.com/maps/documentation/javascript/get-api-key#create-api-keys). 2. To use this with Claude Desktop, add the following to your `claude_desktop_config.json`: - ```json - "mcp-server-google-maps": { - "command": "mcp-server-google-maps", - "env": { - "GOOGLE_MAPS_API_KEY": "" - } + +```json +{ + "google-maps": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-google-maps"], + "env": { + "GOOGLE_MAPS_API_KEY": "" } - ``` + } +} +``` diff --git a/src/memory/README.md b/src/memory/README.md index 40bd7b0..744241d 100644 --- a/src/memory/README.md +++ b/src/memory/README.md @@ -130,8 +130,9 @@ Example: Add this to your claude_desktop_config.json: ```json { - "mcp-server-memory": { - "command": "mcp-server-memory" + "memory": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-memory"] } } ``` @@ -166,4 +167,4 @@ Follow these steps for each interaction: a) Create entities for recurring organizations, people, and significant events b) Connect them to the current entities using relations b) Store facts about them as observations -``` \ No newline at end of file +``` diff --git a/src/postgres/README.md b/src/postgres/README.md index 50a888c..4c8344d 100644 --- a/src/postgres/README.md +++ b/src/postgres/README.md @@ -25,9 +25,11 @@ The server provides schema information for each table in the database: To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`: ```json -"postgres": { - "command": "mcp-server-postgres", - "args": ["postgresql://localhost/mydb"] +{ + "postgres": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"] + } } ``` diff --git a/src/slack/README.md b/src/slack/README.md index 7c99a4a..aec07c4 100644 --- a/src/slack/README.md +++ b/src/slack/README.md @@ -93,18 +93,21 @@ MCP Server for the Slack API, enabling Claude to interact with Slack workspaces. 5. Get your Team ID (starts with a `T`) by following [this guidance](https://slack.com/help/articles/221769328-Locate-your-Slack-URL-or-ID#find-your-workspace-or-org-id) ### Usage with the Claude Desktop app - Add the following to your `claude_desktop_config.json`: - ```json - { - "mcp-server-slack": { - "command": "mcp-server-slack", - "env": { - "SLACK_BOT_TOKEN": "xoxb-your-bot-token", - "SLACK_TEAM_ID": "T01234567" - } - } - } - ``` + +Add the following to your `claude_desktop_config.json`: + +```json +{ + "slack": { + "command": "npx", + "args": ["-y", "@modelcontextprotocol/server-slack"], + "env": { + "SLACK_BOT_TOKEN": "xoxb-your-bot-token", + "SLACK_TEAM_ID": "T01234567" + } + } +} +``` ### Troubleshooting @@ -112,4 +115,4 @@ If you encounter permission errors, verify that: 1. All required scopes are added to your Slack app 2. The app is properly installed to your workspace 3. The tokens and workspace ID are correctly copied to your configuration -4. The app has been added to the channels it needs to access \ No newline at end of file +4. The app has been added to the channels it needs to access