cf-mcp 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6ac6ddc9bfd8c2ba7af914a9abde416092e436ed650ebf153987c2ed6ed5369
4
- data.tar.gz: 3f573e333e680a2975bc858179911ae45a4b2382b5ceaeed9ab2432dfec070c9
3
+ metadata.gz: 5174a31e0d47a40d1096f72d31faba152e8bb0b152f18e50b531b08914fc91ce
4
+ data.tar.gz: aac343fc66cb7e6cbf6c970bcda8783928323ff46884578fbf5ad146261bed11
5
5
  SHA512:
6
- metadata.gz: 9c14eb9de223630781010533916abc12999b7186e06dd476d3737a7e66813827806cd5e6b1f1d5571960ea0e3d05bf6025a097ee6c298eb48d1cb90e4fba91f4
7
- data.tar.gz: 8427a7e2dd1ccb6cdd785292273199e15afc5644a81eff5ee2904efb464da055449c72b404bb6c6cff56d2f166cc6913011cca82c703ec9aaf1187b20e7b8da5
6
+ metadata.gz: 46af43cb876c7cd63d118e45e83c857ebfba53b010b2f7e5f1ad66965cb93e72eeb112f7ea336af967d7a79e25b8db93b33e8d85fedb95fd91868f48671efc7e
7
+ data.tar.gz: 94c9a33174d1be1b4b236e4603c3eb8f87c5e6905f79c861e455eec6ed4cad36bf16360bc979f363fb4429794cfd2805eb02873901f606fb510730724eaf8e73
data/README.md CHANGED
@@ -35,6 +35,34 @@ cf-mcp stdio --root /path/to/cute_framework_project # STDIO mode
35
35
  cf-mcp http --root /path/to/cute_framework_project # HTTP mode with web UI
36
36
  ```
37
37
 
38
+ ## Inspecting with MCP Inspector
39
+
40
+ You can use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to debug and test the server.
41
+
42
+ ### STDIO Mode
43
+
44
+ Run the inspector with the cf-mcp command directly:
45
+
46
+ ```bash
47
+ npx @modelcontextprotocol/inspector cf-mcp stdio --root /path/to/cute_framework
48
+ ```
49
+
50
+ This starts the inspector web UI at `http://localhost:6274` connected to your MCP server.
51
+
52
+ ### HTTP Mode
53
+
54
+ First, start the server in HTTP mode:
55
+
56
+ ```bash
57
+ cf-mcp http --root /path/to/cute_framework --port 9292
58
+ ```
59
+
60
+ Then launch the inspector and connect using Streamable HTTP transport to:
61
+
62
+ ```
63
+ http://localhost:9292/http
64
+ ```
65
+
38
66
  ## Development
39
67
 
40
68
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ require "standard/rake"
9
9
 
10
10
  desc "Generate Manifest.txt from git ls-files"
11
11
  task :manifest do
12
- ignore_patterns = %w[bin/ Gemfile .gitignore test/ .github/ .standard.yml cf-mcp.gemspec .ruby-version CLAUDE.md fly.toml Procfile Dockerfile .dockerignore .claude/]
12
+ ignore_patterns = %w[bin/ Gemfile .gitignore test/ .github/ .standard.yml cf-mcp.gemspec .ruby-version CLAUDE.md AGENTS.md fly.toml Procfile Dockerfile .dockerignore .claude/]
13
13
 
14
14
  files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
15
15
  ls.readlines("\x0", chomp: true)
@@ -102,7 +102,7 @@ module CF
102
102
  FileUtils.mkdir_p(target_path)
103
103
  else
104
104
  FileUtils.mkdir_p(File.dirname(target_path))
105
- entry.extract(target_path)
105
+ entry.extract(relative_path, destination_directory: base_path)
106
106
  end
107
107
  end
108
108
  end
data/lib/cf/mcp/server.rb CHANGED
@@ -61,7 +61,7 @@ module CF
61
61
 
62
62
  def initialize(index)
63
63
  @index = index
