universal-mcp 0.1.2__py3-none-any.whl → 0.1.3__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.
@@ -0,0 +1,252 @@
1
+ Metadata-Version: 2.4
2
+ Name: universal-mcp
3
+ Version: 0.1.3
4
+ Summary: Universal MCP acts as a middle ware for your API applications. It can store your credentials, authorize, enable disable apps on the fly and much more.
5
+ Author-email: Manoj Bajaj <manojbajaj95@gmail.com>
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: keyring>=25.6.0
8
+ Requires-Dist: litellm>=1.30.7
9
+ Requires-Dist: loguru>=0.7.3
10
+ Requires-Dist: markitdown[all]>=0.1.1
11
+ Requires-Dist: mcp>=1.5.0
12
+ Requires-Dist: posthog>=3.24.0
13
+ Requires-Dist: pydantic-settings>=2.8.1
14
+ Requires-Dist: pydantic>=2.11.1
15
+ Requires-Dist: pyyaml>=6.0.2
16
+ Requires-Dist: rich>=14.0.0
17
+ Requires-Dist: typer>=0.15.2
18
+ Provides-Extra: dev
19
+ Requires-Dist: litellm>=1.30.7; extra == 'dev'
20
+ Requires-Dist: pyright>=1.1.398; extra == 'dev'
21
+ Requires-Dist: pytest-asyncio>=0.26.0; extra == 'dev'
22
+ Requires-Dist: pytest>=8.3.5; extra == 'dev'
23
+ Requires-Dist: ruff>=0.11.4; extra == 'dev'
24
+ Provides-Extra: e2b
25
+ Requires-Dist: e2b-code-interpreter>=1.2.0; extra == 'e2b'
26
+ Provides-Extra: firecrawl
27
+ Requires-Dist: firecrawl-py>=1.15.0; extra == 'firecrawl'
28
+ Provides-Extra: playground
29
+ Requires-Dist: fastapi[standard]>=0.115.12; extra == 'playground'
30
+ Requires-Dist: langchain-anthropic>=0.3.10; extra == 'playground'
31
+ Requires-Dist: langchain-mcp-adapters>=0.0.3; extra == 'playground'
32
+ Requires-Dist: langchain-openai>=0.3.12; extra == 'playground'
33
+ Requires-Dist: langgraph-checkpoint-sqlite>=2.0.6; extra == 'playground'
34
+ Requires-Dist: langgraph>=0.3.24; extra == 'playground'
35
+ Requires-Dist: python-dotenv>=1.0.1; extra == 'playground'
36
+ Requires-Dist: streamlit>=1.44.1; extra == 'playground'
37
+ Provides-Extra: serpapi
38
+ Requires-Dist: google-search-results>=2.4.2; extra == 'serpapi'
39
+ Description-Content-Type: text/markdown
40
+
41
+ # Universal MCP
42
+ Universal MCP acts as a middleware layer for your API applications, enabling seamless integration with various services through the Model Context Protocol (MCP). It simplifies credential management, authorization, and dynamic app enablement.
43
+
44
+ ## 🌟 Features
45
+
46
+ - **MCP (Model Context Protocol) Integration**: Seamlessly works with MCP server architecture
47
+ - **Simplified API Integration**: Connect to services like GitHub, Google Calendar, Gmail, Reddit, Tavily, and more with minimal code
48
+ - **Managed Authentication**: Built-in support for API keys and OAuth-based authentication flows
49
+ - **Extensible Architecture**: Easily build and add new app integrations with minimal boilerplate
50
+ - **Credential Management**: Flexible storage options for API credentials with memory and environment-based implementations
51
+
52
+ ## 🔧 Installation
53
+
54
+ Install Universal MCP using pip:
55
+
56
+ ```bash
57
+ pip install universal-mcp
58
+ ```
59
+
60
+ ## 🚀 Quick Start
61
+
62
+ **Important Prerequisite: AgentR API Key (If Using AgentR Integration)**
63
+
64
+ If you plan to use integrations with `type: "agentr"` (for services like GitHub, Gmail, Notion via the AgentR platform), or if you run the server with `type: "agentr"`, you first need an AgentR API key:
65
+
66
+ 1. Visit [https://agentr.dev](https://agentr.dev) to create an account and generate an API key from your dashboard.
67
+ 2. Set it as an environment variable *before* running the MCP server:
68
+ ```bash
69
+ export AGENTR_API_KEY="your_api_key_here"
70
+ ```
71
+
72
+ **1. Create a Configuration File (e.g., `config.json`)**
73
+
74
+ This file defines the server settings, credential stores, and the applications to load with their respective integrations.
75
+
76
+ ```python
77
+ {
78
+ "name": "My Local MCP Server",
79
+ "description": "A server for testing applications locally",
80
+ "type": "local", # Or "agentr" to load apps dynamically from AgentR
81
+ "transport": "sse",
82
+ "port": 8005,
83
+ "store": {
84
+ "name": "my_mcp_store",
85
+ "type": "keyring"
86
+ },
87
+ "apps": [
88
+ {
89
+ "name": "zenquotes", # App slug
90
+ "integration": null # No authentication needed
91
+ },
92
+ {
93
+ "name": "tavily",
94
+ "integration": {
95
+ "name": "TAVILY_API_KEY", # Unique name for this credential
96
+ "type": "api_key",
97
+ "store": {
98
+ "type": "environment"
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "name": "github",
104
+ "integration": {
105
+ "name": "github", # Matches the service name in AgentR
106
+ "type": "agentr" # Uses AgentR platform for auth/creds
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ ```
112
+
113
+ *Notes:*
114
+ * `type: "local"` runs applications defined directly in the config's `apps` list.
115
+ * `type: "agentr"` connects to the AgentR platform to dynamically load user-enabled apps (ignores the `apps` list in the config) and handle credentials (requires `AGENTR_API_KEY` env var).
116
+ * `store`: Defines credential storage. `environment` looks for `<INTEGRATION_NAME_UPPERCASE>` env var (e.g., `TAVILY_API_KEY`). `keyring` uses the system's secure storage. `memory` is transient.
117
+ * `integration`: Configures authentication for each app when using `type: "local"`. `type: "agentr"` uses the AgentR platform for OAuth/credential management. `type: "api_key"` uses the specified `store`.
118
+
119
+ **2. Run the Server via CLI**
120
+
121
+ Make sure any required environment variables (like `TAVILY_API_KEY` for the example above, or `AGENTR_API_KEY` if using `"agentr"` type server/integrations) are set.
122
+
123
+ ```bash
124
+ universal_mcp run -c config.json
125
+ ```
126
+
127
+ The server will start, load the configured applications (or connect to AgentR if `type: "agentr"`), and listen for connections based on the `transport` type (`sse`, `stdio`, or `http`).
128
+
129
+ ## 🛠️ Using Playground
130
+
131
+ The `playground` directory provides a runnable example with a FastAPI backend and a Streamlit frontend for interacting with the MCP server.
132
+
133
+ **Prerequisites:**
134
+
135
+ * Ensure `local_config.json` exists in the project root directory. See `src/playground/README.md` for its format. This configures the *local* MCP server that the playground backend connects to.
136
+ * Install playground dependencies if needed (e.g., `fastapi`, `streamlit`, `uvicorn`, `langchain`, etc.).
137
+
138
+ **Running the Playground:**
139
+
140
+ The easiest way is to use the automated startup script from the **project root directory**:
141
+
142
+ ```bash
143
+ python src/playground
144
+ ```
145
+ Refer to `src/playground/README.md` for more detailed setup and usage instructions.
146
+
147
+ ## 🧩 Available Applications
148
+
149
+ Universal MCP comes with several pre-built applications:
150
+
151
+ | Application Slug | Description | Authentication Type |
152
+ | :--------------- | :--------------------------------------- | :---------------------------------------- |
153
+ | `e2b` | Execute Python code in secure sandboxes | API Key (via Integration) |
154
+ | `firecrawl` | Scrape/crawl web pages, search | API Key (via Integration) |
155
+ | `github` | Interact with GitHub repos, issues, PRs | OAuth (AgentR) |
156
+ | `google-calendar`| Manage Google Calendar events | OAuth (AgentR) |
157
+ | `google-mail` | Read and send Gmail emails | OAuth (AgentR) |
158
+ | `markitdown` | Convert web pages/files to Markdown | None |
159
+ | `notion` | Interact with Notion pages/databases | OAuth (AgentR) |
160
+ | `reddit` | Interact with Reddit posts/comments | OAuth (AgentR) |
161
+ | `resend` | Send emails via Resend API | API Key (via Integration) |
162
+ | `serp` | Perform web searches via SerpApi | API Key (via Integration) |
163
+ | `tavily` | Advanced web search & research API | API Key (via Integration) |
164
+ | `zenquotes` | Get inspirational quotes | None |
165
+
166
+ *Authentication Type notes:*
167
+ * *OAuth (AgentR)*: Typically requires configuring the integration with `type: "agentr"` in your `ServerConfig`. Requires the `AGENTR_API_KEY`.
168
+ * *API Key (via Integration)*: Requires configuring `type: "api_key"` and a `store` (like `environment` or `keyring`) in your `ServerConfig`.
169
+
170
+ ## 🔐 Integration Types
171
+
172
+ Universal MCP supports different ways to handle authentication for applications:
173
+
174
+ ### 1. API Key Integration
175
+
176
+ For services that authenticate via simple API keys. Configure using `IntegrationConfig` with `type: "api_key"`.
177
+
178
+ ```python
179
+ {
180
+ "name": "tavily",
181
+ "integration": {
182
+ "name": "TAVILY_API_KEY",
183
+ "type": "api_key",
184
+ "store": {
185
+ "name": "universal_mcp",
186
+ "type": "environment" # Or "keyring", "memory"
187
+ }
188
+ }
189
+ }
190
+ ```
191
+
192
+ ### 2. AgentR Integration
193
+
194
+ For services integrated with the AgentR platform, typically handling OAuth flows or centrally managed credentials. Configure using `IntegrationConfig` with `type: "agentr"`. Requires the `AGENTR_API_KEY` environment variable to be set for the MCP server process.
195
+
196
+ ```python
197
+ {
198
+ "name": "github",
199
+ "integration": {
200
+ "name": "github", # Matches the service name configured in AgentR
201
+ "type": "agentr"
202
+ }
203
+ }
204
+ ```
205
+ When an action requiring authorization is called, the `AgentRIntegration` will prompt the user (via the MCP client) to visit a URL to complete the OAuth flow managed by AgentR. This is also the default integration type when using `type: "agentr"` for the main server config.
206
+
207
+ ### 3. OAuth Integration (Direct - Less Common)
208
+
209
+ While `AgentRIntegration` is preferred for OAuth, a direct `OAuthIntegration` class exists but requires manual configuration of client IDs, secrets, and handling callbacks, which is generally more complex to set up outside the AgentR platform.
210
+
211
+ ## 🤖 CLI Usage
212
+
213
+ Universal MCP includes a command-line interface:
214
+
215
+ ```bash
216
+ # Run the MCP server using a configuration file
217
+ universal_mcp run -c config.json
218
+
219
+ # Generate API client code and application structure from an OpenAPI schema
220
+ # Output file name (e.g., 'twitter.py') determines app name ('twitter')
221
+ universal_mcp generate --schema <path_to_schema.json/yaml> --output <path/to/output_app_name.py> [--no-docstrings]
222
+
223
+ # Generate Google-style docstrings for functions in a Python file using an LLM
224
+ universal_mcp docgen <path/to/file.py> [--model <model_name>] [--api-key <llm_api_key>]
225
+
226
+ # Install MCP configuration for supported desktop apps (Claude, Cursor)
227
+ # Requires AgentR API key for configuration.
228
+ universal_mcp install claude
229
+ universal_mcp install cursor
230
+
231
+ # Check installed version (standard typer command)
232
+ universal_mcp --version
233
+ ```
234
+
235
+ ## 📋 Requirements
236
+
237
+ - Python 3.11+
238
+ - Dependencies (installed automatically via pip):
239
+ - `mcp-server`
240
+ - `loguru`
241
+ - `typer`
242
+ - `httpx`
243
+ - `pydantic`
244
+ - `pyyaml`
245
+ - `keyring` (optional, for `KeyringStore`)
246
+ - `litellm` (optional, for `docgen` command)
247
+ - ... and others specific to certain applications.
248
+
249
+ ## 📝 License
250
+
251
+ This project is licensed under the MIT License.
252
+
@@ -1,20 +1,22 @@
1
1
  universal_mcp/__init__.py,sha256=2gdHpHaDDcsRjZjJ01FLN-1iidN_wbDAolNpxhGoFB4,59
2
- universal_mcp/cli.py,sha256=7-8LZR9GiCW_iAz040XdgocCm6CvuJwBmKoZpFZDf-I,5557
2
+ universal_mcp/cli.py,sha256=DG-Qxc5vQIdbhAIQuU7bKKJuRGzwyOigjfCKSWBRhBI,5258
3
3
  universal_mcp/config.py,sha256=9eb3DDg4PBBr1MlGeBrA4bja3Y6howOH-UKpo7JIbs8,828
4
4
  universal_mcp/exceptions.py,sha256=Zp2_v_m3L7GDAmD1ZyuwFtY6ngapdhxuIygrvpZAQtM,271
5
+ universal_mcp/logger.py,sha256=KFRYc96RcyqiDVB8i0lTlVrHmXXB_C8on2QeZgrqBrw,2058
5
6
  universal_mcp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
7
  universal_mcp/applications/__init__.py,sha256=qeWnbdIudyMR7ST4XTc0gpEM9o6TsM1ZnZ92dMAPSBA,754
7
8
  universal_mcp/applications/application.py,sha256=dqp8lgIi2xhY62imwo7C6769URQtNmqd6Ok6PiTr6wc,3399
8
9
  universal_mcp/applications/e2b/app.py,sha256=5piCipi1TC_KuKLFP17do1Y1r28fqApvRsZy76equ9w,2573
9
- universal_mcp/applications/firecrawl/app.py,sha256=AOEQkaOpbkXeMtNdsPKmVQFd-4YHgjpjZy4j0ZvY9co,16831
10
+ universal_mcp/applications/firecrawl/app.py,sha256=RSy8zRn4k1A1tIpJNqrUnPI8ctEv1nKWuOuJQcp9mGo,9264
10
11
  universal_mcp/applications/github/README.md,sha256=m_6FlPpx9l5y29TkFMewCXMXSRHriDtj71qyYYeFzCw,643
11
12
  universal_mcp/applications/github/app.py,sha256=L201f5MSx1YVx0nqgduZ5gyHPZdX0UfcEhPmDWiWK6s,13686
12
13
  universal_mcp/applications/google_calendar/app.py,sha256=g_3vrsM2ltwpTySgC5I4SYg47n4UJiYigECO0ax1EHM,19134
13
14
  universal_mcp/applications/google_mail/app.py,sha256=VXeD3_TRgYIUDFUzDPCKgR47XvovxLFulD-HG22hls8,22716
14
- universal_mcp/applications/markitdown/app.py,sha256=LV8cvkhmacsal-mJmKL9DH5BMypL9MGHIiCkhal6Jtg,1019
15
- universal_mcp/applications/notion/README.md,sha256=kmdjfXyoEQyk1UTP3zZiGYj2XdMcWieGjs0iscaQ028,2109
15
+ universal_mcp/applications/markitdown/app.py,sha256=Gh12f1dW6DA_AW5DuStbCkOR7KtyJp8VEjdTaIicrRI,1996
16
+ universal_mcp/applications/notion/README.md,sha256=45NmPOmSQv99qBvWdwmnV5vbaYc9_8vq8I-FA7veVAA,2600
16
17
  universal_mcp/applications/notion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- universal_mcp/applications/notion/app.py,sha256=OpoCbGyq3ieNMXHYxaZkqBfjvWRNUwEt3n1-Yj23AyY,17981
18
+ universal_mcp/applications/notion/app.py,sha256=XpLnmeXj0Gnf_RYHlbAFnwtSCTYsrNzk6MSMSyDmHGQ,17283
19
+ universal_mcp/applications/perplexity/app.py,sha256=J27IDcz9pRC_uW4wABpn-EcI4RvKIzoh_o2hzysM5wA,3187
18
20
  universal_mcp/applications/reddit/app.py,sha256=leU__w5VxX1vMK-kfuy-dvY97Pn8Mn80X2payVshirU,13562
19
21
  universal_mcp/applications/resend/app.py,sha256=bRo-CRDuk65EUSHOJnbVHWV6TuiUHtedz6FXKRS1ym0,1386
20
22
  universal_mcp/applications/serp/app.py,sha256=hPXu1sBiRZRCCzr4q2uvt54F0-B3aZK2Uz4wfKokkZ4,3131
@@ -23,18 +25,18 @@ universal_mcp/applications/zenquotes/app.py,sha256=nidRGwVORIU25QGCCbjDIv1UNFUj5
23
25
  universal_mcp/integrations/README.md,sha256=lTAPXO2nivcBe1q7JT6PRa6v9Ns_ZersQMIdw-nmwEA,996
24
26
  universal_mcp/integrations/__init__.py,sha256=8e11JZyctaR9CmlNkfEZ6HhGDvhlvf9iug2wdjb5pwY,270
25
27
  universal_mcp/integrations/agentr.py,sha256=l0mo79oeDML19udFfoCo9lyhbDAf0X94_lnpOgbTrb0,3331
26
- universal_mcp/integrations/integration.py,sha256=zMrSoubzdmJLYr-SKSDMBLWOwIG4-g0l5UEu3xmzsjY,5622
28
+ universal_mcp/integrations/integration.py,sha256=8TYr7N1F6oV8PPOSLo0eA_6nD-vrwIWbuplqwD03uuQ,5819
27
29
  universal_mcp/servers/__init__.py,sha256=dgRW_khG537GeLKC5_U5jhxCuu1L_1YeTujeDg0601E,654
28
- universal_mcp/servers/server.py,sha256=tSbHfFVqsksMIrMcKDPiJdBZYhrpsx3QXyEuvBnUAU0,5893
30
+ universal_mcp/servers/server.py,sha256=uHArnw_kYIhvlE-Zp5GharGqapGy4jaOlxRQGsOafPM,6431
29
31
  universal_mcp/stores/__init__.py,sha256=Sc4AWtee_qtK5hpEVUAH2XM_6EBhcfikQXWiGXdNfes,560
30
32
  universal_mcp/stores/store.py,sha256=CNOnmKeOCkSU2ZA9t12AIWJcmqZZX_LSyZaV8FQf8Xk,4545
31
33
  universal_mcp/utils/__init__.py,sha256=8wi4PGWu-SrFjNJ8U7fr2iFJ1ktqlDmSKj1xYd7KSDc,41
32
34
  universal_mcp/utils/api_generator.py,sha256=-wRBpLVfJQXy1R-8FpDNs6b8_eeekVDuPc_uwjSGgiY,8883
33
35
  universal_mcp/utils/bridge.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- universal_mcp/utils/docgen.py,sha256=UUjiRcIeb96xbogF96Ujzw3Hdd5ExckOao5rzIpRsBQ,12651
35
- universal_mcp/utils/installation.py,sha256=nyuQDl8S6KftjukCOKE4vtiqSzpVO7M5U-W00ivp444,2939
36
- universal_mcp/utils/openapi.py,sha256=XhCqWI4pUWX9s_-WNPx03EBboe6CjYUaFip1OqZWRRQ,12926
37
- universal_mcp-0.1.2.dist-info/METADATA,sha256=fGQ1eC4wBti2_acIAMjXlQNmzQ26b8DIktE-uM5Ij6Q,5931
38
- universal_mcp-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- universal_mcp-0.1.2.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
40
- universal_mcp-0.1.2.dist-info/RECORD,,
36
+ universal_mcp/utils/docgen.py,sha256=yK6Ijo8G-wHPU3E1AnFpnXS9vXt2j9FM77w0etTaNOA,12639
37
+ universal_mcp/utils/installation.py,sha256=uSL_H76fG_7yN4QNxkfp1mEF_00iAPyiXqtdWEMVJe8,3747
38
+ universal_mcp/utils/openapi.py,sha256=ud_ZB7_60BcS1Vao7ESKDqo0gry9JN5wzy-CFssrjm8,13140
39
+ universal_mcp-0.1.3.dist-info/METADATA,sha256=1blYv4-_qPtDW-iJnLf12SNjjvFMMtkHNq2qQk0ro3I,10798
40
+ universal_mcp-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ universal_mcp-0.1.3.dist-info/entry_points.txt,sha256=QlBrVKmA2jIM0q-C-3TQMNJTTWOsOFQvgedBq2rZTS8,56
42
+ universal_mcp-0.1.3.dist-info/RECORD,,
@@ -1,208 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: universal-mcp
3
- Version: 0.1.2
4
- Summary: Universal MCP acts as a middle ware for your API applications. It can store your credentials, authorize, enable disable apps on the fly and much more.
5
- Author-email: Manoj Bajaj <manojbajaj95@gmail.com>
6
- Requires-Python: >=3.11
7
- Requires-Dist: keyring>=25.6.0
8
- Requires-Dist: litellm>=1.30.7
9
- Requires-Dist: loguru>=0.7.3
10
- Requires-Dist: markitdown[all]>=0.1.1
11
- Requires-Dist: mcp>=1.5.0
12
- Requires-Dist: pydantic-settings>=2.8.1
13
- Requires-Dist: pydantic>=2.11.1
14
- Requires-Dist: pyyaml>=6.0.2
15
- Requires-Dist: typer>=0.15.2
16
- Provides-Extra: dev
17
- Requires-Dist: litellm>=1.30.7; extra == 'dev'
18
- Requires-Dist: pyright>=1.1.398; extra == 'dev'
19
- Requires-Dist: pytest-asyncio>=0.26.0; extra == 'dev'
20
- Requires-Dist: pytest>=8.3.5; extra == 'dev'
21
- Requires-Dist: ruff>=0.11.4; extra == 'dev'
22
- Provides-Extra: e2b
23
- Requires-Dist: e2b-code-interpreter>=1.2.0; extra == 'e2b'
24
- Provides-Extra: firecrawl
25
- Requires-Dist: firecrawl-py>=1.15.0; extra == 'firecrawl'
26
- Provides-Extra: playground
27
- Requires-Dist: fastapi[standard]>=0.115.12; extra == 'playground'
28
- Requires-Dist: langchain-anthropic>=0.3.10; extra == 'playground'
29
- Requires-Dist: langchain-mcp-adapters>=0.0.3; extra == 'playground'
30
- Requires-Dist: langchain-openai>=0.3.12; extra == 'playground'
31
- Requires-Dist: langgraph-checkpoint-sqlite>=2.0.6; extra == 'playground'
32
- Requires-Dist: langgraph>=0.3.24; extra == 'playground'
33
- Requires-Dist: python-dotenv>=1.0.1; extra == 'playground'
34
- Requires-Dist: streamlit>=1.44.1; extra == 'playground'
35
- Provides-Extra: serpapi
36
- Requires-Dist: google-search-results>=2.4.2; extra == 'serpapi'
37
- Description-Content-Type: text/markdown
38
-
39
- # Universal MCP
40
-
41
- Universal MCP acts as a middle ware for your API applications. It can store your credentials, authorize, enable disable apps on the fly and much more.
42
-
43
-
44
- ## 🌟 Features
45
-
46
- - **MCP (Model Context Protocol) Integration**: Seamlessly works with MCP server architecture
47
- - **Simplified API Integration**: Connect to services like GitHub, Google Calendar, Gmail, Reddit, Tavily, and more with minimal code
48
- - **Managed Authentication**: Built-in support for API keys and OAuth-based authentication flows
49
- - **Extensible Architecture**: Easily build and add new app integrations with minimal boilerplate
50
- - **Credential Management**: Flexible storage options for API credentials with memory and environment-based implementations
51
-
52
- ## 🔧 Installation
53
-
54
- Install AgentR using pip:
55
-
56
- ```bash
57
- pip install universal-mcp
58
- ```
59
-
60
- ## 🚀 Quick Start
61
-
62
- ### 1. Get an API Key
63
- Before using AgentR with services that require authorization (like GitHub, Gmail, etc.), you'll need an AgentR API key:
64
-
65
- Visit https://agentr.dev to create an account
66
- Generate an API key from your dashboard
67
- Set it as an environment variable or include it directly in your code:
68
-
69
- ```bash
70
- export AGENTR_API_KEY="your_api_key_here"
71
- ```
72
-
73
- ### 2. Create a basic server
74
-
75
- ```bash
76
- from agentr.server import TestServer
77
-
78
- # Define your applications list
79
- apps_list = [
80
- {
81
- "name": "tavily",
82
- "integration": {
83
- "name": "tavily_api_key",
84
- "type": "api_key",
85
- "store": {
86
- "type": "environment",
87
- }
88
- },
89
- },
90
- {
91
- "name": "zenquotes",
92
- "integration": None
93
- },
94
- {
95
- "name": "github",
96
- "integration": {
97
- "name": "github",
98
- "type": "agentr",
99
- }
100
- }
101
- ]
102
-
103
- # Create a server with these applications
104
- server = TestServer(name="My Agent Server", description="A server for my agent apps", apps_list=apps_list)
105
-
106
- # Run the server
107
- if __name__ == "__main__":
108
- server.run()
109
- ```
110
-
111
- ## Using Playground
112
-
113
- Start MCP Server
114
- ```bash
115
- universal_mcp run -t sse
116
- ```
117
-
118
- Start FastAPI app
119
- ```bash
120
- fastapi run src/playground
121
- ```
122
-
123
- Start Frontend
124
- ```bash
125
- streamlit run src/playground/streamlit.py
126
- ```
127
-
128
-
129
- ## 🧩 Available Applications
130
- AgentR comes with several pre-built applications:
131
-
132
- | Application | Description | Authentication Type |
133
- |-------------|-------------|---------------------|
134
- | GitHub | Star repositories and more | OAuth (AgentR) |
135
- | Google Calendar | Retrieve calendar events | OAuth (AgentR) |
136
- | Gmail | Send emails | OAuth (AgentR) |
137
- | Reddit | Access Reddit data | OAuth (AgentR) |
138
- | Resend | Send emails via Resend API | API Key |
139
- | Tavily | Web search capabilities | API Key |
140
- | ZenQuotes | Get inspirational quotes | None |
141
-
142
- > **Note**: More applications are coming soon! Stay tuned for updates to our application catalog.
143
-
144
- ## 🔐 Integration Types
145
- AgentR supports two primary integration types:
146
-
147
- ### 1. API Key Integration
148
- For services that authenticate via API keys:
149
- ```python
150
- {
151
- "name": "service_name",
152
- "integration": {
153
- "name": "service_api_key",
154
- "type": "api_key",
155
- "store": {
156
- "type": "environment", # or "memory"
157
- }
158
- }
159
- }
160
- ```
161
-
162
- ### 2. OAuth Integration (via AgentR)
163
- For services requiring OAuth flow:
164
- ```python
165
- {
166
- "name": "service_name",
167
- "integration": {
168
- "name": "service_name",
169
- "type": "agentr"
170
- }
171
- }
172
- ```
173
- When using OAuth integrations, users will be directed to authenticate with the service provider through a secure flow managed by AgentR.
174
-
175
- ## 🤖 CLI Usage
176
- AgentR includes a command-line interface for common operations:
177
-
178
- ```bash
179
- # Get version information
180
- agentr version
181
-
182
- # Generate API client from OpenAPI schema
183
-
184
- # Use the name of the API as the output filename (e.g., twitter, petstore, github)
185
- universal_mcp generate --schema petstore.json --output outputfilename
186
-
187
- # The tool will create src/universal_mcp/applications/petstore/ with app.py and README.md
188
-
189
- # Run the test server
190
- agentr run
191
-
192
- # Install AgentR for specific applications
193
- agentr install claude
194
- ```
195
-
196
- ## 📋 Requirements
197
-
198
- - Python 3.11+
199
- - Dependencies (automatically installed):
200
- - loguru >= 0.7.3
201
- - mcp >= 1.5.0
202
- - pyyaml >= 6.0.2
203
- - typer >= 0.15.2
204
-
205
-
206
- ## 📝 License
207
-
208
- This project is licensed under the MIT License.