> ## Documentation Index
> Fetch the complete documentation index at: https://cedar.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cedar-OS MCP Server

> Vibe coding with Cedar-OS

The Cedar Model Context Protocol (MCP) server enables seamless integration between Cedar-OS and AI development environments like Cursor, Claude Code, and Windsurf, providing intelligent assistance for building AI-native frontends.

## Quick Start

### 1. Install in Your IDE

**For Cursor:**
Open your Cursor settings file (`~/.cursor/settings.json`) and add:

```json theme={null}
{
	"mcpServers": {
		"cedar-mcp": {
			"url": "https://mcpwithcedar-production.up.railway.app/jsonrpc",
			"description": "Cedar-OS Expert MCP Server"
		}
	}
}
```

**For Claude Code:**
Add the following into your terminal:

```
claude mcp add --transport http cedar https://mcpwithcedar-production.up.railway.app/jsonrpc
```

**For Windsurf:**
Configure the MCP server in your Windsurf settings:

```json theme={null}
{
	"mcpServers": {
		"cedar-mcp": {
			"url": "https://mcpwithcedar-production.up.railway.app/sse",
			"description": "Cedar-OS Expert MCP Server"
		}
	}
}
```

### 2. Restart Your IDE

Close and reopen your IDE (Cursor, Claude Code, or Windsurf) to activate the MCP server.

### 3. Verify Installation

In any file, type a comment and use your IDE's AI assistant:

```javascript theme={null}
// Help me create a Cedar chat component
```

The MCP server should provide Cedar-specific guidance.

### 4. Start Using Cedar

Ask the MCP server natural language questions:

```
"Create a basic Cedar chat interface with streaming support"
"Add voice input to my Cedar chat"
"Implement a radial menu spell"
```

## Key Features

* **Intelligent Code Assistance**: Context-aware suggestions for Cedar components and patterns
* **Documentation Search**: Instant access to relevant Cedar documentation
* **Component Discovery**: Find and implement the right Cedar components
* **Voice Integration Support**: Specialized assistance for voice features
* **Spells Implementation**: Expert guidance on Cedar spells
* **Mastra Backend Integration**: Seamless agent backend connections

## Common Usage Patterns

### Component Implementation

```
"Help me implement a floating chat component with Cedar"
"Add voice capabilities to my Cedar chat interface"
"Create a custom spell for text selection"
"Build a mention system with Cedar"
```

### Documentation Queries

```
"Show me Cedar chat component documentation"
"How do I configure streaming in Cedar?"
"What are Cedar spells and how do they work?"
"Explain Cedar's state management approach"
```

### Integration Tasks

```
"Connect my Cedar frontend to a Mastra agent"
"Set up voice streaming with WebSockets"
"Implement state management with Cedar store"
"Configure message persistence"
```

## Advanced Features

### Contextual Awareness

The MCP server understands:

* Your project structure and existing Cedar components
* Current file context and imports
* Project dependencies and configuration
* Cedar best practices and patterns

### Specialized Modules

* **Voice Expert**: Audio streaming, permissions, WebSocket configuration
* **Spells Expert**: Spell creation, activation patterns, gesture handling
* **Mastra Expert**: Agent connections, workflow setup, backend integration
* **Chat Expert**: Message handling, streaming, custom rendering

## Common Workflows

### Setting Up a New Project

1. Initialize Cedar: `"Set up a new Cedar project with TypeScript"`
2. Add chat: `"Add Cedar chat components to my app"`
3. Configure backend: `"Connect to my Mastra agent backend"`
4. Add voice: `"Implement voice capabilities"`

### Building Features

1. Start simple: `"Create a basic chat interface"`
2. Add interactivity: `"Add mention support to chat"`
3. Enhance UX: `"Implement message streaming"`
4. Add AI features: `"Create a questioning spell"`

### Debugging Issues

* `"Debug WebSocket connection problems"`
* `"Fix streaming message display"`
* `"Resolve spell activation conflicts"`
* `"Troubleshoot voice permissions"`

## Best Practices

1. **Ask Before Building**: Query capabilities before implementing
2. **Use Examples**: Request code examples for complex features
3. **Incremental Development**: Build features step by step
4. **Leverage Search**: Use semantic search for documentation
5. **Validate Code**: Ask for best practice reviews

## Tips and Tricks

* **Auto-imports**: MCP knows Cedar import paths
* **Pattern Matching**: Ask for common Cedar patterns
* **Code Review**: Request validation of implementations
* **Component Discovery**: Ask "What Cedar components help with \[task]?"
* **Quick Fixes**: Get immediate solutions for errors

## Troubleshooting

### MCP Server Not Responding

* Verify configuration in your IDE settings
* Check Node.js is accessible
* Restart your IDE after changes

### Incorrect Suggestions

* Provide more project context
* Specify Cedar version
* Include relevant code snippets

### Performance Issues

* Clear your IDE cache
* Check internet connection
* Update MCP server version

## Prerequisites

* Compatible IDE: Cursor, Claude Code, or Windsurf (latest version)
* Node.js 18+ installed
* Basic TypeScript/React knowledge
* Cedar-OS project or willingness to create one

## Support

* [Cedar Discord Community](https://discord.gg/4AWawRjNdZ)
* [GitHub Issues](https://github.com/CedarCopilot/cedar-OS/issues)
* [Cedar Documentation](https://docs.cedarcopilot.com)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.