|
1 | 1 | # Protocols.io MCP Server |
2 | 2 |
|
3 | | -An MCP server that enables MCP clients like Claude Desktop to interact with data from protocols.io. |
| 3 | +A Model Context Protocol (MCP) server that enables MCP clients like Claude Desktop to interact with [protocols.io](https://www.protocols.io), a popular platform for sharing scientific protocols and methods. |
| 4 | + |
| 5 | +## Available Tools |
| 6 | + |
| 7 | +The server provides the following tools that can be used by MCP clients: |
| 8 | + |
| 9 | +### Search and Retrieval |
| 10 | +- `search_public_protocols` - Search for public protocols by keyword |
| 11 | +- `get_protocol` - Get basic protocol information by ID |
| 12 | +- `get_protocol_steps` - Get detailed steps for a specific protocol |
| 13 | +- `get_my_protocols` - Retrieve all protocols from your account |
| 14 | + |
| 15 | +### Protocol Creation and Management |
| 16 | +- `create_protocol` - Create a new protocol with title and description |
| 17 | +- `update_protocol_title` - Update the title of an existing protocol |
| 18 | +- `update_protocol_description` - Update the description of an existing protocol |
| 19 | + |
| 20 | +### Step Management |
| 21 | +- `set_protocol_steps` - Replace all steps in a protocol |
| 22 | +- `add_protocol_step` - Add a single step to the end of a protocol |
| 23 | +- `delete_protocol_step` - Delete a specific step from a protocol |
| 24 | + |
| 25 | +## Requirements |
| 26 | + |
| 27 | +- Python 3.10 or higher |
| 28 | +- protocols.io account with API access token |
| 29 | +- MCP client (such as Claude Desktop) |
| 30 | + |
| 31 | +## Installation |
| 32 | + |
| 33 | +Install the package using pip: |
| 34 | + |
| 35 | +```bash |
| 36 | +pip install protocols-io-mcp |
| 37 | +``` |
| 38 | + |
| 39 | +## Configuration |
| 40 | + |
| 41 | +### Environment Variables |
| 42 | + |
| 43 | +Before running the server or tests, you must set your protocols.io API access token: |
| 44 | + |
| 45 | +```bash |
| 46 | +export PROTOCOLS_IO_CLIENT_ACCESS_TOKEN="your_client_access_token" |
| 47 | +``` |
| 48 | + |
| 49 | +To obtain an API token: |
| 50 | +1. Visit [protocols.io/developer](https://www.protocols.io/developers) |
| 51 | +2. Sign in to your account |
| 52 | +3. Go to API clients section and add a new client |
| 53 | +4. Copy the generated client access token and set it in your environment |
| 54 | + |
| 55 | +## Usage |
| 56 | + |
| 57 | +### Command Line Interface |
| 58 | + |
| 59 | +Run the MCP server with various transport options: |
| 60 | + |
| 61 | +```bash |
| 62 | +# Default: stdio transport (recommended for MCP clients) |
| 63 | +protocols-io-mcp |
| 64 | + |
| 65 | +# HTTP transport |
| 66 | +protocols-io-mcp --transport http --host 127.0.0.1 --port 8000 |
| 67 | + |
| 68 | +# Server-Sent Events transport |
| 69 | +protocols-io-mcp --transport sse --host 127.0.0.1 --port 8000 |
| 70 | +``` |
| 71 | + |
| 72 | +#### CLI Options |
| 73 | + |
| 74 | +``` |
| 75 | +Usage: protocols-io-mcp [OPTIONS] |
| 76 | +
|
| 77 | + Run the protocols.io MCP server. |
| 78 | + |
| 79 | +Options: |
| 80 | + --transport [stdio|http|sse] Transport protocol to use [default: stdio] |
| 81 | + --host TEXT Host to bind to when using http and sse |
| 82 | + transport [default: 127.0.0.1] |
| 83 | + --port INTEGER Port to bind to when using http and sse |
| 84 | + transport [default: 8000] |
| 85 | + --help Show this message and exit. |
| 86 | +``` |
| 87 | + |
| 88 | +### Integration with Claude Desktop |
| 89 | + |
| 90 | +To use this server with Claude Desktop, add the following configuration to your `claude_desktop_config.json`: |
| 91 | + |
| 92 | +```json |
| 93 | +{ |
| 94 | + "mcpServers": { |
| 95 | + "protocols-io": { |
| 96 | + "command": "protocols-io-mcp", |
| 97 | + "env": { |
| 98 | + "PROTOCOLS_IO_CLIENT_ACCESS_TOKEN": "your_client_access_token" |
| 99 | + } |
| 100 | + } |
| 101 | + } |
| 102 | +} |
| 103 | +``` |
| 104 | + |
| 105 | +## Development |
| 106 | + |
| 107 | +### Running Tests |
| 108 | + |
| 109 | +Ensure you have set the `PROTOCOLS_IO_CLIENT_ACCESS_TOKEN` environment variable, then run: |
| 110 | + |
| 111 | +```bash |
| 112 | +pytest |
| 113 | +``` |
| 114 | + |
| 115 | +## License |
| 116 | + |
| 117 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
0 commit comments