A Model Context Protocol (MCP) server that provides statistical analysis, decision-making, and logical reasoning tools.
- Node.js >= 20.0.0
- EXA_API_KEY environment variable (for research features)
npm install
npm run build
# Build the Docker image
docker build -t analytical-mcp .
# Run with environment variables
docker run -d \
--name analytical-mcp \
-e EXA_API_KEY=your_api_key_here \
-v $(pwd)/cache:/app/cache \
analytical-mcp
# Or use docker-compose
cp .env.example .env
# Edit .env with your API key
docker-compose up -d
- Copy
.env.example
to.env
- Add your EXA_API_KEY to
.env
- Add to Claude Desktop configuration:
{
"mcpServers": {
"analytical": {
"command": "node",
"args": ["/path/to/analytical-mcp/build/index.js"],
"env": {
"EXA_API_KEY": "your-exa-api-key-here"
}
}
}
}
- Copy
.env.example
to.env
- Add your EXA_API_KEY to
.env
- Add to Claude Desktop configuration:
{
"mcpServers": {
"analytical": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env-file", ".env",
"-v", "$(pwd)/cache:/app/cache",
"analytical-mcp"
]
}
}
}
analytical:analyze_dataset
- Statistical analysis of datasetsanalytical:advanced_regression_analysis
- Linear, polynomial, and logistic regressionanalytical:hypothesis_testing
- Statistical hypothesis testing (t-tests, chi-square, ANOVA)analytical:data_visualization_generator
- Generate data visualization specifications
analytical:decision_analysis
- Multi-criteria decision analysis with weighted scoring
analytical:logical_argument_analyzer
- Analyze argument structure and validityanalytical:logical_fallacy_detector
- Detect logical fallacies in textanalytical:perspective_shifter
- Generate alternative perspectives on problems
analytical:verify_research
- Cross-verify research claims from multiple sources
{
"data": [23, 45, 67, 12, 89, 34, 56, 78],
"analysisType": "stats"
}
{
"options": ["Option A", "Option B", "Option C"],
"criteria": ["Cost", "Quality", "Speed"],
"weights": [0.4, 0.4, 0.2]
}
{
"argument": "All birds can fly. Penguins are birds. Therefore, penguins can fly.",
"analysisDepth": "comprehensive"
}
# Run all tests
./tools/test-runner.sh
# Run specific test suite
./tools/test-runner.sh integration
# Available test suites: api-keys, server, integration, research, data-pipeline
npm run build
- Build TypeScript to JavaScriptnpm run watch
- Watch for changes and rebuildnpm run test
- Run Jest testsnpm run inspector
- Start MCP inspector for debugging
analytical-mcp/
├── src/
│ ├── tools/ # MCP tool implementations
│ ├── utils/ # Utility functions
│ └── index.ts # Main server entry point
├── docs/ # Documentation
├── tools/ # Development and testing scripts
└── examples/ # Usage examples
- Descriptive statistics (mean, median, standard deviation, quartiles)
- Correlation analysis
- Regression analysis (linear, polynomial, logistic)
- Hypothesis testing (t-tests, chi-square, ANOVA)
- Multi-criteria decision analysis
- Weighted scoring systems
- Trade-off analysis
- Risk assessment
- Argument structure analysis
- Fallacy detection
- Perspective generation
- Critical thinking support
- Multi-source verification
- Fact extraction
- Consistency checking
- Research validation
- Processing is done locally
- Research features use Exa API (optional)
- No data is stored permanently
- Configurable caching with local-only storage
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/feature-name
) - Commit your changes (
git commit -m 'Add feature description'
) - Push to the branch (
git push origin feature/feature-name
) - Open a Pull Request
For detailed contribution guidelines, see docs/DEVELOPMENT.md.
JSON parsing errors: Ensure all logging goes to stderr, not stdout. The MCP protocol uses stdout for communication.
Tools not appearing: Verify the server is properly configured in Claude Desktop and restart the application.
Research features disabled: Check that EXA_API_KEY is set in your environment configuration.
Console output issues: The project uses a Logger class for all output. Utility scripts in the tools/ directory integrate with the Logger system for consistent formatting.
Start the server with the MCP inspector:
npm run inspector