{"id":"ca6924f4-205c-4fd6-a30e-b8bbce087ccc","slug":"polymath","kind":"mcp","name":"polymath","summary":"A Polymathic Research Intelligence System - Cross-domain literature search with 807K+ items","owner":"vanbelkummax","repoUrl":"https://github.com/vanbelkummax/polymath","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-01-06T18:59:04.000Z","addedAt":"2026-10-21T08:14:00.198Z","logoUrl":"https://avatars.githubusercontent.com/u/221433886?u=74fce4cbea75cfa014c15e1b2438adb268b55931&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["search","databases","memory-knowledge"],"tags":["bioinformatics","chromadb","knowledge-graph","literature-review","neo4j","rag","research","semantic-search"],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-27T23:05:06.875Z","sample":false,"url":"https://conduits.dev/tools/polymath","language":"Python","transports":["stdio"],"install":{"pypi":"polymax"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Polymath\r\n\r\n**A Polymathic Research Intelligence System**\r\n\r\nPolymath is a self-growing research intelligence system designed for polymathic discovery—finding unexpected connections across disparate scientific domains. Unlike traditional literature databases that organize knowledge in silos, Polymath explicitly models **cross-domain bridges**: the fertile intersections where spatial transcriptomics meets information theory, where thermodynamics informs deep learning, where cybernetics illuminates biological systems.\r\n\r\n## Key Features\r\n\r\n- **807K+ Searchable Items**: 395K paper passages + 411K code chunks\r\n- **Cross-Domain Concept Graph**: 222 concepts linked across 31K+ papers\r\n- **Hybrid Search**: Combines semantic (ChromaDB), lexical (Postgres FTS), and graph (Neo4j) search\r\n- **Evidence-Bound Citations**: Claims traced to page-level source text\r\n- **Self-Improving**: Identifies coverage gaps and proposes expansions\r\n\r\n## Architecture\r\n\r\n```\r\n┌─────────────────────────────────────────────────────┐\r\n│                    USER QUERY                        │\r\n└─────────────────────┬───────────────────────────────┘\r\n                      │\r\n                      ▼\r\n┌─────────────────────────────────────────────────────┐\r\n│           HYBRID SEARCH (RRF Fusion)                │\r\n└─────────────────────┬───────────────────────────────┘\r\n                      │\r\n        ┌─────────────┼─────────────┐\r\n        ▼             ▼             ▼\r\n┌─────────────┐ ┌──────────┐ ┌────────────┐\r\n│  ChromaDB   │ │ Postgres │ │   Neo4j    │\r\n│  807K vecs  │ │  (FTS)   │ │  (graph)   │\r\n│  2 colls    │ │  SoR     │ │ 32K nodes  │\r\n└─────────────┘ └──────────┘ └────────────┘\r\n```\r\n\r\n## Installation\r\n\r\n### Prerequisites\r\n\r\n- Python 3.10+\r\n- PostgreSQL 14+\r\n- Neo4j 5.x\r\n- CUDA-capable GPU (recommended for embeddings)\r\n\r\n### Setup\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/vanbelkummax/polymath.git\r\ncd polymath\r\n\r\n# Create virtual environment\r\npython -m venv venv\r\nsource venv/bin/activate\r\n\r\n# Install dependencies\r\npip install -e .\r\n\r\n# Copy and configure environment\r\ncp .env.example .env\r\n# Edit .env with your database credentials\r\n\r\n# Initialize databases\r\npython scripts/init_databases.py\r\n```\r\n\r\n### Database Setup\r\n\r\n#### PostgreSQL\r\n```bash\r\ncreatedb polymath\r\npsql -d polymath -f schema/postgres_schema.sql\r\n```\r\n\r\n#### Neo4j\r\n```bash\r\n# Start Neo4j and set password\r\nneo4j start\r\ncypher-shell -u neo4j -p neo4j \"ALTER CURRENT USER SET PASSWORD FROM 'neo4j' TO 'your_password'\"\r\n```\r\n\r\n#### ChromaDB\r\nChromaDB is file-based and will be created automatically on first run.\r\n\r\n## Quick Start\r\n\r\n### Search Papers\r\n```python\r\nfrom lib.hybrid_search_v2 import HybridSearcherV2\r\n\r\nhs = HybridSearcherV2()\r\n\r\n# Semantic search\r\nresults = hs.search_papers(\"attention mechanism in pathology\", n=10)\r\n\r\n# With filters\r\nresults = hs.search_papers(\r\n    \"spatial transcriptomics\",\r\n    n=10,\r\n    year_min=2023,\r\n    concepts=[\"transformer\"]\r\n)\r\n```\r\n\r\n### Search Code\r\n```python\r\n# Find implementations\r\nresults = hs.search_code(\r\n    \"multiple instance learning\",\r\n    n=10,\r\n    org_filter=\"mahmoodlab\",\r\n    language=\"python\"\r\n)\r\n```\r\n\r\n### Hybrid Search (Papers + Code)\r\n```python\r\nresults = hs.hybrid_search(\r\n    \"predict gene expression from H&E\",\r\n    n=20,\r\n    rerank=True  # Cross-encoder reranking\r\n)\r\n```\r\n\r\n### CLI\r\n```bash\r\n# System stats\r\npython polymath_cli.py stats\r\n\r\n# Semantic search\r\npython polymath_cli.py search \"compressed sensing spatial transcriptomics\" -n 10\r\n\r\n# Neo4j graph query\r\npython polymath_cli.py graph \"MATCH (p:Paper)-[:MENTIONS]->(c:CONCEPT) RETURN c.name, count(p) ORDER BY count(p) DESC LIMIT 10\"\r\n\r\n# Generate hypotheses\r\npython polymath_cli.py hypothesis\r\n```\r\n\r\n## MCP Server Tools\r\n\r\nPolymath exposes tools via the Model Context Protocol (MCP):\r\n\r\n### Discovery Tools\r\n| Tool | Description |\r\n|------|-------------|\r\n| `deep_hunt` | Multi-source literature search |\r\n| `find_gaps` | Detect research gaps |\r\n| `trend_radar` | Analyze publication trends |\r\n| `find_datasets` | Hunt for datasets |\r\n\r\n### Reasoning Tools\r\n| Tool | Description |\r\n|------|-------------|\r\n| `generate_hypothesis` | Cross-domain hypothesis generation |\r\n| `validate_hypothesis` | Validate claims against corpus |\r\n| `find_analogy` | Find analogous solutions |\r\n| `serendipity` | Surface unexpected connections |\r\n\r\n### Self-Improvement Tools\r\n| Tool | Description |\r\n|------|-------------|\r\n| `collection_health` | Assess corpus health |\r\n| `expand_collection` | Propose expansion targets |\r\n\r\n## Ingestion\r\n\r\n### Papers\r\n```bash\r\n# Single PDF\r\npython lib/unified_ingest.py path/to/paper.pdf\r\n\r\n# Batch ingestion\r\npython lib/unified_ingest.py path/to/pdfs/ --move\r\n\r\n# With enhanced parsing\r\npython lib/unified_ingest.py paper.pdf --enhanced-parser\r\n```\r\n\r\n### Code Repositories\r\n```bash\r\n# Ingest a GitHub repo\r\npython lib/code_ingest.py https://github.com/org/repo\r\n\r\n# Batch ingest\r\npython scripts/ingest_github_batch.py\r\n```\r\n\r\n## Literature Sentry (Autonomous Curator)\r\n\r\n```bash\r\n# Full polymathic sweep\r\npython -m lib.sentry.cli \"spatial transcriptomics visium\" --max 15\r\n\r\n# GitHub only\r\npython -m lib.sentry.cli \"attention mechanism\" --source github --min-stars 100\r\n\r\n# Show paywalled items\r\npython -m lib.sentry.cli --show-tickets\r\n```\r\n\r\n## Project Structure\r\n\r\n```\r\npolymath/\r\n├── lib/                    # Core libraries\r\n│   ├── hybrid_search_v2.py # Hybrid search engine\r\n│   ├── evidence_extractor.py # NLI-based verification\r\n│   ├── code_ingest.py      # Code repository ingestion\r\n│   ├── unified_ingest.py   # Paper ingestion\r\n│   └── sentry/             # Literature Sentry\r\n├── mcp/                    # MCP servers\r\n│   └── polymath_v11/       # Main MCP server\r\n├── scripts/                # Utility scripts\r\n├── tests/                  # Integration tests\r\n├── docs/                   # Documentation\r\n├── schema/                 # Database schemas\r\n└── skills/                 # Skill definitions\r\n```\r\n\r\n## Cross-Domain Concepts\r\n\r\nPolymath automatically detects and links these concepts:\r\n\r\n**Signal Processing**: compressed_sensing, sparse_coding, wavelet, fourier\r\n**Physics**: entropy, free_energy, thermodynamics, diffusion\r\n**Causality**: causal_inference, counterfactual\r\n**Systems**: feedback, control_theory, emergence, cybernetics\r\n**Cognitive**: predictive_coding, bayesian, active_inference\r\n**ML/AI**: transformer, attention, contrastive_learning, graph_neural_network\r\n**Biology**: spatial_transcriptomics, single_cell, gene_expression\r\n\r\n## Testing\r\n\r\n```bash\r\n# Run integration tests\r\npytest tests/test_integration.py -v\r\n\r\n# Run all tests\r\npytest tests/ -v\r\n```\r\n\r\n## Configuration\r\n\r\n### Environment Variables\r\n\r\n| Variable | Description |\r\n|----------|-------------|\r\n| `POSTGRES_URL` | PostgreSQL connection string |\r\n| `NEO4J_URI` | Neo4j bolt URI |\r\n| `NEO4J_PASSWORD` | Neo4j password |\r\n| `CHROMADB_PATH` | Path to ChromaDB directory |\r\n| `BRAVE_API_KEY` | Brave Search API key (optional) |\r\n\r\n## Documentation\r\n\r\n- [User Manual](docs/POLYMATH_USER_MANUAL.md) - Comprehensive guide\r\n- [Academic Playbook](docs/ACADEMIC_PLAYBOOK.md) - Academic use cases and optimization guide\r\n- [Hackathon Playbook](docs/HACKATHON_PLAYBOOK.md) - Spatial multimodal hackathon workflow\r\n- [Literature Sentry Design](docs/plans/2026-01-04-literature-sentry-design.md)\r\n- [Code Ingestion Design](docs/plans/2026-01-05-code-repo-ingestion-design.md)\r\n\r\n## Author\r\n\r\n**Max Van Belkum**\r\n- Vanderbilt University\r\n- MD-PhD Student\r\n\r\n## License\r\n\r\nMIT License - See [LICENSE](LICENSE) for details.\r\n\r\n## Citation\r\n\r\nIf you use Polymath in your research, please cite:\r\n\r\n\r\n```\r\n\r\n---\r\n\r\n*\"The test of a first-rate intelligence is the ability to hold two opposed ideas in mind at the same time and still retain the ability to function.\"* — F. Scott Fitzgerald\r\n\r\n"}