Skip to main content
Glama
davidteren

Claude Server MCP

by davidteren

克劳德服务器 MCP

⚠️重要提示:项目状态⚠️

该项目处于早期开发阶段(v0.1.0),尚未准备好投入生产使用。目前正在进行重大重写,以解决几个关键问题。请查看“问题”页面,了解当前的限制和计划的改进。

我们建议等待稳定版本(v0.2.0+)发布后再在任何关键工作流程中使用它。

模型上下文协议 (MCP) 服务器为 Claude 提供复杂的上下文管理功能,支持跨会话的持久上下文、特定于项目的上下文组织和对话连续性。

当前限制

  • 服务器目前与 Claude Desktop 以外的 MCP 客户端存在兼容性问题

  • 如果没有特定的项目 ID,上下文列表功能将受到限制

  • 安全功能很少,尚未投入生产

  • 错误处理是基本的,可能无法提供有用的指导

  • 尚未建立测试基础设施

Related MCP server: MCP Memory Keeper

发展路线图

该项目正在积极改进中。即将推出的主要增强功能包括:

  1. 稳定性改进——修复主目录解析和上下文列表的核心问题

  2. 增强的错误处理——更好的错误消息和恢复机制

  3. 安全增强——输入验证、路径清理和数据保护

  4. 高级上下文管理——版本控制、搜索和更好的组织

如需更详细的路线图,请参阅我们的综合分析分支。

特征

  • 项目上下文管理

    • 层次化上下文组织

    • 亲子关系

    • 上下文之间的交叉引用

    • 项目特定的元数据

  • 对话连续性

    • 基于会话的上下文跟踪

    • 对话链

    • 元数据丰富的上下文存储

    • 灵活的标记系统

  • 高效存储

    • 有组织的目录结构

    • 基于 JSON 的存储

    • 快速查找索引

    • 异步操作

安装

服务器会自动在您的 Claude 桌面应用的 MCP 设置中配置。所有上下文都存储在~/.claude/中,以便更好地组织:

~/.claude/
├── contexts/           # General conversation contexts
├── projects/          # Project-specific contexts
└── context-index.json # Quick lookup index

工具

项目上下文管理

// Save project context
use_mcp_tool({
  server_name: "claude-server",
  tool_name: "save_project_context",
  arguments: {
    id: "feature-design-v1",
    projectId: "my-project",
    content: "Design discussion...",
    parentContextId: "requirements-v1",
    references: ["api-spec-v1"],
    tags: ["design"],
    metadata: { status: "in-progress" }
  }
});

对话管理

// Save conversation context
use_mcp_tool({
  server_name: "claude-server",
  tool_name: "save_conversation_context",
  arguments: {
    id: "chat-2024-01-01",
    sessionId: "session-123",
    content: "Discussion content...",
    continuationOf: "previous-chat-id",
    tags: ["meeting"]
  }
});

上下文检索

// Get context
use_mcp_tool({
  server_name: "claude-server",
  tool_name: "get_context",
  arguments: {
    id: "feature-design-v1",
    projectId: "my-project"
  }
});

// List contexts
use_mcp_tool({
  server_name: "claude-server",
  tool_name: "list_contexts",
  arguments: {
    projectId: "my-project",
    tag: "design",
    type: "project"
  }
});

文档

发展

  1. 克隆存储库

  2. 安装依赖项:

    npm install
  3. 构建服务器:

    npm run build
  4. 服务器将构建到build/index.js

配置

服务器通过 Claude 桌面应用程序的配置文件进行配置: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "claude-server": {
      "command": "node",
      "args": ["/path/to/claude-server/build/index.js"]
    }
  }
}

贡献

欢迎贡献!请随时提交问题和拉取请求。

执照

麻省理工学院

Available Tools

4 tools
get_contextC

Retrieve context by ID and optional project ID

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesID of the context to retrieve
projectIdNoOptional project ID for project contexts

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the action ('retrieve') but lacks behavioral details such as whether this is a read-only operation, error handling, permissions needed, or rate limits. The description is minimal and doesn't compensate for the absence of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence that directly states the tool's purpose. It's front-loaded and wastes no words, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'context' entails, the return format, or how it interacts with sibling tools. For a tool with 2 parameters and behavioral uncertainty, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain context types or project relationships). Baseline 3 is appropriate as the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('retrieve') and resource ('context'), specifying it's done by ID with an optional project ID. However, it doesn't differentiate from sibling tools like 'list_contexts' or 'save_conversation_context', which would require more specific scope or purpose details.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions an optional project ID but doesn't explain when to include it or how this tool differs from siblings like 'list_contexts' or save operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_contextsC

List contexts with filtering options

