@@ -69,8 +69,9 @@ researcher = GPTResearcher(
69
69
query = " How does React's useState hook work?" ,
70
70
mcp_configs = [
71
71
{
72
- " server_command" : " npx" ,
73
- " server_args" : [" -y" , " @modelcontextprotocol/server-github" ],
72
+ " name" : " github_api"
73
+ " command" : " npx" ,
74
+ " args" : [" -y" , " @modelcontextprotocol/server-github" ],
74
75
" env" : {" GITHUB_TOKEN" : os.getenv(" GITHUB_TOKEN" )}
75
76
}
76
77
]
@@ -86,15 +87,15 @@ Each MCP configuration dictionary supports these keys:
86
87
87
88
| Key | Description | Example | Required |
88
89
| -----| -------------| ---------| ----------|
89
- | ` server_name ` | Identifier for the MCP server | ` "github" ` | No |
90
- | ` server_command ` | Command to start the server | ` "python" ` | Yes* |
91
- | ` server_args ` | Arguments for the server command | ` ["-m", "my_server"] ` | No |
90
+ | ` name ` | Identifier for the MCP server | ` "github" ` | No |
91
+ | ` command ` | Command to start the server | ` "python" ` | Yes* |
92
+ | ` args ` | Arguments for the server command | ` ["-m", "my_server"] ` | No |
92
93
| ` env ` | Environment variables for the server | ` {"API_KEY": "key"} ` | No |
93
94
| ` connection_url ` | URL for remote connections | ` "wss://api.example.com" ` | Yes* |
94
95
| ` connection_type ` | Connection type (auto-detected) | ` "websocket" ` | No |
95
96
| ` connection_token ` | Authentication token | ` "bearer_token" ` | No |
96
97
97
- * Either ` server_command ` (for local servers) or ` connection_url ` (for remote servers) is required.
98
+ * Either ` command ` (for local servers) or ` connection_url ` (for remote servers) is required.
98
99
99
100
## Examples
100
101
@@ -113,9 +114,9 @@ researcher = GPTResearcher(
113
114
query = " What are the latest updates in the NBA playoffs?" ,
114
115
mcp_configs = [
115
116
{
116
- " server_name " : " tavily" ,
117
- " server_command " : " npx" ,
118
- " server_args " : [
" -y" ,
" [email protected] " ],
117
+ " name " : " tavily" ,
118
+ " command " : " npx" ,
119
+ " args " : [
" -y" ,
" [email protected] " ],
119
120
" env" : {
120
121
" TAVILY_API_KEY" : os.getenv(" TAVILY_API_KEY" )
121
122
}
@@ -139,9 +140,9 @@ researcher = GPTResearcher(
139
140
query = " What are the key features and implementation of React's useState hook? How has it evolved in recent versions?" ,
140
141
mcp_configs = [
141
142
{
142
- " server_name " : " github" ,
143
- " server_command " : " npx" ,
144
- " server_args " : [" -y" , " @modelcontextprotocol/server-github" ],
143
+ " name " : " github" ,
144
+ " command " : " npx" ,
145
+ " args " : [" -y" , " @modelcontextprotocol/server-github" ],
145
146
" env" : {
146
147
" GITHUB_PERSONAL_ACCESS_TOKEN" : os.getenv(" GITHUB_PERSONAL_ACCESS_TOKEN" )
147
148
}
@@ -162,9 +163,9 @@ researcher = GPTResearcher(
162
163
query = " Analyze the latest developments in quantum error correction algorithms" ,
163
164
mcp_configs = [
164
165
{
165
- " server_name " : " quantum_research" ,
166
- " server_command " : " python" ,
167
- " server_args " : [" quantum_mcp_server.py" ],
166
+ " name " : " quantum_research" ,
167
+ " command " : " python" ,
168
+ " args " : [" quantum_mcp_server.py" ],
168
169
" env" : {
169
170
" ARXIV_API_KEY" : os.getenv(" ARXIV_API_KEY" ),
170
171
" RESEARCH_DB_PATH" : " /path/to/quantum_papers.db"
@@ -191,37 +192,37 @@ researcher = GPTResearcher(
191
192
mcp_configs = [
192
193
# Financial data and stock analysis
193
194
{
194
- " server_name " : " financial_data" ,
195
- " server_command " : " python" ,
196
- " server_args " : [" financial_mcp_server.py" ],
195
+ " name " : " financial_data" ,
196
+ " command " : " python" ,
197
+ " args " : [" financial_mcp_server.py" ],
197
198
" env" : {
198
199
" ALPHA_VANTAGE_KEY" : os.getenv(" ALPHA_VANTAGE_KEY" ),
199
200
" YAHOO_FINANCE_KEY" : os.getenv(" YAHOO_FINANCE_KEY" )
200
201
}
201
202
},
202
203
# News and market sentiment
203
204
{
204
- " server_name " : " news_research" ,
205
- " server_command " : " npx" ,
206
- " server_args " : [
" -y" ,
" [email protected] " ],
205
+ " name " : " news_research" ,
206
+ " command " : " npx" ,
207
+ " args " : [
" -y" ,
" [email protected] " ],
207
208
" env" : {
208
209
" TAVILY_API_KEY" : os.getenv(" TAVILY_API_KEY" )
209
210
}
210
211
},
211
212
# Technical innovations and patents
212
213
{
213
- " server_name " : " github_research" ,
214
- " server_command " : " npx" ,
215
- " server_args " : [" -y" , " @modelcontextprotocol/server-github" ],
214
+ " name " : " github_research" ,
215
+ " command " : " npx" ,
216
+ " args " : [" -y" , " @modelcontextprotocol/server-github" ],
216
217
" env" : {
217
218
" GITHUB_PERSONAL_ACCESS_TOKEN" : os.getenv(" GITHUB_PERSONAL_ACCESS_TOKEN" )
218
219
}
219
220
},
220
221
# Academic research and papers
221
222
{
222
- " server_name " : " academic_papers" ,
223
- " server_command " : " python" ,
224
- " server_args " : [" arxiv_mcp_server.py" ],
223
+ " name " : " academic_papers" ,
224
+ " command " : " python" ,
225
+ " args " : [" arxiv_mcp_server.py" ],
225
226
" env" : {
226
227
" ARXIV_API_KEY" : os.getenv(" ARXIV_API_KEY" )
227
228
}
@@ -256,26 +257,26 @@ researcher = GPTResearcher(
256
257
mcp_configs = [
257
258
# Web trends and consumer sentiment
258
259
{
259
- " server_name " : " web_trends" ,
260
- " server_command " : " npx" ,
261
- " server_args " : [
" -y" ,
" [email protected] " ],
260
+ " name " : " web_trends" ,
261
+ " command " : " npx" ,
262
+ " args " : [
" -y" ,
" [email protected] " ],
262
263
" env" : {" TAVILY_API_KEY" : os.getenv(" TAVILY_API_KEY" )}
263
264
},
264
265
# Social media analytics
265
266
{
266
- " server_name " : " social_analytics" ,
267
- " server_command " : " python" ,
268
- " server_args " : [" social_mcp_server.py" ],
267
+ " name " : " social_analytics" ,
268
+ " command " : " python" ,
269
+ " args " : [" social_mcp_server.py" ],
269
270
" env" : {
270
271
" TWITTER_BEARER_TOKEN" : os.getenv(" TWITTER_BEARER_TOKEN" ),
271
272
" INSTAGRAM_ACCESS_TOKEN" : os.getenv(" INSTAGRAM_ACCESS_TOKEN" )
272
273
}
273
274
},
274
275
# Patent and innovation research
275
276
{
276
- " server_name " : " patent_research" ,
277
- " server_command " : " python" ,
278
- " server_args " : [" patent_mcp_server.py" ],
277
+ " name " : " patent_research" ,
278
+ " command " : " python" ,
279
+ " args " : [" patent_mcp_server.py" ],
279
280
" env" : {" USPTO_API_KEY" : os.getenv(" USPTO_API_KEY" )}
280
281
}
281
282
]
@@ -292,7 +293,7 @@ researcher = GPTResearcher(
292
293
query = " Latest AI research papers on transformer architectures" ,
293
294
mcp_configs = [
294
295
{
295
- " server_name " : " arxiv_api" ,
296
+ " name " : " arxiv_api" ,
296
297
" connection_url" : " wss://mcp.arxiv.org/ws" , # Auto-detects WebSocket
297
298
" connection_token" : os.getenv(" ARXIV_TOKEN" ),
298
299
}
@@ -315,9 +316,9 @@ researcher = GPTResearcher(
315
316
# MCP will be used alongside web search automatically
316
317
mcp_configs = [
317
318
{
318
- " server_name " : " github" ,
319
- " server_command " : " npx" ,
320
- " server_args " : [" -y" , " @modelcontextprotocol/server-github" ],
319
+ " name " : " github" ,
320
+ " command " : " npx" ,
321
+ " args " : [" -y" , " @modelcontextprotocol/server-github" ],
321
322
" env" : {" GITHUB_TOKEN" : os.getenv(" GITHUB_TOKEN" )}
322
323
}
323
324
]
@@ -351,18 +352,18 @@ async def main():
351
352
mcp_configs = [
352
353
# Code repositories and technical implementations
353
354
{
354
- " server_name " : " github" ,
355
- " server_command " : " npx" ,
356
- " server_args " : [" -y" , " @modelcontextprotocol/server-github" ],
355
+ " name " : " github" ,
356
+ " command " : " npx" ,
357
+ " args " : [" -y" , " @modelcontextprotocol/server-github" ],
357
358
" env" : {
358
359
" GITHUB_PERSONAL_ACCESS_TOKEN" : os.getenv(" GITHUB_PERSONAL_ACCESS_TOKEN" )
359
360
}
360
361
},
361
362
# Current news and industry reports
362
363
{
363
- " server_name " : " tavily" ,
364
- " server_command " : " npx" ,
365
- " server_args " : [
" -y" ,
" [email protected] " ],
364
+ " name " : " tavily" ,
365
+ " command " : " npx" ,
366
+ " args " : [
" -y" ,
" [email protected] " ],
366
367
" env" : {
367
368
" TAVILY_API_KEY" : os.getenv(" TAVILY_API_KEY" )
368
369
}
@@ -461,8 +462,8 @@ researcher = GPTResearcher(
461
462
query = " your query" ,
462
463
mcp_configs = [
463
464
{
464
- " server_command " : " python" ,
465
- " server_args " : [" multi_tool_server.py" ]
465
+ " command " : " python" ,
466
+ " args " : [" multi_tool_server.py" ]
466
467
# AI will choose the best tool automatically
467
468
}
468
469
]
@@ -481,7 +482,7 @@ GPT Researcher automatically detects connection types:
481
482
{" connection_url" : " https://api.example.com/mcp" }
482
483
483
484
# Stdio (default when no URL provided)
484
- {" server_command " : " python" , " server_args " : [" server.py" ]}
485
+ {" command " : " python" , " args " : [" server.py" ]}
485
486
```
486
487
487
488
## Troubleshooting
@@ -545,9 +546,9 @@ researcher = GPTResearcher(
545
546
query = " test query" ,
546
547
mcp_configs = [
547
548
{
548
- " server_name " : " test" ,
549
- " server_command " : " echo" ,
550
- " server_args " : [" hello world" ]
549
+ " name " : " test" ,
550
+ " command " : " echo" ,
551
+ " args " : [" hello world" ]
551
552
}
552
553
]
553
554
)
0 commit comments