sokrates-mcp 0.4.1__tar.gz → 0.4.3__tar.gz

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.
Files changed (20) hide show
  1. {sokrates_mcp-0.4.1/src/sokrates_mcp.egg-info → sokrates_mcp-0.4.3}/PKG-INFO +7 -2
  2. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/README.md +6 -1
  3. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/pyproject.toml +1 -1
  4. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp/main.py +3 -90
  5. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp/mcp_config.py +1 -4
  6. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp/workflow.py +19 -1
  7. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3/src/sokrates_mcp.egg-info}/PKG-INFO +7 -2
  8. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/LICENSE +0 -0
  9. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/MANIFEST.in +0 -0
  10. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/config.yml.example +0 -0
  11. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/setup.cfg +0 -0
  12. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp/__init__.py +0 -0
  13. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp/utils.py +0 -0
  14. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp.egg-info/SOURCES.txt +0 -0
  15. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp.egg-info/dependency_links.txt +0 -0
  16. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp.egg-info/entry_points.txt +0 -0
  17. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp.egg-info/requires.txt +0 -0
  18. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp.egg-info/top_level.txt +0 -0
  19. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp_client/__init__.py +0 -0
  20. {sokrates_mcp-0.4.1 → sokrates_mcp-0.4.3}/src/sokrates_mcp_client/mcp_client_example.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sokrates-mcp
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: A templated MCP server for demonstration and quick start.
5
5
  Author-email: Julian Weber <julianweberdev@gmail.com>
6
6
  License: MIT License
@@ -39,7 +39,7 @@ Dynamic: license-file
39
39
  # sokrates-mcp
40
40
 
