
research mcp client
๐ค AI Research Assistant - Claude chatbot with MCP integration for paper search, analysis, and academic discovery
Repository Info
About This Server
๐ค AI Research Assistant - Claude chatbot with MCP integration for paper search, analysis, and academic discovery
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
๐ค Multi-Server AI Assistant
A Claude AI chatbot with advanced MCP (Model Context Protocol) integration that connects to multiple servers simultaneously for enhanced research, analysis, and productivity capabilities.
โจ Features
- ๐ค Interactive Chat Interface - Natural conversation with Claude AI
- ๐ง Multi-Server MCP Integration - Connect to multiple MCP servers simultaneously
- ๐ Research & Analysis - Search arXiv, analyze papers, and access academic resources
- ๐๏ธ File System Access - Read, write, and manage files through MCP servers
- ๐ Web Content Fetching - Fetch and analyze web content with HTTP requests
- ๐๏ธ Database Operations - Query and manage databases via MCP tools
- ๐ Prompt Templates - Execute predefined prompts with custom arguments
- ๐ Resource Access - Access structured resources from MCP servers
- ๐ฏ Intelligent Tool Selection - Claude automatically chooses the best tools for each task
- โก Async Performance - Fast, responsive interactions across all servers
- ๐ก๏ธ Robust Error Handling - Graceful handling of server failures and tool errors
- ๐ Dynamic Configuration - Easy server management through JSON configuration
๐ Related Projects
- research-mcp-server - Academic research tools for arXiv integration
- MCP Official Servers - Collection of official MCP server implementations
๐ Prerequisites
- Python 3.10+
- UV package manager (Installation guide)
- Anthropic API key (Get one here)
- One or more MCP servers - See Configuration for setup options
๐ Quick Start
1. Clone the Repository
git clone https://github.com/spalit2025/research-mcp-client.git
cd research-mcp-client
2. Install Dependencies
uv sync
3. Set Up Environment Variables
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
4. Configure MCP Servers
cp server_config.example.json server_config.json
# Edit server_config.json to configure your MCP servers
5. Run the Chatbot
uv run mcp_chatbot.py
๐ฌ Usage Examples
The chatbot can now handle diverse tasks across multiple domains:
Research & Academic
๐ Query: Search for papers about machine learning transformers
๐ Query: Extract information from paper ID 2301.07041
๐ Query: Find recent papers on quantum computing
Web Content & Information Fetching
๐ Query: Fetch the content from https://arxiv.org/abs/2301.07041
๐ Query: Get the latest news from a technology website
๐ Query: Fetch and summarize content from a research blog
File Operations
๐ Query: Read the contents of my project README
๐ Query: Create a summary document from these files
๐ Query: List all Python files in the current directory
๐ Query: Show me the directory structure of my project
Combined Operations
๐ Query: Search for AI papers, fetch their abstracts, and save to a file
๐ Query: Read my research notes and find related papers on arXiv
๐ Query: Fetch web content and save it to a local file for analysis
Special Commands
# Resource Access
@folders # List available research folders
@machine_learning # Access ML papers resource
# Prompt Templates
/prompts # List all available prompt templates
/prompt generate_search_prompt topic=AI # Execute prompt with arguments
/prompt fetch url=https://example.com # Execute fetch prompt
Commands
- Type your queries naturally - Claude will choose the appropriate tools
- Use
quit,exit, orqto exit - Press
Ctrl+Cto interrupt
๐๏ธ Project Structure
research-mcp-client/
โโโ mcp_chatbot.py # Main multi-server chatbot application
โโโ server_config.json # Your MCP server configurations
โโโ server_config.example.json # Example server configurations
โโโ pyproject.toml # Project dependencies
โโโ .env.example # Environment variables template
โโโ .env # Your API key (create from .env.example)
โโโ README.md # This file
โโโ .venv/ # Virtual environment (created by uv)
๐ง How It Works
- Configuration Loading - Reads server configurations from
server_config.json - Multi-Server Connection - Establishes connections to all configured MCP servers
- Capability Discovery - Automatically discovers tools, prompts, and resources from all servers
- Query Processing - User queries are processed by Claude AI with access to all available capabilities
- Intelligent Routing - Claude selects the appropriate server and capability for each task
- Special Commands - Handle resource access (
@) and prompt execution (/) commands - Response Integration - Results from multiple tools are seamlessly integrated into responses
๐ ๏ธ Configuration
Server Configuration File
Create a server_config.json file to define your MCP servers:
{
"mcpServers": {
"research-server": {
"command": "python",
"args": ["/path/to/research-mcp-server/research_server.py"],
"env": null
},
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": null
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/directory"],
"env": null
},
"web-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-api-key-here"
}
},
"database": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sqlite", "/path/to/database.db"],
"env": null
}
}
}
Available MCP Servers
Popular MCP servers you can integrate:
- Research Server - Academic paper search and analysis (custom implementation)
- Fetch Server - Web content fetching and HTTP requests (
uvx mcp-server-fetch) - Filesystem Server - File and directory operations (
npx @modelcontextprotocol/server-filesystem) - Brave Search - Web search capabilities (
npx @modelcontextprotocol/server-brave-search) - SQLite Server - Database query and management (
npx @modelcontextprotocol/server-sqlite) - Git Server - Git repository operations
- Slack Server - Slack integration and messaging
- Google Drive Server - Google Drive file access
Current Working Configuration
The project includes a working configuration with these servers:
-
Research Server (2 tools, 1 prompt, 1 resource)
- Tools:
search_papers,extract_info- Search and analyze arXiv papers - Prompts:
generate_search_prompt- Generate academic search prompts - Resources:
papers://folders- Access research paper folders
- Tools:
-
Fetch Server (1 tool, 1 prompt)
- Tools:
fetch- Fetch web content and convert to markdown - Prompts:
fetch- Execute URL fetching with prompt templates
- Tools:
-
Filesystem Server (11 tools)
read_file,write_file,edit_file- File operationslist_directory,directory_tree- Directory browsingcreate_directory,move_file- File managementsearch_files,get_file_info- File discoveryread_multiple_files,list_allowed_directories- Batch operations
Total: 14 tools, 2 prompts, 1 resource across 3 servers
Environment Variables
Required environment variables in .env:
ANTHROPIC_API_KEY- Your Anthropic API key
Optional environment variables for specific servers:
BRAVE_API_KEY- For Brave search functionalityGOOGLE_APPLICATION_CREDENTIALS- For Google services- Other API keys as required by your chosen servers
๐ฏ Enhanced Interface
The chatbot now supports advanced MCP capabilities beyond just tools:
Special Command Syntax
@<resource>- Access MCP resources directly@folders- List available research folders@machine_learning- Access specific topic resources
/prompts- List all available prompt templates/prompt <name> <args>- Execute prompt templates with arguments/prompt generate_search_prompt topic=AI- Generate AI research prompts/prompt fetch url=https://example.com- Execute fetch with prompts
Startup Information
When you start the chatbot, you'll see:
- ๐ ๏ธ Available tools from all connected servers
- ๐ Available prompts for template-based queries
- ๐ Available resources for structured data access
- ๐ก Special commands help and syntax guide
Interactive Features
- Natural language queries - Ask anything, Claude chooses the right tools
- Multi-step workflows - Combine tools across different servers
- Resource exploration - Browse and access structured data
- Template execution - Use predefined prompts with custom parameters
๐ Troubleshooting
Configuration Issues
- โ
Ensure
server_config.jsonexists and is valid JSON - โ Check that all server paths and commands are correct
- โ Verify required environment variables are set
Connection Issues
- โ Test each server independently before adding to configuration
- โ Check server dependencies are installed (Node.js for npx servers)
- โ Verify file paths and permissions
API Issues
- โ
Verify your
ANTHROPIC_API_KEYis set correctly in.env - โ Ensure you have sufficient API credits
- โ Check your internet connection for web-based servers
Tool Errors
- โ Check individual server logs for detailed error information
- โ Verify tool arguments match expected schemas
- โ Ensure all required API keys are configured
Common Solutions
# Reinstall dependencies
uv sync
# Test server configuration
python -c "import json; print(json.load(open('server_config.json')))"
# Check individual server
npx @modelcontextprotocol/inspector python /path/to/server.py
# Verify API key
echo $ANTHROPIC_API_KEY
๐ Development
Adding New Servers
- Install the MCP server following its documentation
- Add server configuration to
server_config.json - Test the server independently
- Restart the chatbot to discover new tools
Making Changes
- Edit
mcp_chatbot.pyfor core functionality - Update
server_config.jsonfor server configurations - Update
pyproject.tomlfor dependencies - Test with your configured servers
- Update documentation as needed
Server Development
- The chatbot automatically discovers new tools from any server
- No client-side changes needed when server tools are updated
- Focus on improving the chat interface and error handling
- Consider server-specific error handling for better user experience
๐ฆ Dependencies
- anthropic - Claude AI API client
- mcp - Model Context Protocol implementation
- python-dotenv - Environment variable management
- nest-asyncio - Async support for interactive environments
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and test with multiple servers
- Ensure configuration examples are updated
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ Acknowledgments
- Anthropic for Claude AI
- Model Context Protocol for the excellent framework
- MCP Community for server implementations
- arXiv for providing access to research papers
๐ Support
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Review your
server_config.jsonconfiguration - Test individual servers with MCP Inspector
- Look at existing Issues
- Create a new issue with detailed information about your problem
Happy exploring with multiple MCP servers! ๐โจ
Quick Start
Clone the repository
git clone https://github.com/spalit2025/research-mcp-clientInstall dependencies
cd research-mcp-client
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.