MorphMind
No description available
Ask AI about MorphMind
Powered by Claude Β· Grounded in docs
I know everything about MorphMind. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MorphMind β Multimodal Memory Layer
This project helps you create and manage a local MCP (Model Context Protocol) server using Composio's 500+ integrations.
Prerequisites
- Composio API Key: Get yours from Composio Platform
- Auth Configurations: Create auth configs for your toolkits in the Composio Dashboard
- Python 3.8+: Make sure Python is installed
Quick Start
1. Install Dependencies
pip install -r requirements.txt
2. Configure Environment
Copy the example environment file and fill in your credentials:
cp .env.example .env
Edit .env and add:
- Your
COMPOSIO_API_KEY - Your auth config IDs (replace the placeholder IDs in
mcp_server.py) - Optional: API keys for OpenAI/Anthropic if using examples
3. Create Auth Configurations
Before running the server, you need to create auth configurations for your toolkits:
- Go to Composio Dashboard β Auth Configs
- Create auth configs for each toolkit you want to use (e.g., Gmail, Google Calendar)
- Copy the auth config IDs (format:
ac_xyz123) - Update
mcp_server.pywith your actual auth config IDs
4. Create MCP Server
Run the main script to create your MCP server:
python mcp_server.py
This will:
- Create an MCP server with your configured toolkits
- Generate a unique URL for your user
- Display the MCP server URL to use with AI providers
5. Authenticate Users
Important: Users must authenticate with the toolkits before the MCP server can use them.
See Hosted Authentication for how to connect user accounts.
6. Use with AI Providers
OpenAI Example
# Set your MCP server URL in .env as MCP_SERVER_URL
python openai_example.py
Anthropic Example
# Set your MCP server URL in .env as MCP_SERVER_URL
python anthropic_example.py
Project Structure
.
βββ mcp_server.py # Main script to create and manage MCP server
βββ openai_example.py # Example usage with OpenAI
βββ anthropic_example.py # Example usage with Anthropic
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ README.md # This file
Configuration
Updating Toolkits
Edit mcp_server.py to add or modify toolkits:
toolkits=[
{
"toolkit": "gmail",
"auth_config": "ac_xyz123" # Your auth config ID
},
{
"toolkit": "googlecalendar",
"auth_config": "ac_abc456" # Your auth config ID
}
]
Updating Allowed Tools
Modify the allowed_tools list in mcp_server.py:
allowed_tools=[
"GMAIL_FETCH_EMAILS",
"GMAIL_SEND_EMAIL",
"GOOGLECALENDAR_EVENTS_LIST"
]
Available Toolkits
Composio supports 500+ integrations. Check the Composio Docs for the full list of available toolkits and their tools.
Troubleshooting
"COMPOSIO_API_KEY not found"
- Make sure you've created a
.envfile with your API key
"Auth config not found"
- Verify your auth config IDs are correct
- Make sure auth configs are created in the Composio dashboard
"Tools not working"
- Ensure users have authenticated with the toolkits
- Check that the user_id matches the authenticated user
Resources
Architecture
ββββββββββββββββ WebSocket ββββββββββββββββββββββββ
β Frontend β <------------------> β FastAPI β
β React + D3 β β Memory + Graph API β
ββββββββββββββββ βββββββββββ¬βββββββββββββ
Faiss/Sbert β Neo4j Bolt
β
ββββββββ΄ββββββ
β Storage β
ββββββββββββββ
- backend/ β FastAPI, Sentence-Transformers + FAISS for semantic memory, Whisper for audio, Neo4j for entity graph, ComposioClient wrapper.
- frontend/ β React + Tailwind + D3, real-time graph via
/ws. - docker-compose orchestrates Neo4j, backend, frontend.
Running with Docker
# build & start everything
docker compose up --build
# dashboard
http://localhost:5173 # React UI
http://localhost:7474 # Neo4j Browser
http://localhost:8000/docs # FastAPI docs
Environment variables can be placed in .env (loaded by backend):
COMPOSIO_API_KEY=...
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=password
Backend API
| Route | Method | Body | Description |
|---|---|---|---|
/ingest/text | POST | {text, metadata?} | Embed text & update graph |
/ingest/audio | POST (multipart) | file | Transcribe & ingest audio |
/recall | POST | {query, top_k} | Semantic search over memories |
/graph | GET | β | Current memoryβentity mapping |
/ws | WS | β | Pushes graph JSON every 5 s |
Interactive OpenAPI docs served at /docs.
Frontend Usage
The React app auto-connects to ws://localhost:8000/ws and renders the graph. It expects memories and entities; circles are colour-coded.
Development outside Docker:
cd frontend
npm i
npm run dev
Development
- Tests β add pytest modules under
tests/. - Lint β frontend uses TypeScript strict mode; backend should follow
ruff/black(not enforced here).
Notes
- Composio MCP servers only support Streamable HTTP transport
- MCP server URLs are unique per user
- Tools requiring authentication won't work until users connect their accounts
