Thank you for your interest in contributing to MCP Memory Service! 🎉
This project provides semantic memory and persistent storage for AI assistants through the Model Context Protocol. We welcome contributions of all kinds - from bug fixes and features to documentation and testing.
- Code of Conduct
- Ways to Contribute
- Getting Started
- Development Process
- Coding Standards
- Testing Requirements
- Documentation
- Submitting Changes
- Security-Sensitive Changes
- Autonomous Agents & AI-Generated PRs
- Reporting Issues
- Community & Support
- Recognition
We are committed to providing a welcoming and inclusive environment for all contributors. Please:
- Be respectful and considerate in all interactions
- Welcome newcomers and help them get started
- Focus on constructive criticism and collaborative problem-solving
- Respect differing viewpoints and experiences
- Avoid harassment, discrimination, or inappropriate behavior
Help us identify and fix issues by reporting bugs with detailed information.
Suggest new features or improvements to existing functionality.
Improve README, Wiki pages, code comments, or API documentation.
Write tests, improve test coverage, or help with manual testing.
Fix bugs, implement features, or improve performance.
Help make the project accessible to more users (future goal).
Answer questions in Issues, Discussions, or help other users.
- Python 3.10 or higher
- Git
- Platform-specific requirements:
- macOS: Homebrew Python recommended for SQLite extension support
- Windows: Visual Studio Build Tools for some dependencies
- Linux: Build essentials package
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/mcp-memory-service.git cd mcp-memory-service -
Install dependencies:
python install.py
This will automatically detect your platform and install appropriate dependencies.
-
Verify installation:
python scripts/verify_environment.py
-
Run the service:
# HTTP server (background, dashboard + REST API, recommended) memory launch # OR MCP stdio server (for Claude Desktop integration) memory server
-
Test with MCP Inspector (optional, stdio child process):
npx @modelcontextprotocol/inspector memory server
For a containerized environment:
docker-compose up -d # For MCP mode
docker-compose -f docker-compose.http.yml up -d # For HTTP API modegit checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-descriptionUse descriptive branch names:
feature/for new featuresfix/for bug fixesdocs/for documentationtest/for test improvementsrefactor/for code refactoring
- Write clean, readable code
- Follow the coding standards (see below)
- Add/update tests as needed
- Update documentation if applicable
- Keep commits focused and atomic
# Run all tests
pytest tests/
# Run specific test file
pytest tests/test_server.py
# Run with coverage
pytest --cov=mcp_memory_service tests/Use semantic commit messages:
git commit -m "feat: add memory export functionality"
git commit -m "fix: resolve timezone handling in memory search"
git commit -m "docs: update installation guide for Windows"
git commit -m "test: add coverage for storage backends"Format: <type>: <description>
Types:
feat: New featurefix: Bug fixdocs: Documentation changestest: Test additions or changesrefactor: Code refactoringperf: Performance improvementschore: Maintenance tasks
git push origin your-branch-nameOpen a PR from your fork to the main repository with:
- Clear title describing the change
- Description of what and why
- Reference to any related issues
- Screenshots/examples if applicable
- Follow PEP 8 with these modifications:
- Line length: 88 characters (Black formatter default)
- Use double quotes for strings
- Use type hints for all function signatures
- Write descriptive variable and function names
- Add docstrings to all public functions/classes (Google style)
# Import order
import standard_library
import third_party_libraries
from mcp_memory_service import local_modules
# Type hints
from typing import Optional, List, Dict, Any
# Async functions
async def process_memory(content: str) -> Dict[str, Any]:
"""Process and store memory content.
Args:
content: The memory content to process
Returns:
Dictionary containing memory metadata
"""
# Implementation- Use specific exception types
- Provide helpful error messages
- Log errors appropriately
- Never silently fail
try:
result = await storage.store(memory)
except StorageError as e:
logger.error(f"Failed to store memory: {e}")
raise MemoryServiceError(f"Storage operation failed: {e}") from e- Place tests in
tests/directory - Name test files with
test_prefix - Use descriptive test names
- Include both positive and negative test cases
- Mock external dependencies
Example test:
import pytest
from mcp_memory_service.storage import SqliteVecStorage
@pytest.mark.asyncio
async def test_store_memory_success():
"""Test successful memory storage."""
storage = SqliteVecStorage(":memory:")
result = await storage.store("test content", tags=["test"])
assert result is not None
assert "hash" in result- Aim for >80% code coverage
- Focus on critical paths and edge cases
- Test error handling scenarios
- Include integration tests where appropriate
- Add docstrings to all public APIs
- Include type hints
- Provide usage examples in docstrings
- Keep comments concise and relevant
When adding features or making significant changes:
- Update README.md if needed
- Add/update Wiki pages for detailed guides
- Update CHANGELOG.md following Keep a Changelog format
- Update AGENTS.md or CLAUDE.md if development workflow changes
Advanced Workflow Automation:
- See Context Provider Workflow Automation for automating development workflows with intelligent patterns
- Document new MCP tools in
docs/api/tools.md - Include parameter descriptions and examples
- Note any breaking changes
-
PR Title: Use semantic format (e.g., "feat: add batch memory operations")
-
PR Description Template:
## Description Brief description of changes ## Motivation Why these changes are needed ## Changes - List of specific changes - Breaking changes (if any) ## Testing - How you tested the changes - Test coverage added ## Screenshots (if applicable) ## Related Issues Fixes #123
-
PR Checklist:
- Tests pass locally (
bash scripts/pr/pre_pr_check.sh) - Code follows style guidelines
- Documentation updated
- CHANGELOG.md updated
- No sensitive data exposed
- If adding/modifying MCP tools: tool is added to
valid_actionsinserver/handlers/graph.py(if applicable) and write-scope enforcement is correct (see Security-Sensitive Changes) - I am a human contributor, or I have disclosed that this PR was generated by an automated agent (see Autonomous Agents & AI-Generated PRs)
- Tests pass locally (
- PRs require at least one review
- Address review feedback promptly
- Keep discussions focused and constructive
- Be patient - reviews may take a few days
The following areas require extra care. PRs touching them receive additional scrutiny and may require a second maintainer review.
| Path | Risk |
|---|---|
src/mcp_memory_service/web/api/mcp.py |
HTTP MCP transport, OAuth scope enforcement |
src/mcp_memory_service/server_impl.py |
MCP tool registration, write-scope gate |
src/mcp_memory_service/web/oauth/ |
OAuth 2.1 implementation |
src/mcp_memory_service/storage/ |
Data integrity, production database |
.github/workflows/ |
CI/CD pipeline, supply-chain security |
- Scope enforcement: State explicitly whether the new tool is read-only or write. Read-only tools must set
readOnlyHint=Truein annotations. Write tools must be reachable only with a write-scoped token. valid_actionsregistration: If the tool is routed throughhandle_memory_graph(), it must be added to thevalid_actionslist at the top of that function — otherwise the new branches are dead code.- Security section in PR description: Add a
## Securitysection explaining (a) what data the tool reads/writes, (b) how scope is enforced, and (c) any edge cases (None inputs, malformed arguments, concurrent access).
Do not open a public issue. Use GitHub's private Security Advisories to report vulnerabilities confidentially.
We welcome contributions from AI coding assistants and autonomous agents. However, transparency is required.
If a PR was generated, drafted, or submitted by an automated agent (an AI system acting without direct human review of each change), the PR description must include:
## Agent Disclosure
This PR was generated by [agent name/system]. The submitting account is operated by [human name / organization].
Human review of this PR: [yes — describe what was reviewed / no — fully automated]
PRs that appear to be automated but carry no disclosure may be closed pending clarification.
- Automated agents can miss context-specific security constraints (scope gates, invariants, production safeguards) that are not visible from the code alone.
- Disclosure lets maintainers calibrate review depth accordingly.
- It is not a barrier to contribution — filhocf's fully automated RFC #732 series is a model example of high-quality agent contributions. Disclosure + quality work = fast merge.
- Maintainer asks for clarification in a comment.
- If no response within 7 days, PR is closed. Re-opening with disclosure is welcome.
All issues, pull requests, and discussions should be written in English. This keeps the project accessible to our international community of contributors and ensures problems are searchable for others hitting the same issue. If English isn't your first language, tools like DeepL or Google Translate work well — we genuinely appreciate the effort.
Contributions opened in other languages may be translated by a maintainer, or redirected with a polite request to resubmit in English.
When reporting bugs, include:
-
Environment:
- OS and version
- Python version
- MCP Memory Service version
- Installation method (pip, Docker, source)
-
Steps to Reproduce:
- Minimal code example
- Exact commands run
- Configuration used
-
Expected vs Actual Behavior:
- What you expected to happen
- What actually happened
- Error messages/stack traces
-
Additional Context:
- Screenshots if applicable
- Relevant log output
- Related issues
For feature requests, describe:
- The problem you're trying to solve
- Your proposed solution
- Alternative approaches considered
- Potential impact on existing functionality
- Documentation: Check the Wiki first
- Issues: Search existing issues before creating new ones
- Discussions: Use GitHub Discussions for questions
- Response Time: Maintainers typically respond within 2-3 days
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and community discussion
- Pull Requests: Code contributions and reviews
If you're an AI coding assistant, also check:
- AGENTS.md - Generic AI agent instructions
- CLAUDE.md - Claude-specific guidelines
- Context Provider Workflow Automation - Automate development workflows with intelligent patterns
We value all contributions! Contributors are:
- Listed in release notes for their contributions
- Mentioned in CHANGELOG.md entries
- Credited in commit messages when providing fixes/solutions
- Welcome to add themselves to a CONTRIBUTORS file (future)
- 🐛 Bug reporters who provide detailed, reproducible issues
- 💻 Code contributors who submit PRs
- 📝 Documentation improvers
- 🧪 Test writers and reviewers
- 💬 Community helpers who support other users
- 🎨 UI/UX improvers (for dashboard contributions)
Thank you for contributing to MCP Memory Service! Your efforts help make AI assistants more capable and useful for everyone. 🚀
If you have questions not covered here, please open a Discussion or check our Wiki.