64
- configuration = ::MCP::Configuration.new(protocol_version: "2024-11-05")
64
+ configuration = ::MCP::Configuration.new(protocol_version: "2025-06-18")
65
65
  @server = ::MCP::Server.new(
66
66
  name: "cf-mcp",
67
67
  configuration:,
@@ -9,7 +9,10 @@ module CF
9
9
  class FindRelated < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: Find Related"
13
+
12
14
  tool_name "cf_find_related"
15
+ title TITLE
13
16
  description "Find all items related to a given Cute Framework item (bidirectional relationship search)"
14
17
 
15
18
  input_schema(
@@ -20,6 +23,14 @@ module CF
20
23
  required: ["name"]
21
24
  )
22
25
 
26
+ annotations(
27
+ title: TITLE,
28
+ read_only_hint: true,
29
+ destructive_hint: false,
30
+ idempotent_hint: true,
31
+ open_world_hint: false
32
+ )
33
+
23
34
  def self.call(name:, server_context: {})
24
35
  index = server_context[:index]
25
36
  return error_response("Index not available") unless index
@@ -9,7 +9,10 @@ module CF
9
9
  class GetDetails < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: Get Details"
13
+
12
14
  tool_name "cf_get_details"
15
+ title TITLE
13
16
  description "Get detailed documentation for a specific Cute Framework item by exact name"
14
17
 
15
18
  input_schema(
@@ -20,6 +23,14 @@ module CF
20
23
  required: ["name"]
21
24
  )
22
25
 
26
+ annotations(
27
+ title: TITLE,
28
+ read_only_hint: true,
29
+ destructive_hint: false,
30
+ idempotent_hint: true,
31
+ open_world_hint: false
32
+ )
33
+
23
34
  NAMING_TIP = "**Tip:** Cute Framework uses `cf_` prefix for functions and `CF_` prefix for types (structs/enums)."
24
35
 
25
36
  def self.call(name:, server_context: {})
@@ -9,7 +9,10 @@ module CF
9
9
  class GetTopic < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: Get Topic"
13
+
12
14
  tool_name "cf_get_topic"
15
+ title TITLE
13
16
  description "Get the full content of a Cute Framework topic guide document"
14
17
 
15
18
  input_schema(
@@ -20,6 +23,14 @@ module CF
20
23
  required: ["name"]
21
24
  )
22
25
 
26
+ annotations(
27
+ title: TITLE,
28
+ read_only_hint: true,
29
+ destructive_hint: false,
30
+ idempotent_hint: true,
31
+ open_world_hint: false
32
+ )
33
+
23
34
  def self.call(name:, server_context: {})
24
35
  index = server_context[:index]
25
36
  return error_response("Index not available") unless index
@@ -9,7 +9,10 @@ module CF
9
9
  class ListCategory < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: List Category"
13
+
12
14
  tool_name "cf_list_category"
15
+ title TITLE
13
16
  description "List all items in a specific category, or list all available categories"
14
17
 
15
18
  input_schema(
@@ -20,6 +23,14 @@ module CF
20
23
  }
21
24
  )
22
25
 
26
+ annotations(
27
+ title: TITLE,
28
+ read_only_hint: true,
29
+ destructive_hint: false,
30
+ idempotent_hint: true,
31
+ open_world_hint: false
32
+ )
33
+
23
34
  def self.call(category: nil, type: nil, server_context: {})
24
35
  index = server_context[:index]
25
36
  return error_response("Index not available") unless index
@@ -9,7 +9,10 @@ module CF
9
9
  class ListTopics < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: List Topics"
13
+
12
14
  tool_name "cf_list_topics"
15
+ title TITLE
13
16
  description "List all Cute Framework topic guides, optionally filtered by category or in recommended reading order"
14
17
 
15
18
  input_schema(
@@ -20,6 +23,14 @@ module CF
20
23
  }
21
24
  )
22
25
 
26
+ annotations(
27
+ title: TITLE,
28
+ read_only_hint: true,
29
+ destructive_hint: false,
30
+ idempotent_hint: true,
31
+ open_world_hint: false
32
+ )
33
+
23
34
  def self.call(category: nil, ordered: false, server_context: {})
24
35
  index = server_context[:index]
25
36
  return error_response("Index not available") unless index
@@ -9,7 +9,10 @@ module CF
9
9
  class MemberSearch < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: Member Search"
13
+
12
14
  tool_name "cf_member_search"
15
+ title TITLE
13
16
  description "Search Cute Framework structs by member name or type"
14
17
 
15
18
  input_schema(
@@ -21,6 +24,14 @@ module CF
21
24
  required: ["query"]
22
25
  )
23
26
 
27
+ annotations(
28
+ title: TITLE,
29
+ read_only_hint: true,
30
+ destructive_hint: false,
31
+ idempotent_hint: true,
32
+ open_world_hint: false
33
+ )
34
+
24
35
  def self.call(query:, limit: 20, server_context: {})
25
36
  index = server_context[:index]
26
37
  return error_response("Index not available") unless index
@@ -9,7 +9,10 @@ module CF
9
9
  class ParameterSearch < ::MCP::Tool
10
10
  extend ResponseHelpers
11
11
 
12
+ TITLE = "CF: Parameter Search"
13
+
12
14
  tool_name "cf_parameter_search"
15
+ title TITLE
13
16
  description "Find Cute Framework functions by parameter or return type"
14
17
 
15
18
  input_schema(
@@ -25,6 +28,14 @@ module CF
25
28
  required: ["type"]
26
29
  )
27
30
 
