DW-Service-Connector-MCP
Establishes connectivity to the DeepWriter proprietary service layer via the Model Context Protocol (MCP) interface. This utility manages the lifecycle of content artifacts, including their instantiation, modification, retrieval, and decommissioning within the DeepWriter ecosystem.
Author

deepwriter-ai
Quick Info
Actions
Tags
DeepWriter MCP Gateway
An implementation of the Model Context Protocol (MCP) server designed for seamless interaction with the DeepWriter external programming interface. This server exposes robust primitives for project orchestration and AI-driven asset fabrication, standardized through the MCP framework.
Core Capabilities
- Artifact Orchestration: Full Create, Read, Update, and Destroy (CRUD) operations for content generation artifacts (projects).
- Generative Execution: Triggers the DeepWriter AI engine to synthesize new content based on project parameters.
- Metadata Retrieval: Access detailed state information pertaining to any managed artifact.
- AI Ecosystem Interoperability: Provides native interfacing with Claude and other assistants adhering to the MCP specification.
- Protocol Compliance: Adheres strictly to MCP specification version 2025-03-26.
- Communication Channel: Utilizes standard I/O (Stdio) transport for local process communication.
Operational Requirements
- Runtime Environment: Node.js (minimum version 17+)
- Package Manager: npm (minimum version 6+)
- Authentication Credential: A valid DeepWriter API secret key
- Client Interface: An MCP-compliant invoking agent (e.g., Claude Workstation)
Deployment Procedures
Automated Provisioning (Via Smithery)
To automatically register deepwriter-mcp for use with Claude Desktop using Smithery:
bash npx -y @smithery/cli install @deepwriter-ai/deepwriter-mcp --client claude
Manual Setup Steps
-
Obtain the source repository: bash git clone https://github.com/yourusername/deepwriter-mcp.git cd deepwriter-mcp
-
Resolve dependencies: bash npm install
-
Configure Environment Variables: Create a
.envfile in the root directory containing your credential:
DEEPWRITER_API_KEY=your_secret_access_token
- Compile Source Code: bash npm run build
Execution & Client Configuration
Initiating the Gateway Service
Launch the MCP gateway process:
bash node build/index.js
The process will await MCP directives transmitted via standard input and relay results through standard output, following the defined MCP stdio protocol.
Linking with Claude Desktop
To enable the service within Claude for Desktop, modify its configuration file:
- macOS Path:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows Path:
%APPDATA%\Claude\claude_desktop_config.json
Inject the following server descriptor:
{ "mcpServers": { "deepwriter_gateway": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/deepwriter-mcp/build/index.js"], "env": { "DEEPWRITER_API_KEY": "your_secret_access_token" } } } }
Remember to restart the Claude application to initialize the new service endpoint.
Implemented Protocol Features
This adapter strictly adheres to MCP version 2025-03-26, offering:
- Transport Layer: Stdio handler for localized IPC.
- Tool Set: Exposure of all available DeepWriter API functionalities.
- Auditing: Structured logging capabilities with adjustable verbosity levels.
Available Operations (Tools)
1. enumerateProjects
Fetches a manifest of all artifacts registered under the authenticated account.
{ "auth_token": "your_secret_access_token" }
2. fetchArtifactMetadata
Retrieves granular specifications for a designated project instance.
{ "auth_token": "your_secret_access_token", "artifact_identifier": "unique_project_id_ref" }
3. registerNewArtifact
Provisions a new content generation context.
{ "auth_token": "your_secret_access_token", "designation_label": "New Project Title", "contact_email": "user@domain.com" }
4. reconfigureArtifact
Applies modifications to an existing artifact's parameters.
{ "auth_token": "your_secret_access_token", "artifact_identifier": "unique_project_id_ref", "parameter_adjustments": { "designation_label": "Revised Title", "generation_directive": "Updated instruction set", "creator_identity": "New Author Name", "contact": "revised@domain.com", "model_variant": "New model designation", "structural_map": "Revised blueprint text", "stylistic_guide": "Revised aesthetic manifesto", "ancillary_data": "Updated supplemental context", "task_summary": "Updated work description", "execution_details": "Updated operational specifications", "conceptual_framework": "Updated vision statement" } }
5. executeContentSynthesis
Initiates the AI generation sequence for the specified project.
{ "auth_token": "your_secret_access_token", "artifact_identifier": "unique_project_id_ref", "default_mode_override": true // Optional flag, defaults to true }
6. decommissionArtifact
Permanently removes a project instance.
{ "auth_token": "your_secret_access_token", "artifact_identifier": "unique_project_id_ref" }
Development Lifecycle
Directory Hierarchy
deepwriter-mcp/ ├── src/ │ ├── index.ts # Primary executable and MCP server bootstrap │ ├── integration/ │ │ └── dwClient.ts # Module encapsulating DeepWriter API interactions │ └── protocols/ │ ├── registerArtifact.ts │ ├── decommissionArtifact.ts │ ├── executeSynthesis.ts │ ├── fetchArtifactMetadata.ts │ ├── enumerateProjects.ts │ └── reconfigureArtifact.ts ├── build/ # Output directory for compiled artifacts ├── testUtility-artifactOps.js # Script for testing gateway tools ├── testUtility-mcpLink.js # Script for simulating MCP client interaction └── tsconfig.json # TypeScript compiler configuration file
Compilation
bash npm run build
Generates JavaScript output in the build folder.
Verification
Execute integrated test suites to validate functionality:
bash node testUtility-mcpLink.js
or
bash node testUtility-artifactOps.js
TypeScript Settings
Configuration utilizes modern ES module standards:
{ "compilerOptions": { "target": "ES2022", "module": "Node16", "moduleResolution": "Node16", "outDir": "./build", "strict": true } }
Issue Resolution Guide
Typical Problems Encountered
- Credential Validation Failures:
- Confirm the DeepWriter access token is correctly provisioned in
.env. - Ensure the token is correctly injected into the tool invocation arguments.
-
Verify the token scope permits the requested operations.
-
Network Accessibility Issues:
- Check external routing to the DeepWriter service endpoints.
- Inspect local firewall or proxy configurations that might impede connectivity.
-
Validate network link stability.
-
Protocol Desynchronization:
- Use a client confirmed to support MCP version 2025-03-26.
- Validate the stdio transport setup integrity.
-
Verify parameter casing aligns with the expected schema.
-
Argument Mismatch:
- The server accepts both snake_case (
artifact_identifier) and camelCase (artifactIdentifier). - All transmitted parameters are case-sensitive.
- Mandatory inputs must not be absent or null.
Diagnostic Logging
For verbose system tracing, invoke the server with the DEBUG variable set:
bash DEBUG=deepwriter-mcp:* node build/index.js
Client-side diagnostic traces can often be found in:
- macOS: ~/Library/Logs/Claude/mcp*.log
- Windows: %APPDATA%\Claude\logs\mcp*.log
Community Engagement
We actively encourage external contributions. To participate:
Reporting Anomalies
- Utilize the official GitHub issue tracker.
- Detail the steps required to replicate the failure.
- Include environmental metadata (Node version, OS).
- Attach relevant log excerpts.
-
Use the designated 'bug' template.
-
Feature Proposals
- Log requests under the "enhancement" label.
- Articulate the proposed capability and its intended operational context.
- Justify its value proposition to the project.
-
Utilize the designated 'feature' template.
-
Vulnerability Disclosure
- Crucially, do not file a public issue for security concerns.
- Direct all sensitive findings via encrypted email to security@deepwriter.com.
- We adhere to responsible disclosure timelines.
Submission Guidelines (Pull Requests)
- Pre-submission Check
- Review existing tracker items to prevent redundant effort.
- For significant architectural changes, initiate discussion via an issue first.
-
Conform to established style guides and MCP implementation mandates.
-
Development Workflow
- Fork the primary repository.
- Branch off
mainfor all new work. - Maintain code consistency.
- Ensure comprehensive unit tests accompany new logic.
-
Update documentation for all functional alterations.
-
PR Requirements
- Provide a succinct summary of modifications.
- Reference associated issue identifiers.
- Include verified tests.
- Document changes where applicable.
- Adhere to conventional commit standards.
-
Completion of the Contributor License Agreement (CLA) is mandatory.
-
Review Phase
- All submissions require sign-off from a core maintainer.
- Address all feedback diligently.
- Keep submitted PRs modular and narrowly scoped.
- Maintain prompt communication during review.
Operational Directives
- Style Conformity
- Embrace TypeScript best practices.
- Configure code formatting via ESLint and Prettier.
-
Ensure strict adherence to the documented MCP specifications.
-
Testing Rigor
- Develop unit tests for all new constructs.
- Strive to maintain or elevate existing code coverage metrics.
- Validate conformance against the MCP standard.
-
Test compatibility across specified Node.js runtime versions.
-
Documentation Standards
- Update
README.mdfor all user-facing functional shifts. - Use JSDoc annotations extensively for new code components.
- Maintain API reference documentation.
-
Provide usage examples for novel features.
-
Commit Discipline
- Employ the conventional commits specification for messages.
- Link relevant issue numbers/PR IDs.
- Commits must be atomic and logically self-contained.
- Messages must be descriptive and unambiguous.
Support Channels
- Join our designated community Discord server.
- Consult the project documentation portal.
- Initiate dialogue in GitHub Discussions.
- Participate in our regular contributor synchronization meetings.
Security Posture
- Input sanitization is enforced prior to all external API calls.
- Access credentials are never serialized to logs or exposed in failure reports.
- Process separation is maintained via the stdio transport mechanism.
- All external network communication is exclusively secured via HTTPS.
- Robust validation routines mitigate injection vectors.
Licensing
MIT

