arden-codebase
MCP server enabling read-only semantic code search and API endpoint resolution for the arden-server and arden-admin codebases, plus knowledge guides.
README
Arden AI
Mastra application for understanding and automating work across the arden-server and arden-admin codebases.
Commands
npm run dev
npm run knowledge:refresh
npm run routes:check
npm run type-check
npm run build
npm run mcp:server
Mastra Studio is available at http://localhost:4111 while the development server is running.
Environment
OPENAI_API_KEY=...
ARDEN_AI_MODEL=openai/gpt-4o-mini
QDRANT_URL=http://localhost:6333
QDRANT_COLLECTION=arden_code_chunks
# QDRANT_API_KEY=...
ARDEN_API_URL=http://localhost:5000/api/v1
ARDEN_ACCESS_TOKEN=...
ARDEN_PERMISSION_ID=...
# Generation-time only when arden-server cannot be auto-discovered:
# ARDEN_SERVER_PATH=/absolute/path/to/arden-server
ARDEN_AI_MODEL uses Mastra's provider/model format. Code-search tools do not require an LLM or OPENAI_API_KEY; agents do.
Route Knowledge
The published application does not read the arden-server filesystem. Exact API routes are shipped in the versioned manifest:
src/generated/arden-server-routes.json
Refresh it after route changes:
npm run knowledge:refresh
The generator reads arden-server/src/routes, records the backend Git commit, and writes every supported route to the manifest. ARDEN_SERVER_PATH is only needed while running this generator and is not required by the deployed application.
Use this command in CI after checking out both repositories:
npm run routes:check
It fails when the committed manifest does not match the checked-out arden-server. A normal npm run build intentionally uses the committed manifest and therefore works when only the Mastra repository is present.
Structure
src/
|-- codeChunks/ Shared embedding and semantic-search logic
|-- database/ Qdrant and other database infrastructure
|-- generated/ Versioned knowledge generated from source repos
|-- environment.ts Environment configuration
`-- mastra/
|-- agents/
| |-- arden-admin/
| `-- arden-server/
|-- tools/
| |-- arden-admin/
| `-- arden-server/
`-- index.ts Mastra resource registration
Repository-specific tools enforce their repository filter internally. Shared Qdrant and embedding behavior belongs outside tool and agent definitions.
Resources
Tools:
arden-server-code-searcharden-server-resolve-api-endpointarden-server-get-api-dataarden-admin-code-search
Agents:
arden-server-codebase-agentarden-admin-codebase-agent
The search layer is compatible with the existing arden_code_chunks collection and uses Xenova/bge-small-en 384-dimensional normalized embeddings.
MCP Server
The native @mastra/mcp server exposes these read-only tools:
arden-server-code-searcharden-admin-code-searcharden-server-resolve-api-endpointarden-server-get-api-data
It also exposes:
arden://knowledge/route-manifestarden://knowledge/usage-guide
Start the stdio server for local MCP clients:
npm run mcp:server
Inspect it interactively:
npm run mcp:inspect
OpenCode local configuration:
{
"mcp": {
"arden-codebase": {
"type": "local",
"command": [
"npm",
"--silent",
"--prefix",
"/absolute/path/to/my-mastra-app",
"run",
"mcp:server"
],
"enabled": true
}
}
}
When the Mastra HTTP server is running, the registered MCP server is also available at the Streamable HTTP endpoint:
http://localhost:4111/api/mcp/arden-codebase/mcp
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.