
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A FastMCP server that dynamically creates MCP (Model Context Protocol) servers from web API configurations. This allows you to easily integrate any REST API, GraphQL endpoint, or web service into an MCP-compatible tool that can be used by AI assistants like Claude.
SaasToMCP supports three different transport types to accommodate various deployment scenarios:
saas-to-mcp run
or saas-to-mcp run --transport stdio
saas-to-mcp run --transport sse --host 127.0.0.1 --port 8000
http://host:port/mcp
saas-to-mcp run --transport streamable-http --host 127.0.0.1 --port 8000
http://host:port/mcp
# Clone or download this repository
cd ~/Desktop/SaasToMCP
# Install dependencies
pip install -r requirements.txt
{
"mcpServers": {
"saas-to-mcp": {
"command": "uvx",
"args": ["saas-to-mcp", "run"]
}
}
}
### Starting the Server
There are several ways to run the SaasToMCP server with different transport types:
**1. After installation (recommended):**
If you have installed the package (e.g., using `pip install .` from the project root after installing requirements):
```bash
# Default STDIO transport
saas-to-mcp run
# Streamable HTTP transport (recommended for web deployments)
saas-to-mcp run --transport streamable-http --host 127.0.0.1 --port 8000
# SSE transport (legacy compatibility)
saas-to-mcp run --transport sse --host 127.0.0.1 --port 8000
2. Directly from the repository (for development):
# From the root of the repository
python -m saas_to_mcp.cli run [OPTIONS]
Transport Options:
--transport
: Choose from stdio
(default), sse
, or streamable-http
--host
: Host address for HTTP transports (default: 127.0.0.1)--port
: Port for HTTP transports (default: 8000)--path
: URL path for MCP endpoint (default: /mcp)Run saas-to-mcp run --help
for all available options.
SaasToMCP is designed to expose web APIs as tools for AI assistants that support the Model Context Protocol (MCP). Here's how to use it:
Start the SaasToMCP Server:
For modern MCP clients (recommended):
saas-to-mcp run --transport streamable-http --host 127.0.0.1 --port 8000
For legacy compatibility:
saas-to-mcp run --transport sse --host 127.0.0.1 --port 8000
For local desktop applications:
saas-to-mcp run # Uses STDIO transport
Configure Your AI Assistant: The MCP endpoint will be available at:
http://127.0.0.1:8000/mcp
http://127.0.0.1:8000/mcp
Register APIs and Use Tools:
Once connected, use the built-in register_api
tool to define web APIs, then use the generated endpoint tools.
The server provides these built-in tools:
{
"name": "my_api",
"base_url": "https://api.example.com",
"description": "Example API integration",
"auth": {
"type": "bearer",
"bearer_token": "your-token-here"
},
"headers": {
"Accept": "application/json"
},
"endpoints": [
{
"name": "list_users",
"description": "Get all users",
"method": "GET",
"path": "/users",
"params": [
{
"name": "limit",
"type": "integer",
"location": "query",
"required": false,
"default": 10,
"description": "Number of users to return"
}
]
}
]
}
{
"name": "weather",
"base_url": "https://api.openweathermap.org/data/2.5",
"description": "OpenWeatherMap API",
"auth": {
"type": "api_key",
"api_key": "your-api-key",
"api_key_param": "appid"
},
"endpoints": [
{
"name": "get_current_weather",
"description": "Get current weather for a city",
"method": "GET",
"path": "/weather",
"params": [
{
"name": "q",
"type": "string",
"location": "query",
"required": true,
"description": "City name"
},
{
"name": "units",
"type": "string",
"location": "query",
"required": false,
"default": "metric",
"enum": ["metric", "imperial", "kelvin"]
}
]
}
]
}
{
"name": "github",
"base_url": "https://api.github.com",
"description": "GitHub REST API",
"auth": {
"type": "bearer",
"bearer_token": "ghp_your_token_here"
},
"headers": {
"Accept": "application/vnd.github.v3+json"
},
"endpoints": [
{
"name": "get_user",
"description": "Get a GitHub user's information",
"method": "GET",
"path": "/users/{username}",
"params": [
{
"name": "username",
"type": "string",
"location": "path",
"required": true,
"description": "GitHub username"
}
]
}
]
}
{
"auth": {
"type": "bearer",
"bearer_token": "your-token-here"
}
}
{
"auth": {
"type": "api_key",
"api_key": "your-key-here",
"api_key_header": "X-API-Key"
}
}
{
"auth": {
"type": "api_key",
"api_key": "your-key-here",
"api_key_param": "api_key"
}
}
{
"auth": {
"type": "basic",
"username": "your-username",
"password": "your-password"
}
}
{
"auth": {
"type": "custom",
"custom_headers": {
"X-Custom-Auth": "custom-value",
"X-Client-ID": "client-123"
}
}
}
?param=value
)/users/{id}
){
"timeout": 60.0 // Timeout in seconds
}
{
"name": "status",
"type": "string",
"enum": ["active", "inactive", "pending"]
}
{
"name": "page",
"type": "integer",
"default": 1
}
{
"mcpServers": {
"saas-to-mcp": {
"command": "saas-to-mcp",
"args": ["run", "--transport", "streamable-http", "--host", "127.0.0.1", "--port", "8000"]
}
}
}
{
"mcpServers": {
"saas-to-mcp": {
"command": "saas-to-mcp",
"args": ["run"]
}
}
}
The server provides detailed error messages for:
streamable-http
for modern deployments, stdio
for local toolstest_api_connection
after registering an APIRun with verbose logging (if installed):
saas-to-mcp run --verbose
Feel free to extend this server with additional features:
MIT License - feel free to use and modify as needed.
FAQs
Convert any SaaS API into an MCP server with multiple transport support
We found that saas-to-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.