31
+ annotations(
32
+ title: TITLE,
33
+ read_only_hint: true,
34
+ destructive_hint: false,
35
+ idempotent_hint: true,
36
+ open_world_hint: false
37
+ )
38
+
28
39
  def self.call(type:, direction: "both", server_context: {})
29
40
  index = server_context[:index]
30
41
  return error_response("Index not available") unless index
@@ -11,7 +11,10 @@ module CF
11
11
  extend ResponseHelpers
12
12
  extend SearchResultFormatter
13
13
 
14
+ TITLE = "CF: Search Enums"
15
+
14
16
  tool_name "cf_search_enums"
17
+ title TITLE
15
18
  description "Search Cute Framework enums"
16
19
 
17
20
  input_schema(
@@ -24,6 +27,14 @@ module CF
24
27
  required: ["query"]
25
28
  )
26
29
 
30
+ annotations(
31
+ title: TITLE,
32
+ read_only_hint: true,
33
+ destructive_hint: false,
34
+ idempotent_hint: true,
35
+ open_world_hint: false
36
+ )
37
+
27
38
  DETAILS_TIP = "**Tip:** Use `cf_get_details` with an exact name to get full documentation including values and examples."
28
39
 
29
40
  def self.call(query:, category: nil, limit: 20, server_context: {})
@@ -11,7 +11,10 @@ module CF
11
11
  extend ResponseHelpers
12
12
  extend SearchResultFormatter
13
13
 
14
+ TITLE = "CF: Search Functions"
15
+
14
16
  tool_name "cf_search_functions"
17
+ title TITLE
15
18
  description "Search Cute Framework functions"
16
19
 
17
20
  input_schema(
@@ -24,6 +27,14 @@ module CF
24
27
  required: ["query"]
25
28
  )
26
29
 
30
+ annotations(
31
+ title: TITLE,
32
+ read_only_hint: true,
33
+ destructive_hint: false,
34
+ idempotent_hint: true,
35
+ open_world_hint: false
36
+ )
37
+
27
38
  DETAILS_TIP = "**Tip:** Use `cf_get_details` with an exact name to get full documentation including signature, parameters, and examples."
28
39
 
29
40
  def self.call(query:, category: nil, limit: 20, server_context: {})
@@ -11,7 +11,10 @@ module CF
11
11
  extend ResponseHelpers
12
12
  extend SearchResultFormatter
13
13
 
14
+ TITLE = "CF: Search Structs"
15
+
14
16
  tool_name "cf_search_structs"
17
+ title TITLE
15
18
  description "Search Cute Framework structs"
16
19
 
17
20
  input_schema(
@@ -24,6 +27,14 @@ module CF
24
27
  required: ["query"]
25
28
  )
26
29
 
30
+ annotations(
31
+ title: TITLE,
32
+ read_only_hint: true,
33
+ destructive_hint: false,
34
+ idempotent_hint: true,
35
+ open_world_hint: false
36
+ )
37
+
27
38
  DETAILS_TIP = "**Tip:** Use `cf_get_details` with an exact name to get full documentation including members and examples."
28
39
 
29
40
  def self.call(query:, category: nil, limit: 20, server_context: {})
@@ -11,7 +11,10 @@ module CF
11
11
  extend ResponseHelpers
12
12
  extend SearchResultFormatter
13
13
 
14
+ TITLE = "CF: Search"
15
+
14
16
  tool_name "cf_search"
17
+ title TITLE
15
18
  description "Search Cute Framework documentation across all types (functions, structs, enums, topics)"
16
19
 
17
20
  input_schema(
@@ -25,6 +28,14 @@ module CF
25
28
  required: ["query"]
26
29
  )
27
30
 
31
+ annotations(
32
+ title: TITLE,
33
+ read_only_hint: true,
34
+ destructive_hint: false,
35
+ idempotent_hint: true,
36
+ open_world_hint: false
37
+ )
38
+
28
39
  DETAILS_TIP = "**Tip:** Use `cf_get_details` for API items or `cf_get_topic` for topic guides to get full documentation."
29
40
 
30
41
  def self.call(query:, type: nil, category: nil, limit: 20, server_context: {})
@@ -2,6 +2,6 @@
2
2
 
3
3
  module CF
4
4
  module MCP
5
- VERSION = "0.13.1"
5
+ VERSION = "0.14.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Usewicz
@@ -15,28 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.5'
18
+ version: '0.6'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0.5'
25
+ version: '0.6'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: puma
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.0'
32
+ version: '7.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '6.0'
39
+ version: '7.1'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rack
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -71,14 +71,14 @@ dependencies:
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '2.3'
74
+ version: '3.2'
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '2.3'
81
+ version: '3.2'
82
82
  description: An MCP server that indexes Cute Framework header files and provides search
83
83
  functionality for structs, functions, enums, and other elements.
84
84
  email: