universal-mcp 0.1.7rc2__py3-none-any.whl → 0.1.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- universal_mcp/__init__.py +0 -2
- universal_mcp/analytics.py +75 -0
- universal_mcp/applications/ahrefs/README.md +76 -0
- universal_mcp/applications/ahrefs/app.py +2291 -0
- universal_mcp/applications/application.py +95 -5
- universal_mcp/applications/calendly/README.md +78 -0
- universal_mcp/applications/calendly/__init__.py +0 -0
- universal_mcp/applications/calendly/app.py +1195 -0
- universal_mcp/applications/coda/README.md +133 -0
- universal_mcp/applications/coda/__init__.py +0 -0
- universal_mcp/applications/coda/app.py +3671 -0
- universal_mcp/applications/e2b/app.py +14 -35
- universal_mcp/applications/figma/README.md +74 -0
- universal_mcp/applications/figma/__init__.py +0 -0
- universal_mcp/applications/figma/app.py +1261 -0
- universal_mcp/applications/firecrawl/app.py +29 -32
- universal_mcp/applications/github/app.py +127 -85
- universal_mcp/applications/google_calendar/app.py +62 -138
- universal_mcp/applications/google_docs/app.py +47 -52
- universal_mcp/applications/google_drive/app.py +119 -113
- universal_mcp/applications/google_mail/app.py +124 -50
- universal_mcp/applications/google_sheet/app.py +89 -91
- universal_mcp/applications/markitdown/app.py +9 -8
- universal_mcp/applications/notion/app.py +254 -134
- universal_mcp/applications/perplexity/app.py +13 -45
- universal_mcp/applications/reddit/app.py +94 -85
- universal_mcp/applications/resend/app.py +12 -23
- universal_mcp/applications/{serp → serpapi}/app.py +14 -33
- universal_mcp/applications/tavily/app.py +11 -28
- universal_mcp/applications/wrike/README.md +71 -0
- universal_mcp/applications/wrike/__init__.py +0 -0
- universal_mcp/applications/wrike/app.py +1372 -0
- universal_mcp/applications/youtube/README.md +82 -0
- universal_mcp/applications/youtube/__init__.py +0 -0
- universal_mcp/applications/youtube/app.py +1428 -0
- universal_mcp/applications/zenquotes/app.py +12 -2
- universal_mcp/exceptions.py +9 -2
- universal_mcp/integrations/__init__.py +24 -1
- universal_mcp/integrations/agentr.py +27 -4
- universal_mcp/integrations/integration.py +143 -30
- universal_mcp/logger.py +3 -56
- universal_mcp/servers/__init__.py +6 -14
- universal_mcp/servers/server.py +201 -146
- universal_mcp/stores/__init__.py +7 -2
- universal_mcp/stores/store.py +103 -40
- universal_mcp/tools/__init__.py +3 -0
- universal_mcp/tools/adapters.py +43 -0
- universal_mcp/tools/func_metadata.py +213 -0
- universal_mcp/tools/tools.py +342 -0
- universal_mcp/utils/docgen.py +325 -119
- universal_mcp/utils/docstring_parser.py +179 -0
- universal_mcp/utils/dump_app_tools.py +33 -23
- universal_mcp/utils/installation.py +199 -8
- universal_mcp/utils/openapi.py +229 -46
- {universal_mcp-0.1.7rc2.dist-info → universal_mcp-0.1.8.dist-info}/METADATA +9 -5
- universal_mcp-0.1.8.dist-info/RECORD +81 -0
- universal_mcp-0.1.7rc2.dist-info/RECORD +0 -58
- /universal_mcp/{utils/bridge.py → applications/ahrefs/__init__.py} +0 -0
- /universal_mcp/applications/{serp → serpapi}/README.md +0 -0
- {universal_mcp-0.1.7rc2.dist-info → universal_mcp-0.1.8.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.7rc2.dist-info → universal_mcp-0.1.8.dist-info}/entry_points.txt +0 -0
universal_mcp/__init__.py
CHANGED
@@ -0,0 +1,75 @@
|
|
1
|
+
import os
|
2
|
+
import uuid
|
3
|
+
from functools import lru_cache
|
4
|
+
from importlib.metadata import version
|
5
|
+
|
6
|
+
import posthog
|
7
|
+
from loguru import logger
|
8
|
+
|
9
|
+
|
10
|
+
class Analytics:
|
11
|
+
_instance = None
|
12
|
+
|
13
|
+
def __new__(cls):
|
14
|
+
if cls._instance is None:
|
15
|
+
cls._instance = super().__new__(cls)
|
16
|
+
cls._instance._initialize()
|
17
|
+
return cls._instance
|
18
|
+
|
19
|
+
def _initialize(self):
|
20
|
+
"""Initialize the Analytics singleton"""
|
21
|
+
posthog.host = "https://us.i.posthog.com"
|
22
|
+
posthog.api_key = "phc_6HXMDi8CjfIW0l04l34L7IDkpCDeOVz9cOz1KLAHXh8"
|
23
|
+
self.enabled = os.getenv("TELEMETRY_DISABLED", "false").lower() != "true"
|
24
|
+
self.user_id = str(uuid.uuid4())[:8]
|
25
|
+
|
26
|
+
@staticmethod
|
27
|
+
@lru_cache(maxsize=1)
|
28
|
+
def get_version():
|
29
|
+
"""
|
30
|
+
Get the version of the Universal MCP
|
31
|
+
"""
|
32
|
+
try:
|
33
|
+
return version("universal_mcp")
|
34
|
+
except ImportError:
|
35
|
+
return "unknown"
|
36
|
+
|
37
|
+
def track_app_loaded(self, app_name: str):
|
38
|
+
"""Track when the app is loaded"""
|
39
|
+
if not self.enabled:
|
40
|
+
return
|
41
|
+
try:
|
42
|
+
properties = {
|
43
|
+
"version": self.get_version(),
|
44
|
+
"app_name": app_name,
|
45
|
+
}
|
46
|
+
posthog.capture(self.user_id, "app_loaded", properties)
|
47
|
+
except Exception as e:
|
48
|
+
logger.error(f"Failed to track app_loaded event: {e}")
|
49
|
+
|
50
|
+
def track_tool_called(
|
51
|
+
self, tool_name: str, status: str, error: str = None, user_id=None
|
52
|
+
):
|
53
|
+
"""Track when a tool is called
|
54
|
+
|
55
|
+
Args:
|
56
|
+
tool_name: Name of the tool being called
|
57
|
+
status: Status of the tool call (success/error)
|
58
|
+
error: Error message if status is error
|
59
|
+
user_id: Optional user ID to track
|
60
|
+
"""
|
61
|
+
if not self.enabled:
|
62
|
+
return
|
63
|
+
try:
|
64
|
+
properties = {
|
65
|
+
"tool_name": tool_name,
|
66
|
+
"status": status,
|
67
|
+
"error": error,
|
68
|
+
"version": self.get_version(),
|
69
|
+
}
|
70
|
+
posthog.capture(self.user_id, "tool_called", properties)
|
71
|
+
except Exception as e:
|
72
|
+
logger.error(f"Failed to track tool_called event: {e}")
|
73
|
+
|
74
|
+
|
75
|
+
analytics = Analytics()
|
@@ -0,0 +1,76 @@
|
|
1
|
+
|
2
|
+
# Ahrefs MCP Server
|
3
|
+
|
4
|
+
An MCP Server for the Ahrefs API.
|
5
|
+
|
6
|
+
## Supported Integrations
|
7
|
+
|
8
|
+
- AgentR
|
9
|
+
- API Key (Coming Soon)
|
10
|
+
- OAuth (Coming Soon)
|
11
|
+
|
12
|
+
## Tools
|
13
|
+
|
14
|
+
This is automatically generated from OpenAPI schema for the Ahrefs API.
|
15
|
+
|
16
|
+
## Supported Integrations
|
17
|
+
|
18
|
+
This tool can be integrated with any service that supports HTTP requests.
|
19
|
+
|
20
|
+
## Tool List
|
21
|
+
|
22
|
+
| Tool | Description |
|
23
|
+
|------|-------------|
|
24
|
+
| crawler_ips | Retrieve the list of public crawler IP addresses from the API. |
|
25
|
+
| crawler_ip_ranges | Fetches the current public crawler IP ranges from the API, optionally specifying output format. |
|
26
|
+
| limits_and_usage | Retrieves current API subscription limits and usage statistics from the service. |
|
27
|
+
| batch_analysis | Submits a batch analysis request with specified parameters and returns the analysis results as a dictionary. |
|
28
|
+
| serp_overview | Retrieves a SERP (Search Engine Results Page) overview report based on specified selection, country, and keyword criteria. |
|
29
|
+
| overview | Retrieves rank tracking overview data for a specified project, date, and device. |
|
30
|
+
| competitors_overview | Retrieves an overview of competitor rankings for a specified project and criteria. |
|
31
|
+
| projects | Retrieves a list of site audit projects from the configured base URL, optionally specifying an output format. |
|
32
|
+
| domain_rating | Fetches the domain rating and related metrics for a specified target and date. |
|
33
|
+
| backlinks_stats | Retrieves backlink statistics for a specified target and date, with optional filters for protocol, mode, and output format. |
|
34
|
+
| outlinks_stats | Retrieves outbound link statistics for the specified target from the site explorer API. |
|
35
|
+
| metrics | Retrieves metrics data from the site explorer API endpoint. |
|
36
|
+
| refdomains_history | Retrieves the historical data of reference domains from a specified site. |
|
37
|
+
| domain_rating_history | Retrieves historical domain rating data for a specified target within a given date range. |
|
38
|
+
| url_rating_history | Retrieves URL rating history data for a specified target within a date range. |
|
39
|
+
| pages_history | Retrieves historical page data for a target using specified filters. |
|
40
|
+
| metrics_history | Retrieves historical metrics based on specified parameters. |
|
41
|
+
| keywords_history | Fetches the historical keyword rankings and performance data for a specified target within an optional date range and set of filters. |
|
42
|
+
| metrics_by_country | Fetches site metrics grouped by country for a specified target and date. |
|
43
|
+
| pages_by_traffic | Retrieves a list of top pages for a specified target domain or URL, ranked by estimated organic search traffic. |
|
44
|
+
| all_backlinks | Retrieves all backlinks information for a specified target using various query parameters. |
|
45
|
+
| broken_backlinks | Fetches broken backlink data for the specified target from the site explorer API endpoint. |
|
46
|
+
| refdomains | Retrieves referring domains data for a specified target using the Site Explorer API endpoint. |
|
47
|
+
| anchors | Fetches anchor text distribution data for a specified target using given query parameters. |
|
48
|
+
| linkeddomains | Retrieves linked domains for a specified target using the site explorer API endpoint. |
|
49
|
+
| linked_anchors_external | Fetch linked external anchor data for a specified target using provided selection and filtering criteria. |
|
50
|
+
| linked_anchors_internal | Fetches internal linked anchor data for a specified target from the site explorer API, applying optional filtering and query parameters. |
|
51
|
+
| organic_keywords | Retrieve organic keyword data for a specified target and date from the Site Explorer API endpoint. |
|
52
|
+
| organic_competitors | Retrieves organic competitors data for a specified target using the Site Explorer API. |
|
53
|
+
| top_pages | Retrieves top pages data for a specified target and date from the site explorer API with customizable query parameters. |
|
54
|
+
| paid_pages | Fetches paid pages data from the Site Explorer API based on specified filters. |
|
55
|
+
| best_by_external_links | Fetches data about the best-performing pages of a target site based on external links, with various filtering and output options. |
|
56
|
+
| best_by_internal_links | Retrieves the best-performing internal links for a specified target using the site explorer API endpoint. |
|
57
|
+
| total_search_volume_history | Fetches the total historical search volume data for a specified target within a given date range and optional filters. |
|
58
|
+
| keyword_explorer_overview | Retrieves an overview of keyword metrics and data from the keywords explorer API endpoint based on the specified filters and parameters. |
|
59
|
+
| volume_history | Fetches the historical search volume for a given keyword in a specified country. |
|
60
|
+
| volume_by_country | Retrieves search volume by country for a given keyword. |
|
61
|
+
| matching_terms | Retrieves matching keyword terms from the keywords explorer API based on specified filters and search parameters. |
|
62
|
+
| related_terms | Retrieves related keyword terms for a given selection and country, with optional filtering and pagination. |
|
63
|
+
| search_suggestions | Fetches keyword search suggestions from the keywords explorer API based on the provided filtering and query parameters. |
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
## Usage
|
68
|
+
|
69
|
+
- Login to AgentR
|
70
|
+
- Follow the quickstart guide to setup MCP Server for your client
|
71
|
+
- Visit Apps Store and enable the Ahrefs app
|
72
|
+
- Restart the MCP Server
|
73
|
+
|
74
|
+
### Local Development
|
75
|
+
|
76
|
+
- Follow the README to test with the local MCP Server
|