perplexity-web-mcp-cli 0.5.0__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.
- perplexity_web_mcp/__init__.py +58 -0
- perplexity_web_mcp/api/__init__.py +12 -0
- perplexity_web_mcp/api/server.py +1304 -0
- perplexity_web_mcp/api/session_manager.py +423 -0
- perplexity_web_mcp/api/tool_calling.py +367 -0
- perplexity_web_mcp/cli/__init__.py +6 -0
- perplexity_web_mcp/cli/ai_doc.py +227 -0
- perplexity_web_mcp/cli/auth.py +406 -0
- perplexity_web_mcp/cli/doctor.py +140 -0
- perplexity_web_mcp/cli/main.py +319 -0
- perplexity_web_mcp/cli/setup.py +255 -0
- perplexity_web_mcp/cli/skill.py +286 -0
- perplexity_web_mcp/config.py +51 -0
- perplexity_web_mcp/constants.py +52 -0
- perplexity_web_mcp/core.py +566 -0
- perplexity_web_mcp/data/SKILL.md +202 -0
- perplexity_web_mcp/data/references/api-endpoints.md +118 -0
- perplexity_web_mcp/data/references/mcp-tools.md +147 -0
- perplexity_web_mcp/data/references/models.md +79 -0
- perplexity_web_mcp/enums.py +85 -0
- perplexity_web_mcp/exceptions.py +105 -0
- perplexity_web_mcp/http.py +273 -0
- perplexity_web_mcp/limits.py +15 -0
- perplexity_web_mcp/logging.py +121 -0
- perplexity_web_mcp/mcp/__init__.py +14 -0
- perplexity_web_mcp/mcp/__main__.py +9 -0
- perplexity_web_mcp/mcp/server.py +418 -0
- perplexity_web_mcp/models.py +65 -0
- perplexity_web_mcp/py.typed +0 -0
- perplexity_web_mcp/rate_limits.py +352 -0
- perplexity_web_mcp/resilience.py +101 -0
- perplexity_web_mcp/shared.py +282 -0
- perplexity_web_mcp/token_store.py +80 -0
- perplexity_web_mcp/types.py +49 -0
- perplexity_web_mcp_cli-0.5.0.dist-info/METADATA +439 -0
- perplexity_web_mcp_cli-0.5.0.dist-info/RECORD +38 -0
- perplexity_web_mcp_cli-0.5.0.dist-info/WHEEL +4 -0
- perplexity_web_mcp_cli-0.5.0.dist-info/entry_points.txt +5 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Perplexity Web MCP - MCP server and Anthropic API-compatible interface for Perplexity AI."""
|
|
2
|
+
|
|
3
|
+
from importlib import metadata
|
|
4
|
+
|
|
5
|
+
from .config import ClientConfig, ConversationConfig
|
|
6
|
+
from .core import Conversation, Perplexity
|
|
7
|
+
from .enums import CitationMode, LogLevel, SearchFocus, SourceFocus, TimeRange
|
|
8
|
+
from .exceptions import (
|
|
9
|
+
AuthenticationError,
|
|
10
|
+
FileUploadError,
|
|
11
|
+
FileValidationError,
|
|
12
|
+
HTTPError,
|
|
13
|
+
PerplexityError,
|
|
14
|
+
RateLimitError,
|
|
15
|
+
ResearchClarifyingQuestionsError,
|
|
16
|
+
ResponseParsingError,
|
|
17
|
+
StreamingError,
|
|
18
|
+
)
|
|
19
|
+
from .models import Model, Models
|
|
20
|
+
from .rate_limits import RateLimitCache, RateLimits, SourceLimit, UserSettings, fetch_rate_limits, fetch_user_settings
|
|
21
|
+
from .types import Coordinates, Response, SearchResultItem
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
ConversationConfig.model_rebuild()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__version__: str = metadata.version("perplexity-web-mcp-cli")
|
|
28
|
+
__all__: list[str] = [
|
|
29
|
+
"AuthenticationError",
|
|
30
|
+
"CitationMode",
|
|
31
|
+
"ClientConfig",
|
|
32
|
+
"Conversation",
|
|
33
|
+
"ConversationConfig",
|
|
34
|
+
"Coordinates",
|
|
35
|
+
"FileUploadError",
|
|
36
|
+
"FileValidationError",
|
|
37
|
+
"HTTPError",
|
|
38
|
+
"LogLevel",
|
|
39
|
+
"Model",
|
|
40
|
+
"Models",
|
|
41
|
+
"Perplexity",
|
|
42
|
+
"PerplexityError",
|
|
43
|
+
"RateLimitCache",
|
|
44
|
+
"RateLimits",
|
|
45
|
+
"RateLimitError",
|
|
46
|
+
"ResearchClarifyingQuestionsError",
|
|
47
|
+
"Response",
|
|
48
|
+
"ResponseParsingError",
|
|
49
|
+
"SearchFocus",
|
|
50
|
+
"SearchResultItem",
|
|
51
|
+
"SourceFocus",
|
|
52
|
+
"SourceLimit",
|
|
53
|
+
"StreamingError",
|
|
54
|
+
"TimeRange",
|
|
55
|
+
"UserSettings",
|
|
56
|
+
"fetch_rate_limits",
|
|
57
|
+
"fetch_user_settings",
|
|
58
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Anthropic API-compatible server for Perplexity Web MCP."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
__all__: list[str] = ["run_server"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def run_server() -> None:
|
|
10
|
+
"""Run the Anthropic API-compatible server."""
|
|
11
|
+
from .server import run_server as _run
|
|
12
|
+
_run()
|