Skip to main content
Python

Workspace Tools

v0.1.3
70

@nimblebraininc/workspace-tools

Git-backed workspace tools for AI agents: file ops, commits, search, and skill validation

python

README

Workspace Tools MCP Server

mpak NimbleBrain License: MIT

Git-backed file operations, commits, full-text search, and skill validation for NimbleBrain agents. This server gives agents a structured way to read, write, and commit files in a git repository, query an indexed knowledge base, and validate skill manifests.

This is one of the core MCP servers that powers NimbleBrain's agent runtime. It's open source so you can see exactly what the agent can do, fork it to add your own tools, or use it as a reference for building workspace-style MCP servers.

Extending

Want to give the agent new capabilities? This server is the right place to add tools that operate on the workspace (the git repo the agent has access to). Some ideas:

  • Add a file_move or file_rename tool
  • Add a git_diff tool to show uncommitted changes
  • Add a git_log tool to show commit history
  • Add domain-specific query actions to index_query
  • Add validation tools for your own file formats

Fork this repo, add your tools to src/mcp_workspace_tools/server.py, and deploy your custom version.

Tools

file_read

Read a file from the repo by relative path.

ParameterTypeRequiredDescription
pathstringYesRepo-relative file path

file_write

Write content to a file. Creates parent directories and stages the file for commit.

ParameterTypeRequiredDescription
pathstringYesRepo-relative file path
contentstringYesFile content to write

file_list

List tracked files in the repo, optionally filtered by directory and glob pattern.

ParameterTypeRequiredDescription
directorystringNoDirectory prefix to filter by
patternstringNoGlob pattern for filenames (default: *)

file_delete

Delete a file and stage the deletion.

ParameterTypeRequiredDescription
pathstringYesRepo-relative file path

git_commit

Commit all staged changes with the given message.

ParameterTypeRequiredDescription
messagestringYesCommit message

index_query

Query the SQLite index for full-text search and entity resolution.

ParameterTypeRequiredDescription
actionstringYesQuery action: search, resolve_entity, files_by_type, files_by_tag
querystringNoSearch query or entity name
entity_typestringNoEntity type for resolve/filter
tagstringNoTag for files_by_tag
limitintegerNoMax results (default: 20)

skill_validate

Validate a skill manifest YAML string against the schema.

ParameterTypeRequiredDescription
manifest_yamlstringYesFull YAML content of a skill manifest

Configuration

Env VarRequiredDescription
REPO_PATHYesPath to the git repository root
TENANT_IDNoTenant identifier (defaults to "default")

Development

git clone https://github.com/NimbleBrainInc/mcp-workspace-tools.git
cd mcp-workspace-tools

# Install dependencies
uv sync --group dev

# Run all checks (format, lint, typecheck, tests)
make check

# Run the server locally (stdio)
uv run python -m mcp_workspace_tools.server

# Run the server locally (HTTP)
make run-http

License

MIT