MCPcopy Index your code
hub / github.com/miurla/morphic

github.com/miurla/morphic @v1.5.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.5.0 ↗
793 symbols 2,200 edges 306 files 20 documented · 3%
README

Morphic

An AI-powered search engine with a generative UI.

DeepWiki GitHub stars GitHub forks

Vercel OSS Program

miurla%2Fmorphic | Trendshift

Features

  • AI-powered search with GenerativeUI
  • Search modes: Quick and Adaptive
  • Model selector with dynamic provider detection (OpenAI, Anthropic, Google, Ollama, Vercel AI Gateway, OpenAI-compatible providers)
  • Multiple search providers (Tavily, SearXNG, Brave, Exa)
  • Chat history stored in PostgreSQL
  • Share search results with unique URLs
  • File upload support
  • User authentication with Supabase Auth
  • Guest mode for anonymous usage
  • Docker deployment ready

Installation

Docker (Recommended)

The quickest way to run Morphic locally:

docker pull ghcr.io/miurla/morphic:latest

Then set up with Docker Compose:

  1. Clone the repository and configure environment:
git clone https://github.com/miurla/morphic.git
cd morphic
cp .env.local.example .env.local
  1. Edit .env.local and set at least one AI provider API key:
OPENAI_API_KEY=your_openai_key

See supported providers for other options (Anthropic, Google, Ollama, Vercel AI Gateway, OpenAI-compatible providers).

  1. Start all services:
docker compose up -d
  1. Visit http://localhost:3000 and select your model from the model selector.

Docker Compose starts PostgreSQL, Redis, SearXNG, and Morphic automatically. No additional search API key is needed — SearXNG is included.

See the Docker Guide for more options including building from source and file upload configuration.

Local Development

  1. Clone and install:
git clone https://github.com/miurla/morphic.git
cd morphic
bun install
  1. Configure environment:
cp .env.local.example .env.local

Edit .env.local and set your API keys:

OPENAI_API_KEY=your_openai_key
TAVILY_API_KEY=your_tavily_key

To enable chat history, authentication, file upload, and other features, see CONFIGURATION.md.

  1. Start the dev server:
bun dev

Visit http://localhost:3000.

Deploy

Vercel

Deploy with Vercel

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to get started, including local development setup.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Extension points exported contracts — how you extend this code

SearchProvider (Interface)
(no doc) [7 implementers]
lib/tools/search/providers/base.ts
UserFileSectionProps (Interface)
(no doc)
components/user-file-section.tsx
ReasoningContent (Interface)
(no doc)
components/reasoning-section.tsx
SourceFaviconsProps (Interface)
(no doc)
components/source-favicons.tsx
CollapsibleMessageProps (Interface)
(no doc)
components/collapsible-message.tsx
RenderMessageProps (Interface)
(no doc)
components/render-message.tsx
ChatShareProps (Interface)
(no doc)
components/chat-share.tsx
VideoSearchResultsProps (Interface)
(no doc)
components/video-search-results.tsx

Core symbols most depended-on inside this repo

cn
called by 180
lib/utils/index.ts
displayUrlName
called by 27
lib/utils/domain.ts
toPublicErrorPayload
called by 20
lib/errors/public-error.ts
perfTime
called by 19
lib/utils/perf-logging.ts
processCitations
called by 17
lib/utils/citation.ts
perfLog
called by 17
lib/utils/perf-logging.ts
withRLS
called by 17
lib/db/with-rls.ts
generateId
called by 17
lib/db/schema.ts

Shape

Function 628
Interface 108
Method 34
Class 23

Languages

TypeScript100%

Modules by API surface

components/theme-provider.tsx19 symbols
lib/errors/public-error.ts18 symbols
lib/models/fetch-models.ts17 symbols
app/api/advanced-search/route.ts16 symbols
lib/db/actions.ts15 symbols
components/ui/dropdown-menu.tsx15 symbols
lib/types/dynamic-tools.ts14 symbols
lib/actions/chat.ts14 symbols
scripts/chat-cli.ts13 symbols
components/question-confirmation.tsx13 symbols
lib/utils/message-mapping.ts11 symbols
lib/tools/search/providers/brave.ts11 symbols

Dependencies from manifests, versioned

@ai-sdk/anthropic3.0.77 · 1×
@ai-sdk/gateway3.0.114 · 1×
@ai-sdk/google3.0.73 · 1×
@ai-sdk/openai3.0.63 · 1×
@ai-sdk/openai-compatible2.0.47 · 1×
@ai-sdk/react3.0.182 · 1×
@aws-sdk/client-s33.850.0 · 1×
@json-render/core0.16.0 · 1×
@json-render/react0.16.0 · 1×
@opentelemetry/api-logs0.57.2 · 1×
@opentelemetry/instrumentation0.57.2 · 1×
@opentelemetry/sdk-logs0.57.2 · 1×

Datastores touched

testdbDatabase · 1 repos
dbDatabase · 1 repos
morphicDatabase · 1 repos

For agents

$ claude mcp add morphic \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact