This guide shows you how to manually test the agentic knowledge MCP server to verify it's working correctly.
- Start the server in a project with configuration:
cd your-project-with-knowledge-config
npx @codemcp/knowledge- Test tools/list request:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npx @codemcp/knowledgeExpected response: JSON with search_docs and list_docsets tools.
- Test list_docsets:
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_docsets","arguments":{}}}' | npx @codemcp/knowledgeExpected response: List of available docsets from your configuration.
- Test search_docs:
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_docs","arguments":{"docset_id":"your-docset-id","keywords":"search terms","generalized_keywords":"related terms"}}}' | npx @codemcp/knowledgeExpected response: Intelligent search instructions based on your template.
Run the comprehensive test suite:
cd agentic-knowledge
pnpm test # All unit and integration tests
pnpm test:e2e # End-to-end MCP protocol compliance testsThe e2e tests specifically validate that parameter descriptions clearly distinguish between:
keywords: Primary search terms (specific targets)generalized_keywords: Related/contextual terms (broader context)
This ensures LLMs understand how to properly use the search functionality.
The tests validate:
- ✅ Server creation: <1ms
- ✅ E2E response time: <1ms (well under 10ms requirement)
- ✅ Memory usage: <1MB
- Configuration discovery and loading
- YAML parsing and validation
- Path calculation and resolution
- Template processing and variable substitution
- Error handling and edge cases
- Server lifecycle and caching
- MCP protocol compliance
- Real client-server communication
- Tool schema validation
- Parameter description verification
- Error handling with graceful responses
- Custom template processing
- Performance requirements
All tests should pass:
Test Files 1 passed (1)
Tests 12 passed (12)
Duration ~1.5s
If any tests fail, check:
- All dependencies installed (
pnpm install) - Project built successfully (
pnpm build) - No configuration conflicts in test environment