Mcp Just Seek Knowledge — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Just Seek Knowledge (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
MCP (Model Context Protocol) server that stores and searches AI-generated knowledge about software projects, allowing Cursor to access information about project structures, design patterns, best practices, and technical documentation.
Create an MCP server that stores and searches AI-generated knowledge about software projects.
service_name in the database (exposed as MCP tool)service_name (available via CLI script, not exposed as MCP tool)#### 1. Clone the project or navigate to it (if needed)
cd /home/pereirrd/dev/git/pereirrd/mcp-just-seek-knowledge#### 2. Create and activate virtual environment
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# On Linux/WSL:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate#### 3. Install dependencies
pip install --upgrade pip
pip install -r requirements.txt#### 4. Configure environment variables
Create a .env file in the project root (copy from .env.example if it exists, or create manually):
# Example .env
PGVECTOR_URL=postgresql://postgres:postgres@localhost:5433/software_design_knowledge
POSTGRES_HOST=localhost
POSTGRES_PORT=5433
POSTGRES_DB=software_design_knowledge
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
OPENAI_API_KEY=your_openai_api_key
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_DIMENSION=1536Note: PostgreSQL variables can also be configured in Cursor's mcp.json (see section below).
#### 5. Start PostgreSQL (if using Docker Compose)
docker-compose up -dThis will create PostgreSQL with pgvector automatically on port 5433.
Important: If port 5432 is already in use, docker-compose.yml is configured to automatically use port 5433.
#### 6. Test the MCP server (optional)
python src/mcp_server.pyThe server should start without errors and automatically create the software_design_knowledge table if it doesn't exist.
To verify if dependencies were installed correctly:
pip list | grep -E "langchain|psycopg|openai|python-dotenv"Or test imports directly:
python -c "from src.database.connection import get_connection_string; from src.mcp.mcp_server import MCPServer; print('✅ Dependencies installed correctly!')"To add this MCP server to Cursor, configure the ~/.cursor/mcp.json file (global configuration) or .cursor/mcp.json in the project root (local configuration).
~/.cursor/mcp.json):{
"mcpServers": {
"mcp-just-seek-knowledge": {
"command": "python",
"args": ["/absolute/path/to/project/src/mcp_server.py"],
"env": {
"OPENAI_API_KEY": "your_openai_api_key",
"OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
"EMBEDDING_DIMENSION": "1536"
}
}
}
}Important:
args fieldWhen configuring MCP in Cursor (~/.cursor/mcp.json), Cursor will use the system Python or the one active in PATH. Recommendations:
#### Option 1: Use global Python (install dependencies globally)
If you prefer to use the system's global Python:
pip install -r requirements.txtAnd configure mcp.json with:
{
"mcpServers": {
"mcp-just-seek-knowledge": {
"command": "python",
"args": ["/absolute/path/to/project/src/mcp_server.py"],
"env": {
"OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
"EMBEDDING_DIMENSION": "1536"
}
}
}
}#### Option 2: Use virtual environment Python (recommended)
To use the project's virtual environment, specify the full path to the venv Python in mcp.json:
{
"mcpServers": {
"mcp-just-seek-knowledge": {
"command": "/absolute/path/to/mcp-just-seek-knowledge/venv/bin/python",
"args": ["/absolute/path/to/mcp-just-seek-knowledge/src/mcp_server.py"],
"env": {
"OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
"EMBEDDING_DIMENSION": "1536"
}
}
}
}Advantages of Option 2:
Note: The project's .env file will be automatically loaded by the MCP server, so you don't need to repeat PostgreSQL variables in mcp.json (unless you prefer).
#### Directory Structure
Created src/ structure with organized subdirectories:
src/database/ - Database managementsrc/embeddings/ - Embedding servicessrc/services/ - Business services (ingest, update, search)src/mcp/ - MCP server and handlers__init__.py files created in all Python packages.
#### Dependency Configuration
requirements.txt file created with all necessary dependencies:
#### Environment Variables
.env.example file created with all necessary variables:
PGVECTOR_URL - PostgreSQL connection URLPOSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORDOPENAI_API_KEY, OPENAI_EMBEDDING_MODELEMBEDDING_DIMENSION.gitignore file configured to exclude .env and Python and IDE files.
#### Docker and PostgreSQL
docker-compose.yml file created with:
pgvector/pgvector:pg16 imageInitialization script init-scripts/01-init-pgvector.sh to automatically create the pgvector extension.
#### Database Schema (src/database/schema.py)
Structure of `software_design_knowledge` table (software project knowledge):
id - Unique identifier (SERIAL PRIMARY KEY)service_name - Service name (VARCHAR(255) NOT NULL UNIQUE)content - Knowledge content (TEXT NOT NULL)embedding - Embedding vector (vector(1536) NOT NULL)metadata - Additional metadata (JSONB)created_at - Creation date (TIMESTAMP DEFAULT CURRENT_TIMESTAMP)updated_at - Update date (TIMESTAMP DEFAULT CURRENT_TIMESTAMP)Indexes:
service_name for service searchesTriggers:
updated_at on updates#### Connection Management (src/database/connection.py)
Implemented functions:
get_connection_string() - Gets connection string from environment variablescreate_connection() - Creates PostgreSQL connectionsschema_exists() - Checks if table existscreate_schema() - Creates complete schema (table, indexes, triggers)initialize_database() - Initializes the databaseError handling and logging implemented.
#### Data Repository (src/database/repository.py)
`KnowledgeRepository` class implemented using psycopg directly.
Implemented methods:
insert() - Insert document into databaseupdate() - Update document by service_nameupsert() - Insert or update (upsert behavior)delete() - Delete document by service_nameget_by_service_name() - Search document by service_namesimilarity_search() - Semantic search using pgVector (<=> operator)Features:
`EmbeddingService` class (src/embeddings/embedding_service.py) using OpenAIEmbeddings from LangChain.
Features:
text-embedding-3-small)Four main services implemented:
#### Ingest Service (src/services/ingest_service.py)
service_name and content#### Update Service (src/services/update_service.py)
service_name doesn't exist, creates new record#### Search Service (src/services/search_service.py)
k (number of results), threshold (minimum similarity), service_name (filter)#### List Catalog Service (src/services/list_catalog_service.py)
service_name in the databaseCommon features:
EmbeddingService and KnowledgeRepositoryThe project includes a CLI script for record deletion that is not exposed as an MCP tool. This functionality is only available via command line for administrative operations.
#### Script: src/database/delete_service.py
Functionality:
service_nameUsage:
python src/database/delete_service.py <service_name>Examples:
# Delete a specific service
python src/database/delete_service.py user-service
# The script returns:
# - ✓ "Record deleted successfully" if the record was found and removed
# - ✗ "Record not found" if the service_name doesn't exist
# - ✗ "Error deleting record" in case of operation failureFeatures:
Note: This functionality is not available as an MCP tool for security and access control reasons. Use only for necessary administrative operations.
The init-scripts/01-init-pgvector.sh script is automatically used by PostgreSQL during container initialization.
1. Volume mapped in docker-compose.yml
The local init-scripts/ directory is mapped to /docker-entrypoint-initdb.d inside the container through volume configuration in docker-compose.yml.
2. PostgreSQL automatic behavior
The official PostgreSQL image (including pgvector/pgvector) automatically executes all files present in /docker-entrypoint-initdb.d when:
3. What the script does
The 01-init-pgvector.sh script:
CREATE EXTENSION IF NOT EXISTS vector; to create the pgvector extensionset -e to stop on errorinit-scripts/ are only executed on first initialization (when volume is empty)docker-compose down -vThis repository includes custom Cursor commands in .cursor/commands/, which help create, update, and list the knowledge base in the MCP mcp-just-seek-knowledge.
mcp-just-seek-knowledge.ingest.mcp-just-seek-knowledge.update.service_name via mcp-just-seek-knowledge.list_catalog and presents a friendly layout with count, service_name and metadata (enriched via mcp-just-seek-knowledge.search).mcp-just-seek-knowledge is configured in Cursor (~/.cursor/mcp.json or .cursor/mcp.json)./criar_base_conhecimento/atualizar_base_conhecimento/listar_base_conhecimento~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.