Installation¶
This guide takes you from a fresh machine to a running MCP server connected to your agent.
Requirements¶
- Python 3.12+
- uv (recommended) or pip
Install as a global tool (recommended)¶
The cleanest way to install — makes sylvan available everywhere without polluting any project's dependencies:
This installs sylvan into an isolated environment managed by uv. The sylvan command is available globally.
To update later:
Install as a project dependency¶
If you want sylvan as part of a specific project:
Or with pip:
Verify the installation¶
This checks that Python, tree-sitter, sqlite-vec, and embedding dependencies are all available. Fix anything it flags before continuing.
Connect to your agent¶
The server communicates over MCP (Model Context Protocol). You need to tell your agent how to start it. The configuration depends on how you installed it.
stdio (default)¶
The simplest option. The agent spawns the server as a subprocess and communicates over stdin/stdout. This is what Claude Code, Cursor, and most MCP clients expect.
If installed as a global tool (uv tool install):
If installed as a project dependency (uv add):
If running from a cloned repo:
{
"mcpServers": {
"sylvan": {
"command": "uv",
"args": ["run", "--directory", "/path/to/sylvan", "sylvan", "serve"]
}
}
}
For Claude Code, you can also add it via the CLI:
# Global tool install
claude mcp add sylvan -- sylvan serve
# Project dependency
claude mcp add sylvan -- uv run sylvan serve
For Cursor, add the config to .cursor/mcp.json in your project root.
SSE (Server-Sent Events)¶
For agents that connect to a long-running server over HTTP. Start the server first:
This binds to 127.0.0.1:8420 by default. Then point your agent at:
Streamable HTTP¶
The newest MCP transport. Same idea as SSE but uses standard HTTP request/response:
Changing host and port¶
Both SSE and HTTP transports accept --host and --port:
What's next¶
Now that the server is running and your agent can reach it, you need something to search.