Enables cloning the source code repository from GitHub for installation and development.
Allows installing the Synapse MCP server package directly from PyPI repository.
Supports running tests for the Synapse MCP server using the pytest framework.
Provides integration with Sage Bionetworks' Synapse platform, allowing access to Synapse entities (Datasets, Projects, Folders, Files, Tables) and their annotations through a RESTful API.
Synapse MCP Server
A Model Context Protocol (MCP) server that exposes Synapse Entities (Datasets, Projects, Folders, Files, Tables) with their annotations and supports OAuth2 authentication.
Overview
This server provides a RESTful API for accessing Synapse entities and their annotations through the Model Context Protocol (MCP). It allows you to:
- Authenticate with Synapse
- Retrieve entities by ID
- Retrieve entities by name
- Get entity annotations
- Get entity children
- Query entities based on various criteria
- Query Synapse tables
- Get datasets in Croissant metadata format
Installation
Installing from PyPI
Usage
Starting the Server
This will start the MCP server on the default port (9000).
Using the CLI
Command-line Options
Running Tests
Testing the Server
Authentication Methods
Environment Variables
The server supports the following environment variables:
HOST
: The host to bind to (default: 127.0.0.1)PORT
: The port to listen on (default: 9000)MCP_TRANSPORT
: The transport protocol to use (default: stdio)stdio
: Use standard input/output for local developmentsse
: Use Server-Sent Events for cloud deployment
MCP_SERVER_URL
: The public URL of the server (default: mcp://127.0.0.1:9000)- Used for OAuth2 redirect and server information
The server supports two authentication methods:
- Auth Token: Authenticate using a Synapse authentication token
- OAuth2: Authenticate using Synapse's OAuth2 server
- Requires registering an OAuth2 client in Synapse (https://www.synapse.org/#!PersonalAccessTokens:OAuth)
API Endpoints
Server Information
GET /info
- Get server information
Tools
GET /tools
- List available toolsPOST /tools/authenticate
- Authenticate with SynapsePOST /tools/get_oauth_url
- Get the OAuth2 authorization URLPOST /tools/get_entity
- Get an entity by ID or namePOST /tools/get_entity_annotations
- Get annotations for an entityPOST /tools/get_entity_children
- Get child entities of a container entityPOST /tools/query_entities
- Query entities based on various criteriaPOST /tools/query_table
- Query a Synapse table
Resources
GET /resources
- List available resourcesGET /resources/entity/{id}
- Get entity by IDGET /resources/entity/{id}/annotations
- Get entity annotationsGET /resources/entity/{id}/children
- Get entity childrenGET /resources/query/entities/{entity_type}
- Query entities by typeGET /resources/query/entities/parent/{parent_id}
- Query entities by parent IDGET /resources/query/entities/name/{name}
- Query entities by nameGET /resources/query/table/{id}/{query}
- Query a table with SQL-like syntax
OAuth2 Endpoints
GET /oauth/login
- Redirect to Synapse OAuth2 login pageGET /oauth/callback
- Handle OAuth2 callback from Synapse
Examples
Authentication
You need to authenticate with real Synapse credentials to use the server:
OAuth2 Authentication
1. Redirect Flow (Browser-based)
Direct users to the OAuth login URL:
2. API-based Flow
For programmatic use, first get the authorization URL:
Getting an Entity
Getting Entity Annotations
Querying Entities
Querying a Table
Getting Datasets in Croissant Format
Deployment
Docker
You can build and run the server using Docker:
Fly.io
Deploy to fly.io:
Integrating with Claude Desktop
You can integrate this Synapse MCP server with Claude Desktop to enable Claude to access and work with Synapse data directly in your conversations.
Setup Instructions
- First, clone the repository and install the requirements:
- Configure Claude Desktop to use the Synapse MCP server:
- Open Claude Desktop
- Click on the Claude menu and select "Settings..."
- Click on "Developer" in the left-hand bar
- Click on "Edit Config"
- Add the following configuration to the
mcpServers
section:
- Save the configuration file and restart Claude Desktop
- You can now use Synapse data in your conversations with Claude. For example:
- "Get the entity with ID syn123456 from Synapse"
- "Query all files in the Synapse project syn123456"
- "Get annotations for the Synapse entity syn123456"
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol server that exposes Synapse Entities (Datasets, Projects, Folders, Files, Tables) with their annotations, enabling programmatic access to Synapse data resources through a RESTful API.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server implementation for interacting with Salesforce through its REST API.Last updated -410TypeScript
- -securityFlicense-qualityA Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.Last updated -462Python
- -securityFlicense-qualityA Model Context Protocol server for accessing Confluence API using Personal Access Tokens, enabling users to retrieve space lists, view pages, create new pages, and update existing content.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that exposes over 200+ APIs from API.market as MCP resources, allowing large language models to discover and interact with various APIs through natural language commands.Last updated -1112TypeScriptMIT License