mirror of
https://github.com/zilliztech/claude-context.git
synced 2025-10-06 01:10:02 +03:00
add signup guide and optimize sub readmes
Signed-off-by: ChengZi <chen.zhang@zilliz.com>
This commit is contained in:
@@ -26,6 +26,8 @@ Model Context Protocol (MCP) allows you to integrate Code Context with your favo
|
||||
|
||||
Code Context needs a vector database. You can [sign up](https://cloud.zilliz.com/signup) on Zilliz Cloud to get a free Serverless cluster.
|
||||
|
||||

|
||||
|
||||
After creating your cluster, open your Zilliz Cloud console and copy both the **public endpoint** and your **API key**.
|
||||
These will be used as `your-zilliz-cloud-public-endpoint` and `your-zilliz-cloud-api-key` in the configuration examples.
|
||||
|
||||
|
||||
BIN
assets/signup_and_create_cluster.jpeg
Normal file
BIN
assets/signup_and_create_cluster.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
@@ -20,17 +20,26 @@ See [OpenAI Documentation](https://platform.openai.com/docs/api-reference) for m
|
||||
OPENAI_API_KEY=your-openai-api-key
|
||||
```
|
||||
|
||||
#### Milvus configuration
|
||||
Zilliz Cloud (fully managed Milvus vector database as a service, you can [use it for free](https://zilliz.com/cloud))
|
||||
#### Zilliz Cloud configuration
|
||||
Get a free Milvus vector database on Zilliz Cloud.
|
||||
|
||||
Code Context needs a vector database. You can [sign up](https://cloud.zilliz.com/signup) on Zilliz Cloud to get a free Serverless cluster.
|
||||
|
||||

|
||||
|
||||
After creating your cluster, open your Zilliz Cloud console and copy both the **public endpoint** and your **API key**.
|
||||
These will be used as `your-zilliz-cloud-public-endpoint` and `your-zilliz-cloud-api-key` in the configuration examples.
|
||||
|
||||

|
||||
|
||||
Keep both values handy for the configuration steps below.
|
||||
|
||||
If you need help creating your free vector database or finding these values, see the [Zilliz Cloud documentation](https://docs.zilliz.com/docs/create-cluster) for detailed instructions.
|
||||
|
||||
- `MILVUS_ADDRESS` is the Public Endpoint of your Zilliz Cloud instance
|
||||
- `MILVUS_TOKEN` is the token of your Zilliz Cloud instance.
|
||||
```bash
|
||||
MILVUS_ADDRESS=https://xxx-xxxxxxxxxxxx.serverless.gcp-us-west1.cloud.zilliz.com
|
||||
MILVUS_TOKEN=xxxxxxx
|
||||
```
|
||||
> Optional: Self-hosted Milvus. See [Milvus Documentation](https://milvus.io/docs/install_standalone-docker-compose.md) for more details to install Milvus.
|
||||
|
||||
MILVUS_ADDRESS=your-zilliz-cloud-public-endpoint
|
||||
MILVUS_TOKEN=your-zilliz-cloud-api-key
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
||||
@@ -24,29 +24,7 @@ pnpm start:with-env
|
||||
```
|
||||
|
||||
### Required Environment Variables
|
||||
Set the following environment variables based on your chosen embedding provider.
|
||||
|
||||
#### OpenAI (Default)
|
||||
```bash
|
||||
# Required
|
||||
export OPENAI_API_KEY="your-api-key"
|
||||
export MILVUS_ADDRESS="localhost:19530"
|
||||
|
||||
# Optional
|
||||
export EMBEDDING_PROVIDER="openai"
|
||||
export OPENAI_MODEL="text-embedding-3-small"
|
||||
```
|
||||
|
||||
#### Ollama
|
||||
```bash
|
||||
# Required
|
||||
export EMBEDDING_PROVIDER="ollama"
|
||||
export OLLAMA_MODEL="nomic-embed-text"
|
||||
export MILVUS_ADDRESS="localhost:19530"
|
||||
|
||||
# Optional
|
||||
export OLLAMA_HOST="http://127.0.0.1:11434"
|
||||
```
|
||||
See [README.md](./README.md#prepare-environment-variables) for required environment variables.
|
||||
|
||||
## Running the MCP Server
|
||||
|
||||
@@ -86,7 +64,7 @@ export OLLAMA_HOST="http://127.0.0.1:11434"
|
||||
|
||||
## Working with MCP Clients
|
||||
|
||||
### Claude Desktop/Cursor Configuration
|
||||
### Cursor/Claude Desktop Configuration
|
||||
You can use the following configuration to configure the MCP server with a development mode.
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -75,7 +75,8 @@ Code Context MCP supports multiple embedding providers. Choose the one that best
|
||||
EMBEDDING_PROVIDER=OpenAI
|
||||
```
|
||||
|
||||
#### 1. OpenAI Configuration (Default)
|
||||
<details>
|
||||
<summary><strong>1. OpenAI Configuration (Default)</strong></summary>
|
||||
|
||||
OpenAI provides high-quality embeddings with excellent performance for code understanding.
|
||||
|
||||
@@ -101,7 +102,10 @@ OPENAI_BASE_URL=https://api.openai.com/v1
|
||||
3. Generate a new API key
|
||||
4. Set up billing if needed
|
||||
|
||||
#### 2. VoyageAI Configuration
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>2. VoyageAI Configuration</strong></summary>
|
||||
|
||||
VoyageAI offers specialized code embeddings optimized for programming languages.
|
||||
|
||||
@@ -124,7 +128,10 @@ EMBEDDING_MODEL=voyage-code-3
|
||||
3. Navigate to API Keys section
|
||||
4. Create a new API key
|
||||
|
||||
#### 3. Gemini Configuration
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>3. Gemini Configuration</strong></summary>
|
||||
|
||||
Google's Gemini provides competitive embeddings with good multilingual support.
|
||||
|
||||
@@ -145,7 +152,10 @@ EMBEDDING_MODEL=gemini-embedding-001
|
||||
3. Go to "Get API key" section
|
||||
4. Create a new API key
|
||||
|
||||
#### 4. Ollama Configuration (Local/Self-hosted)
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>4. Ollama Configuration (Local/Self-hosted)</strong></summary>
|
||||
|
||||
Ollama allows you to run embeddings locally without sending data to external services.
|
||||
|
||||
@@ -173,19 +183,29 @@ OLLAMA_HOST=http://127.0.0.1:11434
|
||||
ollama serve
|
||||
```
|
||||
|
||||
#### Milvus Configuration
|
||||
Zilliz Cloud (fully managed Milvus vector database as a service, you can [use it for free](https://zilliz.com/cloud))
|
||||
</details>
|
||||
|
||||
#### Zilliz Cloud configuration
|
||||
Get a free Milvus vector database on Zilliz Cloud.
|
||||
|
||||
Code Context needs a vector database. You can [sign up](https://cloud.zilliz.com/signup) on Zilliz Cloud to get a free Serverless cluster.
|
||||
|
||||

|
||||
|
||||
After creating your cluster, open your Zilliz Cloud console and copy both the **public endpoint** and your **API key**.
|
||||
These will be used as `your-zilliz-cloud-public-endpoint` and `your-zilliz-cloud-api-key` in the configuration examples.
|
||||
|
||||

|
||||
|
||||
Keep both values handy for the configuration steps below.
|
||||
|
||||
If you need help creating your free vector database or finding these values, see the [Zilliz Cloud documentation](https://docs.zilliz.com/docs/create-cluster) for detailed instructions.
|
||||
|
||||
- `MILVUS_ADDRESS` is the Public Endpoint of your Zilliz Cloud instance
|
||||
- `MILVUS_TOKEN` is the token of your Zilliz Cloud instance.
|
||||
```bash
|
||||
# Required: Milvus address
|
||||
MILVUS_ADDRESS=https://xxx-xxxxxxxxxxxx.serverless.gcp-us-west1.cloud.zilliz.com
|
||||
MILVUS_ADDRESS=your-zilliz-cloud-public-endpoint
|
||||
MILVUS_TOKEN=your-zilliz-cloud-api-key
|
||||
```
|
||||
|
||||
# Required for Zilliz Cloud: Milvus token
|
||||
MILVUS_TOKEN=xxxxxxx
|
||||
```
|
||||
> Optional: Self-hosted Milvus. See [Milvus Documentation](https://milvus.io/docs/install_standalone-docker-compose.md) for more details to install Milvus.
|
||||
|
||||
#### Embedding Batch Size
|
||||
You can set the embedding batch size to optimize the performance of the MCP server, depending on your embedding model throughput. The default value is 100.
|
||||
|
||||
@@ -61,16 +61,27 @@ Configure how your code is split into chunks for indexing.
|
||||
|
||||
> **Recommendation**: Use AST Splitter for better semantic understanding of code structure.
|
||||
|
||||
#### Milvus configuration
|
||||
Zilliz Cloud(fully managed Milvus vector database as a service, you can [use it for free](https://zilliz.com/cloud))
|
||||
|
||||
- `MILVUS_ADDRESS` is the Public Endpoint of your Zilliz Cloud instance
|
||||
- `MILVUS_TOKEN` is the token of your Zilliz Cloud instance.
|
||||
#### Zilliz Cloud configuration
|
||||
Get a free Milvus vector database on Zilliz Cloud.
|
||||
|
||||
Code Context needs a vector database. You can [sign up](https://cloud.zilliz.com/signup) on Zilliz Cloud to get a free Serverless cluster.
|
||||
|
||||

|
||||
|
||||
After creating your cluster, open your Zilliz Cloud console and copy both the **public endpoint** and your **API key**.
|
||||
These will be used as `your-zilliz-cloud-public-endpoint` and `your-zilliz-cloud-api-key` in the configuration examples.
|
||||
|
||||

|
||||
|
||||
Keep both values handy for the configuration steps below.
|
||||
|
||||
If you need help creating your free vector database or finding these values, see the [Zilliz Cloud documentation](https://docs.zilliz.com/docs/create-cluster) for detailed instructions.
|
||||
|
||||
```bash
|
||||
MILVUS_ADDRESS=https://xxx-xxxxxxxxxxxx.serverless.gcp-us-west1.cloud.zilliz.com
|
||||
MILVUS_TOKEN=xxxxxxx
|
||||
```
|
||||
> Optional: Self-hosted Milvus. See [Milvus Documentation](https://milvus.io/docs/install_standalone-docker-compose.md) for more details to install Milvus.
|
||||
MILVUS_ADDRESS=your-zilliz-cloud-public-endpoint
|
||||
MILVUS_TOKEN=your-zilliz-cloud-api-key
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user