ParametersJSON Schema
NameRequiredDescriptionDefault
projectIdNoOptional project ID to filter by
tagNoOptional tag to filter by
typeNoOptional type to filter by

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read operation with filtering but doesn't disclose critical details like pagination, rate limits, authentication needs, or what 'list contexts' entails (e.g., format, scope). This leaves significant gaps for agent understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence that front-loads the core purpose ('List contexts') and adds a brief qualifier ('with filtering options'). There is zero wasted verbiage, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a read operation with filtering, the description is incomplete. It lacks details on return values, error handling, or behavioral constraints, leaving the agent with insufficient context to use the tool effectively beyond basic parameter input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all three optional parameters (projectId, tag, type with enum). The description adds no additional meaning beyond implying filtering exists, matching the baseline for high schema coverage without extra param insights.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List contexts') and mentions filtering capabilities, which distinguishes it from simple listing operations. However, it doesn't explicitly differentiate from sibling tools like 'get_context' (which might retrieve a single context) or the save operations, missing full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_context' for single context retrieval or the save tools for creation. It mentions filtering options but doesn't specify scenarios or prerequisites for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

save_conversation_contextC

Save conversation context with continuation support

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier for the context
sessionIdYesConversation session identifier
contentYesContext content to save
continuationOfNoOptional ID of previous context
tagsNoOptional tags for categorizing
metadataNoOptional additional metadata

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Save' implies a write operation, but the description doesn't address permissions needed, whether this overwrites existing context with the same ID, what happens on success/failure, or any rate limits. The 'continuation support' hint is useful but insufficient for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 5 words, front-loading the core purpose. Every word earns its place: 'Save' (action), 'conversation context' (resource), 'with continuation support' (key feature). There's zero waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what happens after saving, what format the saved context takes, whether there are size limits on content, or how continuation actually works. The agent lacks crucial information about this write operation's behavior and outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema descriptions. The baseline score of 3 is appropriate when the schema does the heavy lifting, though the description could have explained relationships between parameters like how 'continuationOf' relates to 'id'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool saves conversation context with continuation support, which is a clear verb+resource combination. However, it doesn't distinguish this from its sibling 'save_project_context' - both appear to save context but for different types (conversation vs project). The purpose is understandable but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose 'save_conversation_context' over 'save_project_context', nor any prerequisites or typical use cases. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

save_project_contextC

Save project-specific context with relationships

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier for the context
projectIdYesProject identifier
contentYesContext content to save
parentContextIdNoOptional ID of parent context
referencesNoOptional related context IDs
tagsNoOptional tags for categorizing
metadataNoOptional additional metadata

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool saves context with relationships, implying a write operation, but doesn't disclose critical behaviors like whether it overwrites existing context with the same ID, what permissions are required, error conditions, or response format. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('save project-specific context with relationships') with zero waste. Every word earns its place, making it appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, mutation operation, no output schema, and no annotations), the description is incomplete. It doesn't explain the return values, error handling, or behavioral nuances like how 'relationships' are enforced or what happens on duplicate IDs. For a save operation with rich parameters, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds no additional meaning beyond implying relationships via 'parentContextId' and 'references', which is already clear from the schema. With high schema coverage, the baseline is 3, and the description doesn't compensate with extra insights.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('save') and resource ('project-specific context with relationships'), which is specific and actionable. It distinguishes from sibling 'save_conversation_context' by specifying 'project-specific' context, though it doesn't explicitly differentiate from 'get_context' or 'list_contexts' beyond the save vs. get/list distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'save_conversation_context' for conversation contexts or when to retrieve vs. save using 'get_context'/'list_contexts'. It lacks explicit when/when-not instructions or prerequisites, leaving usage context implied by the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • Addedget_context
    • Addedlist_contexts
    • Addedsave_conversation_context
    • Addedsave_project_context

TDQS

B3.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: get_context retrieves a specific context, list_contexts lists contexts with filters, save_conversation_context saves conversation-specific context, and save_project_context saves project-specific context. The descriptions clearly differentiate between retrieval, listing, and two types of saving operations.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (get_context, list_contexts, save_conversation_context, save_project_context) with clear, descriptive names. The naming convention is uniform throughout the set, making it easy to understand each tool's function at a glance.

Tool Count4/5

With 4 tools, the count is reasonable for a context management server, covering key operations like retrieval, listing, and saving. It feels slightly minimal but well-scoped, as each tool serves a distinct and necessary function without redundancy.

Completeness4/5

The tool set provides good coverage for context management with get, list, and save operations for both conversation and project contexts. A minor gap exists in update or delete functionality for contexts, but agents can likely work around this by re-saving or managing contexts through the provided tools.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server for Claude Desktop that provides structured memory management across chat sessions, allowing Claude to maintain context and build a knowledge base within project directories.
    6 npm
    6
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides persistent context management for Claude AI coding assistants, allowing you to save and restore conversation context, create checkpoints, and organize information across sessions to prevent losing important work history and decisions during long coding sessions.
    122 npm
    135
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides Claude with a persistent local memory and structured knowledge graph to track project states, tasks, and historical decisions across different chat sessions. It enables users to recall information using keyword relevance, time-travel queries, and dependency analysis for complex project management.
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Provides persistent personal context storage across AI conversations, allowing AI assistants to remember user preferences, project conventions, and other personal information between sessions.
    8
    -