41
41
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
42
- [![Version: 0.4.1](https://img.shields.io/badge/version-0.4.1-green)](https://github.com/Kubementat/sokrates-mcp)
42
+ [![Version: 0.4.3](https://img.shields.io/badge/version-0.4.3-green)](https://github.com/Kubementat/sokrates-mcp)
43
43
 
44
44
  A MCP server offering tools for prompt refinement and execution workflows using the FastMCP framework and the `sokrates` python library.
45
45
 
@@ -213,6 +213,11 @@ If you see "ModuleNotFoundError: fastmcp", ensure:
213
213
  2. Python virtual environment is activated
214
214
 
215
215
  ## Changelog
216
+ **0.4.3 (Sep 2025)**
217
+ - bugfix in workflow class - fix refinement workflow
218
+
219
+ **0.4.2 (Sep 2025)**
220
+ - Update version to 0.4.2
216
221
 
217
222
  **0.4.1 (Sep 2025)**
218
223
  - fix roll_dice tool
@@ -1,7 +1,7 @@
1
1
  # sokrates-mcp
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4
- [![Version: 0.4.1](https://img.shields.io/badge/version-0.4.1-green)](https://github.com/Kubementat/sokrates-mcp)
4
+ [![Version: 0.4.3](https://img.shields.io/badge/version-0.4.3-green)](https://github.com/Kubementat/sokrates-mcp)
5
5
 
6
6
  A MCP server offering tools for prompt refinement and execution workflows using the FastMCP framework and the `sokrates` python library.
7
7
 
@@ -175,6 +175,11 @@ If you see "ModuleNotFoundError: fastmcp", ensure:
175
175
  2. Python virtual environment is activated
176
176
 
177
177
  ## Changelog
178
+ **0.4.3 (Sep 2025)**
179
+ - bugfix in workflow class - fix refinement workflow
180
+
181
+ **0.4.2 (Sep 2025)**
182
+ - Update version to 0.4.2
178
183
 
179
184
  **0.4.1 (Sep 2025)**
180
185
  - fix roll_dice tool
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sokrates-mcp"
3
- version = "0.4.1"
3
+ version = "0.4.3"
4
4
  description = "A templated MCP server for demonstration and quick start."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -9,94 +9,7 @@
9
9
  # through various prompt engineering workflows. It provides APIs for refining prompts, executing them externally,
10
10
  # breaking down complex tasks, generating ideas, performing code reviews, and listing available models/providers.
11
11
  #
12
- # Parameters
13
- # - `refine_prompt`: Refines a given prompt by enriching it with additional context.
14
- # - `prompt` (str): The input prompt to be refined.
15
- # - `refinement_type` (str, optional): Type of refinement ('code' or 'default'). Default is 'default'.
16
- # - `provider` (str, optional): Name of the provider to use for refinement. Default is 'default'.
17
- # - `model` (str, optional): Model name for refinement. Default is 'default'.
18
12
  #
19
- # - `refine_and_execute_external_prompt`: Refines a prompt and executes it with an external LLM.
20
- # - `prompt` (str): The input prompt to be refined and executed.
21
- # - `provider` (str, optional): Name of the provider to use for LLM interactions. Default is 'default'.
22
- # - `refinement_model` (str, optional): Model for refinement. Default is 'default'.
23
- # - `execution_model` (str, optional): Model for execution. Default is 'default'.
24
- # - `refinement_type` (str, optional): Type of refinement ('code' or 'default'). Default is 'default'.
25
- #
26
- # - `handover_prompt`: Hands over a prompt to an external LLM for processing.
27
- # - `prompt` (str): The prompt to be executed externally.
28
- # - `provider` (str, optional): Name of the provider to use for LLM interactions. Default is 'default'.
29
- # - `model` (str, optional): Model name for execution. Default is 'default'.
30
- # - `temperature` (float, optional): Temperature for the external execution. Default is 0.7.
31
- #
32
- # - `breakdown_task`: Breaks down a task into sub-tasks with complexity ratings.
33
- # - `task` (str): The full task description to break down.
34
- # - `provider` (str, optional): Name of the provider to use for LLM interactions. Default is 'default'.
35
- # - `model` (str, optional): Model name for processing. Default is 'default'.
36
- #
37
- # - `generate_random_ideas`: Generates random ideas on a random topic.
38
- # - `idea_count` (int, optional): Number of ideas to generate. Default is 1.
39
- # - `provider` (str, optional): Name of the provider to use for LLM interactions. Default is 'default'.
40
- # - `model` (str, optional): Model name for generation. Default is 'default'.
41
- # - `temperature` (float, optional): Temperature for idea generation. Default is 0.7.
42
- #
43
- # - `generate_ideas_on_topic`: Generates ideas on a specific topic.
44
- # - `topic` (str): The topic to generate ideas for.
45
- # - `provider` (str, optional): Name of the provider to use for LLM interactions. Default is 'default'.
46
- # - `model` (str, optional): Model name for generation. Default is 'default'.
47
- # - `idea_count` (int, optional): Number of ideas to generate. Default is 1.
48
- # - `temperature` (float, optional): Temperature for idea generation. Default is 0.7.
49
- #
50
- # - `generate_code_review`: Generates a code review in markdown format.
51
- # - `source_file_paths` (list): List of source file paths to be reviewed.
52
- # - `target_directory` (str): Directory to store the resulting review files.
53
- # - `provider` (str, optional): Name of the provider to use for LLM interactions. Default is 'default'.
54
- # - `model` (str, optional): Model name for code review generation. Default is 'default'.
55
- # - `review_type` (str, optional): Type of review ('style', 'security', 'performance', 'quality'). Default is 'quality'.
56
- #
57
- # - `list_available_models_for_provider`: Lists all available large language models for a specific provider.
58
- # - `provider_name` (str, optional): Name of the provider to list models for. Default is empty (uses default).
59
- #
60
- # - `list_available_providers`: Lists all configured and available API providers.
61
- #
62
- # Usage Examples
63
- # ```python
64
- # Refine a prompt
65
- # await refine_prompt("Write a Python function to sort a list", refinement_type="code")
66
- #
67
- # # Refine and execute a prompt with an external LLM
68
- # await refine_and_execute_external_prompt(
69
- # "Generate a summary of the following text: ...",
70
- # refinement_model="model1",
71
- # execution_model="model2"
72
- # )
73
- #
74
- # # Hand over a prompt to an external LLM
75
- # await handover_prompt("Translate this text to French: ...")
76
- #
77
- # # Break down a task into sub-tasks
78
- # await breakdown_task("Implement user authentication system")
79
- #
80
- # # Generate random ideas
81
- # await generate_random_ideas(idea_count=3)
82
- #
83
- # # Generate ideas on a topic
84
- # await generate_ideas_on_topic("AI in healthcare", idea_count=5)
85
- #
86
- # # Generate code review
87
- # await generate_code_review(
88
- # source_file_paths=["/path/to/file1.py", "/path/to/file2.py"],
89
- # target_directory="/path/to/reviews"
90
- # )
91
- #
92
- # # List available models for a provider
93
- # await list_available_models_for_provider("my-provider")
94
- #
95
- # # List all available providers
96
- # await list_available_providers()
97
- # ```
98
- #
99
-
100
13
  from typing import Annotated, Optional
101
14
  from pydantic import Field
102
15
  from .mcp_config import MCPConfig
@@ -107,7 +20,7 @@ import os
107
20
  import argparse
108
21
 
109
22
  MCP_NAME = "sokrates-mcp"
110
- VERSION = "0.2.0"
23
+ VERSION = "0.4.3"
111
24
  DEFAULT_PROVIDER_IDENTIFIER = "default"
112
25
  DEFAULT_MODEL_IDENTIFIER = "default"
113
26
  DEFAULT_REFINEMENT_TYPE = "default"
@@ -252,7 +165,7 @@ async def breakdown_task(task: Annotated[str, Field(description="The full task d
252
165
 
253
166
  @mcp.tool(
254
167
  name="generate_random_ideas",
255
- description="Invents and generates a random topic an generates the provided count of ideas on the topic.",
168
+ description="Invents and generates a random topic and generates the provided count of ideas on the topic.",
256
169
  tags={"idea", "generator","invention","random"}
257
170
  )
258
171
  async def generate_random_ideas(ctx: Context,
@@ -286,7 +199,7 @@ async def generate_ideas_on_topic(
286
199
  async def generate_code_review(
287
200
  ctx: Context,
288
201
  source_directory: Annotated[str, Field(description="The absolute directory path containing source files to create reviews for. This should contain source files on the local filesystem.")],
289
- source_file_paths: Annotated[list, Field(description="A list of absolute source file paths that should be reviewed. The paths should be absolute paths in the local filesystem.")],
202
+ source_file_paths: Annotated[list[str], Field(description="A list of absolute source file paths that should be reviewed. The paths should be absolute paths in the local filesystem.")],
290
203
  target_directory: Annotated[str, Field(description="The directory to store the resulting review markdown files. This should point to the desired target path for the markdown files on the local filesystem.")],
291
204
  provider: Annotated[str, Field(description="The name of the provider to use for LLM interactions. The default model name is 'default', which will pick the server's default provider configured.", default=DEFAULT_PROVIDER_IDENTIFIER)],
292
205
  model: Annotated[str, Field(description="[Optional] The name of the model that should be used for the generation. The default model name is 'default', which will pick the server's default model.", default=DEFAULT_MODEL_IDENTIFIER)],
@@ -8,7 +8,6 @@
8
8
  # - api_endpoint: API endpoint URL (default: http://localhost:1234/v1)
9
9
  # - api_key: API key for authentication (default: mykey)
10
10
  # - model: Model name to use (default: qwen/qwen3-4b-2507)
11
- # - verbose: Enable verbose logging (default: False)
12
11
  #
13
12
  # Usage example:
14
13
  # config = MCPConfig(api_endpoint="https://api.example.com", model="my-model")
@@ -54,7 +53,7 @@ class MCPConfig:
54
53
  "openai"
55
54
  ]
56
55
 
57
- def __init__(self, config_file_path: str = CONFIG_FILE_PATH, api_endpoint: str = DEFAULT_API_ENDPOINT, api_key: str = DEFAULT_API_KEY, model: str = DEFAULT_MODEL, verbose: bool = False):
56
+ def __init__(self, config_file_path: str = CONFIG_FILE_PATH, api_endpoint: str = DEFAULT_API_ENDPOINT, api_key: str = DEFAULT_API_KEY, model: str = DEFAULT_MODEL):
58
57
  """Initialize MCP configuration.
59
58
 
60
59
  Args:
@@ -63,11 +62,9 @@ class MCPConfig:
63
62
  api_endpoint (str): API endpoint URL. Defaults to DEFAULT_API_ENDPOINT.
64
63
  api_key (str): API key for authentication. Defaults to DEFAULT_API_KEY.
65
64
  model (str): Model name to use. Defaults to DEFAULT_MODEL.
66
- verbose (bool): Enable verbose logging. Defaults to False.
67
65
 
68
66
  Side Effects:
69
67
  Initializes instance attributes with values from config file or defaults
70
- Sets up logging based on verbose parameter
71
68
  """
72
69
  self.logger = logging.getLogger(__name__)
73
70
  self.config_file_path = config_file_path
@@ -10,7 +10,25 @@ from sokrates.coding.code_review_workflow import run_code_review
10
10
  from .mcp_config import MCPConfig
11
11
  from .utils import Utils
12
12
 
13
+ """Workflow module for Sokrates MCP server.
14
+
15
+ This module implements the :class:`Workflow` class which encapsulates
16
+ all business logic exposed as FastMCP tools. It relies on a validated
17
+ :class:`~sokrates_mcp.mcp_config.MCPConfig` instance and uses the
18
+ `sokrates` library to interact with LLM providers.
19
+ """
20
+
21
+ """Workflow module for Sokrates MCP server.
22
+
23
+ This module implements the :class:`Workflow` class which encapsulates
24
+ all business logic exposed as FastMCP tools. It relies on a validated
25
+ :class:`~sokrates_mcp.mcp_config.MCPConfig` instance and uses the
26
+ `sokrates` library to interact with LLM providers.
27
+ """
28
+
13
29
  class Workflow:
30
+
31
+
14
32
 
15
33
  WORKFLOW_COMPLETION_MESSAGE = "Workflow completed."
16
34
 
@@ -61,7 +79,7 @@ class Workflow:
61
79
  else:
62
80
  refinement_prompt_file = str(Path(f"{path}/{self.config.refinement_prompt_filename}").resolve())
63
81
 
64
- return FileHelper.read_file(refinement_prompt_file, verbose=False)
82
+ return FileHelper.read_file(refinement_prompt_file)
65
83
 
66
84
  async def refine_prompt(self, prompt: str, ctx: Context, provider: str, model: str, refinement_type: str = 'default') -> str:
67
85
  """Refine a given prompt by enriching it with additional context.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sokrates-mcp
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: A templated MCP server for demonstration and quick start.
5
5
  Author-email: Julian Weber <julianweberdev@gmail.com>
6
6
  License: MIT License
@@ -39,7 +39,7 @@ Dynamic: license-file
39
39
  # sokrates-mcp
40
40
 
41
41
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
42
- [![Version: 0.4.1](https://img.shields.io/badge/version-0.4.1-green)](https://github.com/Kubementat/sokrates-mcp)
42
+ [![Version: 0.4.3](https://img.shields.io/badge/version-0.4.3-green)](https://github.com/Kubementat/sokrates-mcp)
43
43
 
44
44
  A MCP server offering tools for prompt refinement and execution workflows using the FastMCP framework and the `sokrates` python library.
45
45
 
@@ -213,6 +213,11 @@ If you see "ModuleNotFoundError: fastmcp", ensure:
213
213
  2. Python virtual environment is activated
214
214
 
215
215
  ## Changelog
216
+ **0.4.3 (Sep 2025)**
217
+ - bugfix in workflow class - fix refinement workflow
218
+
219
+ **0.4.2 (Sep 2025)**
220
+ - Update version to 0.4.2
216
221
 
217
222
  **0.4.1 (Sep 2025)**
218
223
  - fix roll_dice tool
File without changes
File without changes
File without changes