A Model Context Protocol (MCP) server that provides cognitive tools for thought processes, goal tracking, and dynamic skill creation with user registration and email verification.
Try it out here: https://www.val.town/x/c15r/Chat
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema (user-scoped + legacy)
│ │ ├── queries.ts # Database operations with user scoping
│ │ └── user-queries.ts # User management operations
│ ├── mcp/
│ │ ├── server.ts # MCP server implementation
│ │ ├── auth.ts # Authentication (admin + user tokens)
│ │ └── tools/ # Cognitive tools
│ │ ├── blob.ts # Blob storage management
│ │ ├── fork-thought.ts # AI-enhanced thought forking
│ │ ├── goals.ts # Goal management with deletion
│ │ ├── tasks.ts # Task management with deletion
│ │ ├── states.ts # Cognitive state management
│ │ ├── skills.ts # Dynamic skills with deletion
│ │ ├── sqlite.ts # SQLite database operations
│ │ └── user-registration.ts # User registration & verification
│ └── index.ts # Main entry point with verification endpoint
├── shared/
│ └── types.ts # Shared TypeScript types (user-scoped)
└── README.md
MCP_AUTH_TOKEN
: Admin authentication token (optional)BASE_URL
: Base URL for email verification links (optional)GET /
- API documentation and statusGET /health
- Health check endpointPOST /register
- User registration (no auth required)GET /verify?token=...
- Email verification (no auth required)POST /mcp
- Main MCP protocol endpoint (conditional auth)GET /tools
- List available tools (conditional auth)# Register via HTTP endpoint curl -X POST https://your-server.com/register \ -H "Content-Type: application/json" \ -d '{"email": "user@example.com"}' # Or via MCP (no auth required) { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "register_user", "arguments": { "email": "user@example.com" } } }
Check your email and click the verification link, or visit:
https://your-server.com/verify?token=YOUR_VERIFICATION_TOKEN
Use the access token from the verification page in the Authorization
header:
curl -X POST https://your-server.com/mcp \ -H "Authorization: YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
Create AI-enhanced thought forks that automatically generate multiple perspectives:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "create_thought_fork", "arguments": { "title": "AI Ethics in Healthcare", "description": "Explore the ethical implications of AI in medical diagnosis and treatment", "branches": 4 } } }
This will:
Merge the explorations with AI synthesis:
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "merge_thought_fork", "arguments": { "id": "thought-fork-id" } } }
The blob storage system provides secure, user-namespaced key-value storage for arbitrary data:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "blob_set", "arguments": { "key": "user-preferences", "value": { "theme": "dark", "language": "en", "notifications": true } } } }
Retrieve stored data:
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "blob_get", "arguments": { "key": "user-preferences" } } }
List all your stored blobs:
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "blob_list", "arguments": { "prefix": "config-" } } }
The SQLite database system provides secure, user-scoped database operations for structured data storage:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "sqlite_create_table", "arguments": { "tableName": "user_notes", "schema": "id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT NOT NULL, content TEXT, created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP" } } }
Insert data into your table:
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "sqlite_execute", "arguments": { "query": "INSERT INTO user_notes (title, content) VALUES (?, ?)", "params": ["My First Note", "This is the content of my note"] } } }
Query your data:
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "sqlite_execute", "arguments": { "query": "SELECT * FROM user_notes WHERE title LIKE ?", "params": ["%First%"] } } }
List all your tables:
{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "sqlite_list_tables", "arguments": {} } }
Get table schema information:
{ "jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": { "name": "sqlite_describe_table", "arguments": { "tableName": "user_notes" } } }
All resources support full deletion with dependency handling:
MCP_AUTH_TOKEN
environment variableregister_user
- Register with emailverify_email
- Verify email with tokenresend_verification
- Resend verification emailblob_list
, blob_get
, blob_set
, blob_delete
, blob_exists
sqlite_execute
, sqlite_create_table
, sqlite_list_tables
, sqlite_describe_table
, sqlite_drop_table
create_thought_fork
, merge_thought_fork
, delete_thought_fork
create_goal
, update_goal
, delete_goal
, list_goals
create_task
, update_task
, delete_task
, list_tasks
save_cognitive_state
, load_cognitive_state
, delete_cognitive_state
create_skill
, execute_skill
, delete_skill
, list_skills
skill_[name]
- Execute user-created skills dynamicallyregister_user
with emailblob_set
to store configuration or datasqlite_create_table
to set up structured data storagecreate_goal
to set objectivescreate_thought_fork
for AI-assisted analysismerge_thought_fork
for AI synthesiscreate_task
sqlite_execute
to insert and query datacreate_skill
save_cognitive_state
Server Version: 2.0.0 - Now with user registration and AI-enhanced cognitive tools