tinamcp
A Model Context Protocol (MCP) Server built with C# to manage TinaCMS file-based content via MCP tools.
Documentation
TinaCMS MCP Server (C#)
This project implements a standalone Model Context Protocol (MCP) server using the official C# SDK (`modelcontextprotocol/csharp-sdk`). Its purpose is to expose tools that allow interaction with content files managed by a TinaCMS project repository.
This enables AI models or other MCP clients to list, read, create, update, and delete content files within a TinaCMS site via the standardized MCP.
Features
- Connects to a local TinaCMS project directory.
- Uses standard MCP Stdio transport for communication.
- Provides tools for basic content management operations:
- Includes basic path validation and security checks.
Prerequisites
- .NET 8 SDK (or later): Required to build and run the C# server.
- Node.js and npm/npx: Required to run the MCP Inspector tool for testing.
- A TinaCMS Project: You need a local TinaCMS project whose content you want this server to manage.
Setup
1. Clone/Download: Get the source code for this project.
2. Configure Root Path:
{
"Logging": { ... },
"TinaProject": {
"RootPath": "/path/to/your/tina-project"
}
}3. Restore Dependencies: Open a terminal in the `TinaMcpServer` project directory and run:
dotnet restoreDevelopment
- Build: To compile the project:
dotnet build- Run Locally (for testing): The server is designed to be run by an MCP client (like the Inspector). Running it directly isn't very useful, but you can start it with:
dotnet runor by running the compiled DLL:
dotnet bin/Debug/net8.0/TinaMcpServer.dllThe server will start and wait for an MCP client to connect via standard input/output. It will likely exit immediately or show JSON errors if run without a client.
Testing with MCP Inspector
The recommended way to test the server and its tools is using the official MCP Inspector.
1. Ensure the project is built: Run `dotnet build` if you haven't already.
2. Run the Inspector: In your terminal (in the `TinaMcpServer` project directory), run the following command. This tells the Inspector to launch your compiled server DLL using `dotnet`:
npx @modelcontextprotocol/inspector dotnet bin/Debug/net8.0/TinaMcpServer.dll3. Open Inspector UI: The command will output a URL (e.g., `http://127.0.0.1:6274`). Open this URL in your web browser.
4. Connect: Click the "Connect" button for the detected `TinaMcpServer`.
5. Use Tools:
Available Tools
*(Descriptions are abbreviated here; see tool attributes in code for full details)*
- `ListTinaCollections()`: Lists collection directories under `/content`.
- `ListCollectionDocuments(collection)`: Lists files directly within a collection directory.
- `ListDocumentsRecursive(collection)`: Lists all files within a collection, including subdirectories.
- `GetTinaDocument(collection, relativePath)`: Gets the full text content of a document.
- `CreateTinaDocument(collection, relativePath, content)`: Creates a new document; fails if it exists.
- `UpdateTinaDocument(collection, relativePath, content)`: Overwrites an existing document; fails if it doesn't exist.
- `DeleteTinaDocument(collection, relativePath)`: Deletes an existing document; fails if it doesn't exist.
- `MoveDocument(collection, oldRelativePath, newRelativePath)`: Moves/renames a document.
- `CopyDocument(collection, sourceRelativePath, destinationRelativePath)`: Copies a document.
- `GetDocumentMetadata(collection, relativePath)`: Gets YAML frontmatter as a JSON string.
- `UpdateDocumentMetadata(collection, relativePath, metadataUpdatesJson)`: Adds/updates frontmatter fields from a JSON object.
- `GetCollectionSchemaInfo(collection)`: Reads the `.tina/schema.json` file content.
Potential Future Enhancements
- Configuration for the assumed `/content` directory name.
- More granular update operations (e.g., partial updates instead of full replace).
- Support for different frontmatter formats (e.g., JSON, TOML) if needed.
- More robust schema parsing/interaction.
- Different transport options (e.g., HTTP/SSE).
Frequently asked questions
What is tinamcp?
tinamcp is A Model Context Protocol (MCP) Server built with C# to manage TinaCMS file-based content via MCP tools.
How do I install tinamcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is tinamcp open source?
Yes — it is hosted on GitHub at https://github.com/calumjs/TinaMCP and has 1 stars.
Related MCP tools
An MCP server that allows MCP clients like Claude Desktop or Cursor to perform actions in the Unity Editor C#-based implementation.
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft. Trusted by 3500+ developers.
Model Context Protocol (MCP) plugin to connect with Unity Editor — designed for OpenAI, Gemini, Claude, Deepseek and Grok interoperability
Catalog of official Microsoft MCP (Model Context Protocol) server implementations for AI-powered data access and tool integration
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP